Using an SDK (API client) is the quickest way for a developer to speed up the development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of GroupDocs.Comparison Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.
// For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-dotnet-samplesstringMyClientSecret="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudstringMyClientId="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudvarconfiguration=newConfiguration(MyClientId,MyClientSecret);varapiInstance=newCompareApi(configuration);varoptions=newComparisonOptions{SourceFile=newFileInfo{FilePath="source_files/word/source_protected.docx",Password="1231"},TargetFiles=newList<FileInfo>{newFileInfo{FilePath="target_files/word/target_protected.docx",Password="5784"},newFileInfo{FilePath="target_files/word/target_1_protected.docx",Password="5784"},newFileInfo{FilePath="target_files/word/target_2_protected.docx",Password="5784"}},OutputPath="output/result.docx"};varrequest=newComparisonsRequest(options);varresponse=apiInstance.Comparisons(request);
// For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-java-samples
StringMyClientSecret="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
StringMyClientId="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
Configurationconfiguration=newConfiguration(MyClientId,MyClientSecret);CompareApiapiInstance=newCompareApi(configuration);FileInfosourceFileInfo=newFileInfo();sourceFileInfo.setFilePath("source_files/word/source_protected.docx");sourceFileInfo.setPassword("1231");FileInfotargetFileInfo1=newFileInfo();targetFileInfo1.setFilePath("target_files/word/target_protected.docx");targetFileInfo1.setPassword("5784");FileInfotargetFileInfo2=newFileInfo();targetFileInfo2.setFilePath("target_files/word/target_1_protected.docx");targetFileInfo2.setPassword("5784");FileInfotargetFileInfo3=newFileInfo();targetFileInfo3.setFilePath("target_files/word/target_2_protected.docx");targetFileInfo3.setPassword("5784");ComparisonOptionsoptions=newComparisonOptions();options.setSourceFile(sourceFileInfo);options.addTargetFilesItem(targetFileInfo1);options.addTargetFilesItem(targetFileInfo2);options.addTargetFilesItem(targetFileInfo3);options.setOutputPath("output/result.docx");ComparisonsRequestrequest=newComparisonsRequest(options);Linkresponse=apiInstance.comparisons(request);
// For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-php-samples
useGroupDocs\Comparison\Model;useGroupDocs\Comparison\Model\Requests;$ClientId="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
$ClientSecret="";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
$configuration=newGroupDocs\Comparison\Configuration();$configuration->setAppSid($ClientId);$configuration->setAppKey($ClientSecret);$apiInstance=newGroupDocs\Comparison\CompareApi($configuration);$sourceFile=newModel\FileInfo();$sourceFile->setFilePath("source_files/word/source.docx");$sourceFile->setPassword("1231");$targetFile=newModel\FileInfo();$targetFile->setFilePath("target_files/word/target.docx");$targetFile->setPassword("5784");$targetFile1=newModel\FileInfo();$targetFile1->setFilePath("target_files/word/target_1.docx");$targetFile1->setPassword("5784");$targetFile2=newModel\FileInfo();$targetFile2->setFilePath("target_files/word/target_2.docx");$targetFile2->setPassword("5784");$options=newModel\ComparisonOptions();$options->setSourceFile($sourceFile);$options->setTargetFiles([$targetFile,$targetFile1,$targetFile2]);$options->setOutputPath("output/result.docx");$request=newRequests\ComparisonsRequest($options);$response=$apiInstance->comparisons($request);
// For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-node-samples
global.comparison_cloud=require("groupdocs-comparison-cloud");global.clientId="XXXX-XXXX-XXXX-XXXX";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
global.clientSecret="XXXXXXXXXXXXXXXX";// Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud
global.compareApi=comparison_cloud.CompareApi.fromKeys(clientId,clientSecret);try{letsource=newcomparison_cloud.FileInfo();source.filePath="source_files/word/source.docx";lettarget=newcomparison_cloud.FileInfo();target.filePath="target_files/word/target.docx";lettarget1=newcomparison_cloud.FileInfo();target1.filePath="target_files/word/target_1.docx";lettarget2=newcomparison_cloud.FileInfo();target2.filePath="target_files/word/target_2.docx";letsettings=newcomparison_cloud.Settings();settings.insertedItemsStyle=newcomparison_cloud.ItemsStyle();settings.insertedItemsStyle.fontColor="16711680";letoptions=newcomparison_cloud.ComparisonOptions();options.sourceFile=source;options.targetFiles=[target,target1,target2];options.outputPath="output/result.docx";options.settings=settings;letrequest=newcomparison_cloud.ComparisonsRequest(options);letresponse=awaitcompareApi.comparisons(request);console.log("Output file link: "+response.href);}catch(error){console.log(error.message);}
# For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-python-samplesimportgroupdocs_comparison_cloudclient_id="XXXX-XXXX-XXXX-XXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudclient_secret="XXXXXXXXXXXXXXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudapi_instance=groupdocs_comparison_cloud.CompareApi.from_keys(client_id,client_secret)source=groupdocs_comparison_cloud.FileInfo()source.file_path="source_files/word/source_protected.docx"source.password="1231"target=groupdocs_comparison_cloud.FileInfo()target.file_path="target_files/word/target_protected.docx"target.password="5784"target1=groupdocs_comparison_cloud.FileInfo()target1.file_path="target_files/word/target_1_protected.docx"target1.password="5784"target2=groupdocs_comparison_cloud.FileInfo()target2.file_path="target_files/word/target_2_protected.docx"target2.password="5784"options=groupdocs_comparison_cloud.ComparisonOptions()options.source_file=sourceoptions.target_files=[target,target1,target2]options.output_path="output/result.docx"request=groupdocs_comparison_cloud.ComparisonsRequest(options)response=api_instance.comparisons(request)
# For complete examples and data files, please go to https://github.com/groupdocs-comparison-cloud/groupdocs-comparison-cloud-ruby-samplesrequire'groupdocs_comparison_cloud'$client_id="XXXX-XXXX-XXXX-XXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloud$client_secret="XXXXXXXXXXXXXXXX"# Get ClientId and ClientSecret from https://dashboard.groupdocs.cloudapi_instance=GroupDocsComparisonCloud::CompareApi.from_keys($client_id,$client_secret)source=GroupDocsComparisonCloud::FileInfo.newsource.file_path="source_files/word/source_protected.docx"source.password="1231"target=GroupDocsComparisonCloud::FileInfo.newtarget.file_path="target_files/word/target_protected.docx"target.password="5784"target1=GroupDocsComparisonCloud::FileInfo.newtarget1.file_path="target_files/word/target_1_protected.docx"target1.password="5784"target2=GroupDocsComparisonCloud::FileInfo.newtarget2.file_path="target_files/word/target_2_protected.docx"target2.password="5784"options=GroupDocsComparisonCloud::ComparisonOptions.newoptions.source_file=sourceoptions.target_files=[target,target1,target2]options.output_path="output/result.docx"request=GroupDocsComparisonCloud::ComparisonsRequest.new(options)response=apiInstance.comparisons(request)
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.