Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7d2e826 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed May 16, 2024
1 parent 877ac82 commit 7d4dd90
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ <h3 id="requirements">Requirements</h3>
<h3 id="installation">Installation</h3>
<p>Install via NuGet:</p>
<pre><code>// Package Manager
Install-Package Crowdin.Api -Version 2.22.0
Install-Package Crowdin.Api -Version 2.22.1

// .Net CLI
dotnet add package Crowdin.Api --version 2.22.0
dotnet add package Crowdin.Api --version 2.22.1

// Package Reference
&lt;PackageReference Include=&quot;Crowdin.Api&quot; Version=&quot;2.22.0&quot; /&gt;
&lt;PackageReference Include=&quot;Crowdin.Api&quot; Version=&quot;2.22.1&quot; /&gt;

// Paket CLI
paket add Crowdin.Api --version 2.22.0
paket add Crowdin.Api --version 2.22.1
</code></pre>
<h3 id="usage-examples">Usage examples</h3>
<h4 id="initialization">Initialization</h4>
Expand Down
8 changes: 4 additions & 4 deletions api/Crowdin.Api.MachineTranslationEngines.MtEngine.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h4 id="Crowdin_Api_MachineTranslationEngines_MtEngine_Credentials" data-uid="Cr
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IDictionary&lt;string, int&gt; Credentials { get; set; }</code></pre>
<pre><code class="lang-csharp hljs">public IDictionary&lt;string, object&gt; Credentials { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
Expand All @@ -123,7 +123,7 @@ <h5 class="propertyValue">Property Value</h5>
</thead>
<tbody>
<tr>
<td><span class="xref">IDictionary</span>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">String</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">Int32</a>&gt;</td>
<td><span class="xref">IDictionary</span>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">String</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">Object</a>&gt;</td>
<td></td>
</tr>
</tbody>
Expand Down Expand Up @@ -351,7 +351,7 @@ <h4 id="Crowdin_Api_MachineTranslationEngines_MtEngine_SupportedLanguageIds" dat
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int[] SupportedLanguageIds { get; set; }</code></pre>
<pre><code class="lang-csharp hljs">public string[] SupportedLanguageIds { get; set; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
Expand All @@ -363,7 +363,7 @@ <h5 class="propertyValue">Property Value</h5>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">Int32</a>[]</td>
<td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">String</a>[]</td>
<td></td>
</tr>
</tbody>
Expand Down
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ <h3 id="requirements">Requirements</h3>
<h3 id="installation">Installation</h3>
<p>Install via NuGet:</p>
<pre><code>// Package Manager
Install-Package Crowdin.Api -Version 2.22.0
Install-Package Crowdin.Api -Version 2.22.1

// .Net CLI
dotnet add package Crowdin.Api --version 2.22.0
dotnet add package Crowdin.Api --version 2.22.1

// Package Reference
&lt;PackageReference Include=&quot;Crowdin.Api&quot; Version=&quot;2.22.0&quot; /&gt;
&lt;PackageReference Include=&quot;Crowdin.Api&quot; Version=&quot;2.22.1&quot; /&gt;

// Paket CLI
paket add Crowdin.Api --version 2.22.0
paket add Crowdin.Api --version 2.22.1
</code></pre>
<h3 id="usage-examples">Usage examples</h3>
<h4 id="initialization">Initialization</h4>
Expand Down
4 changes: 2 additions & 2 deletions index.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@
"api/Crowdin.Api.MachineTranslationEngines.MtEngine.html": {
"href": "api/Crowdin.Api.MachineTranslationEngines.MtEngine.html",
"title": "Class MtEngine | Docs",
"keywords": "Class MtEngine Inheritance Object MtEngine Namespace : Crowdin.Api.MachineTranslationEngines Assembly : Crowdin.Api.dll Syntax public class MtEngine : object Properties | Improve this Doc View Source Credentials Declaration public IDictionary<string, int> Credentials { get; set; } Property Value Type Description IDictionary < String , Int32 > | Improve this Doc View Source EnabledLanguageIds Declaration public string[] EnabledLanguageIds { get; set; } Property Value Type Description String [] | Improve this Doc View Source EnabledProjectIds Declaration public int[] EnabledProjectIds { get; set; } Property Value Type Description Int32 [] | Improve this Doc View Source GroupId Declaration public int GroupId { get; set; } Property Value Type Description Int32 | Improve this Doc View Source Id Declaration public int Id { get; set; } Property Value Type Description Int32 | Improve this Doc View Source IsEnabled Declaration public bool IsEnabled { get; set; } Property Value Type Description Boolean | Improve this Doc View Source Name Declaration public string Name { get; set; } Property Value Type Description String | Improve this Doc View Source ProjectIds Declaration public int[] ProjectIds { get; set; } Property Value Type Description Int32 [] | Improve this Doc View Source SupportedLanguageIds Declaration public int[] SupportedLanguageIds { get; set; } Property Value Type Description Int32 [] | Improve this Doc View Source SupportedLanguagePairs Declaration public IDictionary<string, string[]> SupportedLanguagePairs { get; set; } Property Value Type Description IDictionary < String , String []> | Improve this Doc View Source Type Declaration public string Type { get; set; } Property Value Type Description String"
"keywords": "Class MtEngine Inheritance Object MtEngine Namespace : Crowdin.Api.MachineTranslationEngines Assembly : Crowdin.Api.dll Syntax public class MtEngine : object Properties | Improve this Doc View Source Credentials Declaration public IDictionary<string, object> Credentials { get; set; } Property Value Type Description IDictionary < String , Object > | Improve this Doc View Source EnabledLanguageIds Declaration public string[] EnabledLanguageIds { get; set; } Property Value Type Description String [] | Improve this Doc View Source EnabledProjectIds Declaration public int[] EnabledProjectIds { get; set; } Property Value Type Description Int32 [] | Improve this Doc View Source GroupId Declaration public int GroupId { get; set; } Property Value Type Description Int32 | Improve this Doc View Source Id Declaration public int Id { get; set; } Property Value Type Description Int32 | Improve this Doc View Source IsEnabled Declaration public bool IsEnabled { get; set; } Property Value Type Description Boolean | Improve this Doc View Source Name Declaration public string Name { get; set; } Property Value Type Description String | Improve this Doc View Source ProjectIds Declaration public int[] ProjectIds { get; set; } Property Value Type Description Int32 [] | Improve this Doc View Source SupportedLanguageIds Declaration public string[] SupportedLanguageIds { get; set; } Property Value Type Description String [] | Improve this Doc View Source SupportedLanguagePairs Declaration public IDictionary<string, string[]> SupportedLanguagePairs { get; set; } Property Value Type Description IDictionary < String , String []> | Improve this Doc View Source Type Declaration public string Type { get; set; } Property Value Type Description String"
},
"api/Crowdin.Api.MachineTranslationEngines.MtEnginePatch.html": {
"href": "api/Crowdin.Api.MachineTranslationEngines.MtEnginePatch.html",
Expand Down Expand Up @@ -3292,6 +3292,6 @@
"README.html": {
"href": "README.html",
"title": "Crowdin .NET client | Docs",
"keywords": "Crowdin .NET client The Crowdin .NET client is a lightweight interface to the Crowdin API. It provides common services for making API requests. Our API is a full-featured RESTful API that helps you to integrate localization into your development process. The endpoints that we use allow you to easily make calls to retrieve information and perform necessary actions. Docs | Examples | Crowdin API | Crowdin Enterprise API Requirements .NET Standard 2.0 support C# language version - 8.0+ Installation Install via NuGet: // Package Manager Install-Package Crowdin.Api -Version 2.22.0 // .Net CLI dotnet add package Crowdin.Api --version 2.22.0 // Package Reference <PackageReference Include=\"Crowdin.Api\" Version=\"2.22.0\" /> // Paket CLI paket add Crowdin.Api --version 2.22.0 Usage examples Initialization Instantiate a client with all available APIs: var credentials = new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"organizationName (for Crowdin Enterprise only)\" }; var client = new CrowdinApiClient(credentials); Or use only the executors you need: var credentials = new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"organizationName (for Crowdin Enterprise only)\" }; var client = new CrowdinApiClient(credentials); var executor = new SourceFilesApiExecutor(client); Storage List storages ResponseList<StorageResource> storages = await client.Storage.ListStorages(); Add storage await using FileStream fileStream = File.Open(\"/path/to/file\", FileMode.Open); StorageResource storageResource = await client.Storage.AddStorage(fileStream, filename: \"MyFile\"); Projects List projects ResponseList<EnterpriseProject> response = await client.ProjectsGroups.ListProjects<EnterpriseProject>(); Edit project const int projectId = 1; // Edit info & settings with one request var patches = new List<ProjectPatch> { // Edit project info new ProjectInfoPatch { Value = \"name\", Path = ProjectInfoPathCode.Cname, Operation = PatchOperation.Replace }, new ProjectInfoPatch { Value = \"value here\", Path = new ProjectInfoPath(ProjectInfoPathCode.LanguageMapping, \"languageId\", \"mapping\"), Operation = PatchOperation.Test }, // Edit project settings new ProjectSettingPatch { Value = true, Path = ProjectSettingPathCode.AutoSubstitution, Operation = PatchOperation.Replace } }; // PATCH request var projectSettingsResponse = await client.ProjectsGroups.EditProject<ProjectSettings>(projectId, patches); Console.WriteLine(projectSettingsResponse); Fetch all records Get a list of all the data available from the API via automatic pagination control: const int parentId = 1; const int maxAmountOfItems = 50; // amount of needed items. Optional parameter, default: no limit const int amountPerRequest = 10; // amount of items in response per 1 request. Optional parameter, default: 25 Group[] allGroups = await CrowdinApiClient.WithFetchAll((limit, offset) => { Console.WriteLine(\"Limit: {0} | Offset: {1}\", limit, offset); return client.ProjectsGroups.ListGroups(parentId, limit, offset); }, maxAmountOfItems, amountPerRequest); Only for list async methods that return Task<ResponseList<T>> . Rate limiting API client has built-in support for rate limiting services. The library provides an implementation of Exponential Backoff Algorithm. Usage: var rateLimiter = new ExponentialBackoffRateLimiter(new RateLimitConfiguration { // Maximum attempts count MaxAttempts = 5, // Maximum delay (top limit) MaxDelay = TimeSpan.FromSeconds(5), // Initial delay (bottom limit) InitialDelay = TimeSpan.FromMilliseconds(200), }); // Pass created Rate Limiter instance as named argument to API client instance // If rate limiter not passed - the request will fail immediately after HTTP 429 Too Many Requests error var client = new CrowdinApiClient(new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"optional organization (for Enterprise API)\" }, rateLimiter: rateLimiter); A custom rate limiting service should also implement the IRateLimiter interface. Rate limiting is disabled by default because users may be using custom resilience approaches (such as Polly ) that may conflict with each other. This solution only covers simple resilience cases. If you need advanced customization - please try Polly or alternatives. Retry configuration Pass retry service (built-in or custom): IRetryService myRetryService = new RetryService(new RetryConfiguration { RetriesCount = 5, WaitIntervalMilliseconds = 1000, SkipRetryConditions = { exception => ((CrowdinApiException) exception).Code.GetValueOrDefault() == 1 } }); var apiClient = new CrowdinApiClient(new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"optional organization (for Enterprise API)\" }, retryService: myRetryService); A custom retry service should also implement the IRetryService interface. Contribution If you would like to contribute please read the Contributing guidelines. Seeking Assistance If you find any problems or would like to suggest a feature, please feel free to file an issue on GitHub at the Issues Page . License The Crowdin .NET client is licensed under the MIT License. See the LICENSE file distributed with this work for additional information regarding copyright ownership. Except as contained in the LICENSE file, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization."
"keywords": "Crowdin .NET client The Crowdin .NET client is a lightweight interface to the Crowdin API. It provides common services for making API requests. Our API is a full-featured RESTful API that helps you to integrate localization into your development process. The endpoints that we use allow you to easily make calls to retrieve information and perform necessary actions. Docs | Examples | Crowdin API | Crowdin Enterprise API Requirements .NET Standard 2.0 support C# language version - 8.0+ Installation Install via NuGet: // Package Manager Install-Package Crowdin.Api -Version 2.22.1 // .Net CLI dotnet add package Crowdin.Api --version 2.22.1 // Package Reference <PackageReference Include=\"Crowdin.Api\" Version=\"2.22.1\" /> // Paket CLI paket add Crowdin.Api --version 2.22.1 Usage examples Initialization Instantiate a client with all available APIs: var credentials = new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"organizationName (for Crowdin Enterprise only)\" }; var client = new CrowdinApiClient(credentials); Or use only the executors you need: var credentials = new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"organizationName (for Crowdin Enterprise only)\" }; var client = new CrowdinApiClient(credentials); var executor = new SourceFilesApiExecutor(client); Storage List storages ResponseList<StorageResource> storages = await client.Storage.ListStorages(); Add storage await using FileStream fileStream = File.Open(\"/path/to/file\", FileMode.Open); StorageResource storageResource = await client.Storage.AddStorage(fileStream, filename: \"MyFile\"); Projects List projects ResponseList<EnterpriseProject> response = await client.ProjectsGroups.ListProjects<EnterpriseProject>(); Edit project const int projectId = 1; // Edit info & settings with one request var patches = new List<ProjectPatch> { // Edit project info new ProjectInfoPatch { Value = \"name\", Path = ProjectInfoPathCode.Cname, Operation = PatchOperation.Replace }, new ProjectInfoPatch { Value = \"value here\", Path = new ProjectInfoPath(ProjectInfoPathCode.LanguageMapping, \"languageId\", \"mapping\"), Operation = PatchOperation.Test }, // Edit project settings new ProjectSettingPatch { Value = true, Path = ProjectSettingPathCode.AutoSubstitution, Operation = PatchOperation.Replace } }; // PATCH request var projectSettingsResponse = await client.ProjectsGroups.EditProject<ProjectSettings>(projectId, patches); Console.WriteLine(projectSettingsResponse); Fetch all records Get a list of all the data available from the API via automatic pagination control: const int parentId = 1; const int maxAmountOfItems = 50; // amount of needed items. Optional parameter, default: no limit const int amountPerRequest = 10; // amount of items in response per 1 request. Optional parameter, default: 25 Group[] allGroups = await CrowdinApiClient.WithFetchAll((limit, offset) => { Console.WriteLine(\"Limit: {0} | Offset: {1}\", limit, offset); return client.ProjectsGroups.ListGroups(parentId, limit, offset); }, maxAmountOfItems, amountPerRequest); Only for list async methods that return Task<ResponseList<T>> . Rate limiting API client has built-in support for rate limiting services. The library provides an implementation of Exponential Backoff Algorithm. Usage: var rateLimiter = new ExponentialBackoffRateLimiter(new RateLimitConfiguration { // Maximum attempts count MaxAttempts = 5, // Maximum delay (top limit) MaxDelay = TimeSpan.FromSeconds(5), // Initial delay (bottom limit) InitialDelay = TimeSpan.FromMilliseconds(200), }); // Pass created Rate Limiter instance as named argument to API client instance // If rate limiter not passed - the request will fail immediately after HTTP 429 Too Many Requests error var client = new CrowdinApiClient(new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"optional organization (for Enterprise API)\" }, rateLimiter: rateLimiter); A custom rate limiting service should also implement the IRateLimiter interface. Rate limiting is disabled by default because users may be using custom resilience approaches (such as Polly ) that may conflict with each other. This solution only covers simple resilience cases. If you need advanced customization - please try Polly or alternatives. Retry configuration Pass retry service (built-in or custom): IRetryService myRetryService = new RetryService(new RetryConfiguration { RetriesCount = 5, WaitIntervalMilliseconds = 1000, SkipRetryConditions = { exception => ((CrowdinApiException) exception).Code.GetValueOrDefault() == 1 } }); var apiClient = new CrowdinApiClient(new CrowdinCredentials { AccessToken = \"<paste token here>\", Organization = \"optional organization (for Enterprise API)\" }, retryService: myRetryService); A custom retry service should also implement the IRetryService interface. Contribution If you would like to contribute please read the Contributing guidelines. Seeking Assistance If you find any problems or would like to suggest a feature, please feel free to file an issue on GitHub at the Issues Page . License The Crowdin .NET client is licensed under the MIT License. See the LICENSE file distributed with this work for additional information regarding copyright ownership. Except as contained in the LICENSE file, the name(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization."
}
}
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"output": {
".html": {
"relative_path": "README.html",
"hash": "6YmqewGDgFZj16Mx+OYok7XI+JP2oempW3z1keqWK1E="
"hash": "nr8b5T9J4qG1DIZfhJtLfDIStli4cYfJ/5huj6aTjJ0="
}
},
"is_incremental": false,
Expand Down Expand Up @@ -1806,7 +1806,7 @@
"output": {
".html": {
"relative_path": "api/Crowdin.Api.MachineTranslationEngines.MtEngine.html",
"hash": "EPNOWscPrgoBnQVdXVq/tYHP5vbmWBL/hYTYP6YLhVw="
"hash": "gfTczs5x1lxgKFCWkSRX80ogomTLIY0WlXpMiH3qPVU="
}
},
"is_incremental": false,
Expand Down

0 comments on commit 7d4dd90

Please sign in to comment.