aboutsummaryrefslogtreecommitdiff
path: root/OcrClient
diff options
context:
space:
mode:
Diffstat (limited to 'OcrClient')
-rw-r--r--OcrClient/Models/OcrResponse.cs5
-rw-r--r--OcrClient/OcrClient.csproj14
-rw-r--r--OcrClient/Services/IOcrClient.cs8
-rw-r--r--OcrClient/Services/OcrClient.cs19
4 files changed, 46 insertions, 0 deletions
diff --git a/OcrClient/Models/OcrResponse.cs b/OcrClient/Models/OcrResponse.cs
new file mode 100644
index 0000000..2afc041
--- /dev/null
+++ b/OcrClient/Models/OcrResponse.cs
@@ -0,0 +1,5 @@
+namespace OcrClient.Models;
+
+public class OcrResponse
+{
+} \ No newline at end of file
diff --git a/OcrClient/OcrClient.csproj b/OcrClient/OcrClient.csproj
new file mode 100644
index 0000000..4f78021
--- /dev/null
+++ b/OcrClient/OcrClient.csproj
@@ -0,0 +1,14 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFrameworks>net472;net6.0-windows</TargetFrameworks>
+ <LangVersion>10</LangVersion>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="System.Net.Http" Version="4.3.4" />
+ </ItemGroup>
+
+</Project>
diff --git a/OcrClient/Services/IOcrClient.cs b/OcrClient/Services/IOcrClient.cs
new file mode 100644
index 0000000..c8b1a86
--- /dev/null
+++ b/OcrClient/Services/IOcrClient.cs
@@ -0,0 +1,8 @@
+using OcrClient.Models;
+
+namespace OcrClient.Services;
+
+public interface IOcrClient
+{
+ public Task<OcrResponse> ProcessImage(string base64Image);
+}
diff --git a/OcrClient/Services/OcrClient.cs b/OcrClient/Services/OcrClient.cs
new file mode 100644
index 0000000..e4cfef3
--- /dev/null
+++ b/OcrClient/Services/OcrClient.cs
@@ -0,0 +1,19 @@
+using OcrClient.Models;
+using System.Net.Http;
+
+namespace OcrClient.Services;
+
+public class YandexOcrClient : IOcrClient
+{
+ private readonly HttpClient _httpClient;
+
+ public YandexOcrClient(HttpClient httpClient)
+ {
+ _httpClient = httpClient;
+ }
+
+ public Task<OcrResponse> ProcessImage(string base64Image)
+ {
+ throw new NotImplementedException();
+ }
+} \ No newline at end of file