-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
411 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.1.5 | ||
1.1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
use Filestack\FilestackClient; | ||
use Filestack\FilestackSecurity; | ||
use Filestack\Filelink; | ||
use Filestack\FilestackException; | ||
|
||
$test_api_key = 'YOUR_FILESTACK_API_KEY'; | ||
$test_secret = 'YOUR_FILESTACK_SECURITY_SECRET'; | ||
|
||
$security = new FilestackSecurity($test_secret); | ||
$client = new FilestackClient($test_api_key, $security); | ||
|
||
$file_handle = 'bzjSo5gAT76ra25sjk4c'; | ||
|
||
# get sfw flag with client | ||
$result_json = $client->getSafeForWork($file_handle); | ||
var_dump($result_json); | ||
|
||
# get sfw flag with filelink | ||
$filelink = new Filelink($file_handle, | ||
$test_api_key, $security); | ||
|
||
$json_result = $filelink->getSafeForWork(); | ||
var_dump($json_result); | ||
|
||
# example json result | ||
/* | ||
{ | ||
"sfw": true | ||
} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
use Filestack\FilestackClient; | ||
use Filestack\FilestackSecurity; | ||
use Filestack\Filelink; | ||
use Filestack\FilestackException; | ||
|
||
$test_api_key = 'YOUR_FILESTACK_API_KEY'; | ||
$test_secret = 'YOUR_FILESTACK_SECURITY_SECRET'; | ||
|
||
$security = new FilestackSecurity($test_secret); | ||
$client = new FilestackClient($test_api_key, $security); | ||
|
||
$file_handle = 'bzjSo5gAT76ra25sjk4c'; | ||
|
||
# get tags with client | ||
$result_json = $client->getTags($file_handle); | ||
var_dump($result_json); | ||
|
||
# get tags with filelink | ||
$filelink = new Filelink($file_handle, | ||
$test_api_key, $security); | ||
|
||
$json_result = $filelink->getTags(); | ||
var_dump($json_result); | ||
|
||
# example json result | ||
/* | ||
{ | ||
"tags": { | ||
"auto": { | ||
"accipitriformes": 58, | ||
"beak": 90, | ||
"bird": 97, | ||
"bird of prey": 95, | ||
"fauna": 84, | ||
"great grey owl": 89, | ||
"hawk": 66, | ||
"owl": 97, | ||
"vertebrate": 92, | ||
"wildlife": 81 | ||
}, | ||
"user": null | ||
} | ||
} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.