XyloCode.ThirdPartyServices.YandexCloud 1.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package XyloCode.ThirdPartyServices.YandexCloud --version 1.0.0                
NuGet\Install-Package XyloCode.ThirdPartyServices.YandexCloud -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XyloCode.ThirdPartyServices.YandexCloud" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XyloCode.ThirdPartyServices.YandexCloud --version 1.0.0                
#r "nuget: XyloCode.ThirdPartyServices.YandexCloud, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install XyloCode.ThirdPartyServices.YandexCloud as a Cake Addin
#addin nuget:?package=XyloCode.ThirdPartyServices.YandexCloud&version=1.0.0

// Install XyloCode.ThirdPartyServices.YandexCloud as a Cake Tool
#tool nuget:?package=XyloCode.ThirdPartyServices.YandexCloud&version=1.0.0                

Yandex.Clould API client library

Unofficial assembly of .proto files for working with the Yandex.Cloud API using the gRPC protocol.

Resources:

Yandex.Cloud

A full-fledged cloud platform providing scalable infrastructure, storage, machine learning and development tools to build and enhance digital services and applications.

Developed by Yandex, one of the largest technological companies in the world that builds intelligent products and services.

Changes to the official code (.proto files)

In the file yandex\cloud\datatransfer\v1\endpoint\parsers.proto message Parser has been renamed to Parser1, renamed dependencies.

How to use

Before creating a communication channel, you need to understand which endpoint should be used, for this you should refer to the documentation: https://cloud.yandex.com/en/docs/api-design-guide/concepts/endpoints

Also, IAM-Token or service account should be used as a token.

using Grpc.Core;
using Grpc.Net.Client;
using Yandex.Cloud.API.AI.Translate.V2;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            const string iam = @"t1...";
            const string folderId = "...";

            using var channel = GrpcChannel.ForAddress("https://translate.api.cloud.yandex.net");
            var ts = new TranslationService.TranslationServiceClient(channel);
            var headers = new Metadata { { "Authorization", $"Bearer {token}" } };
            
            var req1 = new ListLanguagesRequest { FolderId = folderId };
            var res1 = ts.ListLanguages(req1, headers);
            foreach (var item in res1.Languages)
            {
                Console.WriteLine("[{0}]: {1}", item.Code, item.Name);
            }

            var req2 = new TranslateRequest
            {
                FolderId = folderId,
                Format = TranslateRequest.Types.Format.PlainText,
                SourceLanguageCode = "ru",
                TargetLanguageCode = "en",
            };
            req2.Texts.AddRange(new string[] { "Столовая", "Автомастерская", "Торговый центр" });
            var res2 = ts.Translate(req2, headers);
            foreach (var item in res2.Translations)
            {
                Console.WriteLine("{0} / {1}", item.DetectedLanguageCode, item.Text);
            }

            Console.Beep();
            Console.ReadLine();
        }
    }
}

Authors

The following authors have created the source code (.proto files) of "Yandex.Cloud API" published and distributed by YANDEX LLC as the owner:

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.0 2,278 2/19/2024
1.4.0 2,512 12/25/2023
1.3.0 2,811 11/16/2023
1.2.0 2,843 10/14/2023
1.1.0 3,047 10/4/2023
1.0.1 2,965 9/13/2023
1.0.0 3,241 9/11/2023

In the file yandex\cloud\datatransfer\v1\endpoint\parsers.proto message Parser has been renamed to Parser1, renamed dependencies.