@@ -23,13 +23,13 @@ var appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
2323
2424// construct ConversionApi
2525var conversionApi = GroupDocs .ConversionApi .fromKeys (appSid, appKey);
26-
27- // retrieve supported file-formats
28- conversionApi .getSupportedFileFormats ( )
26+ var request = new GroupDocs.GetSupportedConversionTypesRequest ();
27+ // retrieve supported conversion types
28+ conversionApi .getSupportedConversionTypes (request )
2929 .then (function (response ) {
3030 console .log (" Supported file-formats:" )
31- response .formats . forEach (function (format ) {
32- console .log (format .fileFormat + " ( " + format .extension + " ) " );
31+ response .forEach (function (format ) {
32+ console .log (format .sourceFormat + " : [ " + format .targetFormats . join ( " , " ) + " ] " );
3333 });
3434 })
3535 .catch (function (error ) {
@@ -41,7 +41,7 @@ Or compile and run same written in TypeScript:
4141
4242``` ts
4343// load the module
44- import { ConversionApi } from " groupdocs-conversion-cloud" ;
44+ import { ConversionApi , GetSupportedConversionTypesRequest } from " groupdocs-conversion-cloud" ;
4545
4646// get your appSid and appKey at https://dashboard.groupdocs.cloud (free registration is required).
4747const appSid: string = " XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" ;
@@ -50,12 +50,14 @@ const appKey: string = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
5050// construct ConversionApi
5151const conversionApi: ConversionApi = ConversionApi .fromKeys (appSid , appKey );
5252
53+ const request: GetSupportedConversionTypesRequest = new GetSupportedConversionTypesRequest ();
54+
5355// retrieve supported file-formats
54- conversionApi .getSupportedFileFormats ( )
56+ conversionApi .getSupportedConversionTypes ( request )
5557 .then ((result ) => {
5658 console .log (" Supported file-formats:" );
57- result .formats . forEach ((format ) => {
58- console .log (format .fileFormat + " ( " + format .extension + " ) " );
59+ result .forEach ((format ) => {
60+ console .log (format .sourceFormat + " : [ " + format .targetFormats . join ( " , " ) + " ] " );
5961 });
6062 })
6163 .catch ((error ) => {
0 commit comments