GroupDocs offers software development kits (SDKs) for popular programming languages that make interaction with GroupDocs.Rewriter cloud services much easier. It allows you to focus on business logic rather than the technical details.
SDKs handle all the routine operations such as establishing connections, sending API requests, and parsing responses, wrapping all these tasks into a few simple methods. The following programming languages are supported:
GroupDocs.Rewriter Cloud for Python Natively integrate content processing features into data analytics, finance, AI, and other Python applications and notebooks.
All SDKs are open-source distributed under MIT License. You can freely use them for any projects, including commercial and proprietary applications, as well as modify any part of the code.
The provided code is fully tested and ready to run out of the box.
SDK usage examples
See the examples below for a quick overview of how SDKs can make your development easier.
Paraphrasing the text
usingGroupDocs.Rewriter.Cloud.Sdk.Api;usingGroupDocs.Rewriter.Cloud.Sdk.Client;usingGroupDocs.Rewriter.Cloud.Sdk.Client.Auth;usingGroupDocs.Rewriter.Cloud.Sdk.Model;usingConfiguration=GroupDocs.Rewriter.Cloud.Sdk.Client.Configuration;usingSystem.Diagnostics;usingSystem.IO;usingSystem.Collections.Generic;usingSystem.Net.Http;usingHttpStatusCode=System.Net.HttpStatusCode;namespaceGroupDocs.Rewriter.Cloud.Sdk{publicclassTextRewriter{publicTextRewriter(){Configurationconfig=newConfiguration();config.OAuthFlow=OAuthFlow.APPLICATION;config.OAuthClientId="YOU_CLIENT_ID";config.OAuthClientSecret="YOU_CLIENT_SECRET";config.BasePath="https://api.groupdocs.cloud/v2.0/rewriter";ParaphraseApiapi=newParaphraseApi(conf);stringsrcText="Hello, everyone! We will try to rephrase this text into something new.";stringsourceLanguage="en";ParaphraseTextResponsetextResponse=newParaphraseTextResponse();ParaphraseTextRequestreq=newParaphraseTextRequest(language:sourceLanguage,text:srcText,suggestions:ParaphraseTextRequest.SuggestionsEnum.One,diversityDegree:DegreeEnum.Off);StatusResponseresponseId=awaitapi.ParaphraseTextPostAsync(req);try{if(responseId.Status.ToString()=="Accepted"){while(true){textResponse=awaitapi.ParaphraseTextRequestIdGetAsync(responseId.Id);if((HttpStatusCode)textResponse.Status==HttpStatusCode.OK){Console.WriteLine("Plain text paraphrasing: "+textResponse.ParaphraseReult);break;}elseThread.Sleep(200);}}else{textResponse=newParaphraseTextResponse(){Status=responseId.Status,Message=responseId.Message};Console.WriteLine("Text error: "+textResponse.Message);}}catch(Exceptionex){Console.WriteLine("Text exception: "+ex.ToString());}}}}