Skip to content

Commit f001f3a

Browse files
Merge pull request #5 from rizwanniazigroupdocs/master
Updated with Release 19.5
2 parents 970dac6 + 25c0b2a commit f001f3a

26 files changed

+45
-31
lines changed

Examples/CommonUtils.php

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ class CommonUtils {
1212
static $ApiBaseUrl = 'https://api.groupdocs.cloud';
1313
static $MyStorage = 'XXXXXX';
1414

15-
// Getting the Viewer API Instance
16-
public static function GetViewerApiInstance() {
15+
// Getting the View API Instance
16+
public static function GetViewApiInstance() {
1717
// intializing the configuration
1818
$configuration = new GroupDocs\Viewer\Configuration();
1919

@@ -22,11 +22,25 @@ public static function GetViewerApiInstance() {
2222
$configuration->setAppKey(CommonUtils::$AppKey);
2323
$configuration->setApiBaseUrl(CommonUtils::$ApiBaseUrl);
2424

25-
// Retrun the new ViewerAPI instance
26-
return new GroupDocs\Viewer\ViewerApi($configuration);
25+
// Retrun the new ViewAPI instance
26+
return new GroupDocs\Viewer\ViewApi($configuration);
2727
}
2828

29-
// Getting the Viewer StorageAPI API Instance
29+
// Getting the Info API Instance
30+
public static function GetInfoInstance() {
31+
// intializing the configuration
32+
$configuration = new GroupDocs\Viewer\Configuration();
33+
34+
// Seting the configurations
35+
$configuration->setAppSid(CommonUtils::$AppSid);
36+
$configuration->setAppKey(CommonUtils::$AppKey);
37+
$configuration->setApiBaseUrl(CommonUtils::$ApiBaseUrl);
38+
39+
// Retrun the new Info instance
40+
return new GroupDocs\Viewer\Info($configuration);
41+
}
42+
43+
// Getting the Viewer StorageAPI API Instance
3044
public static function GetStorageApiInstance() {
3145
// intializing the configuration
3246
$configuration = new GroupDocs\Viewer\Configuration();

Examples/Supported_File_Formats/Viewer_Php_Get_All_File_Formats.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$viewerApi = CommonUtils::GetViewerApiInstance();
6+
$infoApi = CommonUtils::GetInfoApiInstance();
77

8-
$response = $viewerApi->getSupportedFileFormats();
8+
$response = $infoApi->getSupportedFileFormats();
99

1010
echo '<b>Supported file formats<br /></b>';
1111
foreach ($response->getFormats() as $key => $format) {

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_CAD_Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_HTML_View_Format.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_Image_View_Format.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_Image_View_Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_Minimal_ViewOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_Project_Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_Render_Hidden_Pages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

Examples/Working_With_Document_Information/Viewer_Php_Get_Info_With_SpreadsheetOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
include(dirname(__DIR__) . '\CommonUtils.php');
44

55
try {
6-
$apiInstance = CommonUtils::GetViewerApiInstance();
6+
$apiInstance = CommonUtils::GetInfoApiInstance();
77

88
$viewOptions = new GroupDocs\Viewer\Model\ViewOptions();
99

0 commit comments

Comments
 (0)