Skip to content

Commit 5f33f37

Browse files
GroupDocs.Viewer Cloud PHP SDK Examples
1 parent 8ab40a8 commit 5f33f37

File tree

8 files changed

+76
-13
lines changed

8 files changed

+76
-13
lines changed

Examples/CommonUtils.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ public static function GetViewerApiInstance() {
1616
// intializing the configuration
1717
$configuration = new GroupDocs\Viewer\Configuration();
1818

19-
CommonUtils::$AppSid = 'd215ce72-1609-4282-8d55-5810942236fb';
20-
CommonUtils::$AppKey = '715d18b0afef2f303882c769921fe05a';
21-
CommonUtils::$ApiBaseUrl = 'https://api.groupdocs.cloud';
22-
2319
// Seting the configurations
2420
$configuration->setAppSid(CommonUtils::$AppSid);
2521
$configuration->setAppKey(CommonUtils::$AppKey);
@@ -29,4 +25,17 @@ public static function GetViewerApiInstance() {
2925
return new GroupDocs\Viewer\ViewerApi($configuration);
3026
}
3127

28+
// Getting the Viewer API Instance
29+
public static function GetStorageApiInstance() {
30+
// intializing the configuration
31+
$configuration = new GroupDocs\Storage\Configuration();
32+
33+
// Seting the configurations
34+
$configuration->setAppSid(CommonUtils::$AppSid);
35+
$configuration->setAppKey(CommonUtils::$AppKey);
36+
37+
// Retrun the new ViewerAPI instance
38+
return new GroupDocs\Storage\Api\StorageApi($configuration);
39+
}
40+
3241
}

Examples/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "groupdocs/group-docs-viewer-s-d-k-examples",
3-
"description": "Description of project GroupDocs.Viewer.SDK.Examples.",
3+
"description": "Description of project group-docs-viewer-s-d-k-examples.",
44
"authors": [
55
{
66
"name": "GroupDocs",
77
"email": "your@email.here"
88
}
99
],
1010
"require": {
11-
"groupdocscloud/groupdocs-viewer-cloud": "*"
11+
"groupdocscloud/groupdocs-viewer-cloud": "*",
12+
"groupdocscloud/storage-sdk-php": "*"
1213
}
1314
}

Examples/composer.lock

Lines changed: 53 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<h1>
99
GroupDocs.Viewer Cloud SDK - Php Examples</h1>
1010
<p>
11-
Click on the link to execute the examples for respective outputs.</p>
11+
Please first <a href="Uploat_Test_Files.php" target="_blank">click here</a> to upload the test files to your default storage<br/>Click on the link to execute the examples for respective outputs.</p>
1212
<ul>
1313
<li>
1414
<h3>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
copy.src.files=false
22
copy.src.on.open=false
3-
copy.src.target=C:\\xampp\\htdocs\\PhpProject1
3+
copy.src.target=
4+
debug.url=DEFAULT_URL
45
index.file=index.php
56
run.as=LOCAL
6-
url=http://localhost:8000/GroupDocs.Viewer.SDK.Examples/
7+
url=http://localhost:8000/GroupDocs.Viewer.SDK.Examples/Examples

Examples/nbproject/private/private.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
44
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
55
<group>
6-
<file>file:/C:/xampp/htdocs/GroupDocs.Viewer.SDK.Examples/index.php</file>
7-
<file>file:/C:/xampp/htdocs/GroupDocs.Viewer.SDK.Examples/Working_With_Attachments/Attachments/Get_Attachment_From_Email_HTML.php</file>
6+
<file>file:/C:/xampp/htdocs/GroupDocs.Viewer.SDK.Examples/Examples/index.php</file>
87
</group>
98
</open-files>
109
</project-private>

Examples/nbproject/project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
browser.reload.on.save=true
12
include.path=${php.global.include.path}
23
php.version=PHP_70
34
source.encoding=UTF-8

Examples/nbproject/project.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<type>org.netbeans.modules.php.project</type>
44
<configuration>
55
<data xmlns="http://www.netbeans.org/ns/php-project/1">
6-
<name>GroupDocs.Viewer.SDK.Examples</name>
6+
<name>group-docs-viewer-s-d-k-examples</name>
77
</data>
88
</configuration>
99
</project>

0 commit comments

Comments
 (0)