/
ICrowdinApiClient.cs
124 lines (81 loc) · 3.8 KB
/
ICrowdinApiClient.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Crowdin.Api.Applications;
using Crowdin.Api.Bundles;
using Crowdin.Api.Core;
using Crowdin.Api.Dictionaries;
using Crowdin.Api.Distributions;
using Crowdin.Api.Glossaries;
using Crowdin.Api.Issues;
using Crowdin.Api.Labels;
using Crowdin.Api.Languages;
using Crowdin.Api.MachineTranslationEngines;
using Crowdin.Api.ProjectsGroups;
using Crowdin.Api.Reports;
using Crowdin.Api.Screenshots;
using Crowdin.Api.SecurityLogs;
using Crowdin.Api.SourceFiles;
using Crowdin.Api.SourceStrings;
using Crowdin.Api.Storage;
using Crowdin.Api.StringComments;
using Crowdin.Api.StringTranslations;
using Crowdin.Api.Tasks;
using Crowdin.Api.Teams;
using Crowdin.Api.TranslationMemory;
using Crowdin.Api.Translations;
using Crowdin.Api.TranslationStatus;
using Crowdin.Api.Users;
using Crowdin.Api.Vendors;
using Crowdin.Api.Webhooks;
using Crowdin.Api.Workflows;
#nullable enable
namespace Crowdin.Api
{
[PublicAPI]
public interface ICrowdinApiClient
{
IJsonParser DefaultJsonParser { get; }
#region Public API
BundlesApiExecutor Bundles { get; }
DictionariesApiExecutor Dictionaries { get; }
DistributionsApiExecutor Distributions { get; }
GlossariesApiExecutor Glossaries { get; }
IssuesApiExecutor Issues { get; }
LabelsApiExecutor Labels { get; }
LanguagesApiExecutor Languages { get; }
MachineTranslationEnginesApiExecutor MachineTranslationEngines { get; }
ProjectsGroupsApiExecutor ProjectsGroups { get; }
ReportsApiExecutor Reports { get; }
ScreenshotsApiExecutor Screenshots { get; }
SecurityLogsApiExecutor SecurityLogs { get; }
SourceFilesApiExecutor SourceFiles { get; }
SourceStringsApiExecutor SourceStrings { get; }
StorageApiExecutor Storage { get; }
StringCommentsApiExecutor StringComments { get; }
StringTranslationsApiExecutor StringTranslations { get; }
TasksApiExecutor Tasks { get; }
TeamsApiExecutor Teams { get; }
TranslationMemoryApiExecutor TranslationMemory { get; }
TranslationsApiExecutor Translations { get; }
TranslationStatusApiExecutor TranslationStatus { get; }
UsersApiExecutor Users { get; }
VendorsApiExecutor Vendors { get; }
WebhooksApiExecutor Webhooks { get; }
WorkflowsApiExecutor Workflows { get; }
ApplicationsApiExecutor Applications { get; }
#endregion
#region Internal methods
internal Task<CrowdinApiResult> SendGetRequest(string subUrl, IDictionary<string, string>? queryParams = null);
internal Task<CrowdinApiResult> SendPostRequest(string subUrl, object? body = null, IDictionary<string, string>? extraHeaders = null);
internal Task<CrowdinApiResult> SendPutRequest(string subUrl, object? body = null);
internal Task<CrowdinApiResult> SendPatchRequest(string subUrl, IEnumerable<PatchEntry> body, IDictionary<string, string>? queryParams = null);
internal Task<CrowdinApiResult> SendPatchRequest(string subUrl, object body, IDictionary<string, string>? queryParams = null);
internal Task<HttpStatusCode> SendDeleteRequest(string subUrl, IDictionary<string, string>? queryParams = null);
internal Task<CrowdinApiResult> SendDeleteRequest_FullResult(string subUrl, IDictionary<string, string>? queryParams = null);
internal Task<CrowdinApiResult> UploadFile(string subUrl, string filename, Stream fileStream);
#endregion
}
}