Beispiel #1
0
        private static async Task <Response2> AnalyzeText(redoc_v2_textsClient client)
        {
            var r1 = await client.V2TextsPostAsync(ContentLanguage.En, ContentType.Application_json, key, new Body
            {
                Text = new Text4 {
                    Content = "Hello world!", Reference = Text4Reference.Default, Type = Text4Type.String
                },
                Results = new List <Results5>
                {
                    new Results5
                    {
                        Name = Results5Name.Formal
                    }
                }
            });

            return(await WaitResults(client, r1));
        }
Beispiel #2
0
        private static async Task <Response2> AnalyzeDoc(redoc_v2_textsClient client)
        {
            var bytes  = File.ReadAllBytes(@"testdoc.docx");
            var base64 = Convert.ToBase64String(bytes);

            var r1 = await client.V2TextsPostAsync(ContentLanguage.En, ContentType.Application_json, key, new Body
            {
                Text = new Text4 {
                    Content = base64, Reference = Text4Reference.Default, Type = Text4Type.Docx
                },
                Results = new List <Results5>
                {
                    new Results5
                    {
                        Name = Results5Name.Formal
                    }
                }
            });

            return(await WaitResults(client, r1));
        }