-
Notifications
You must be signed in to change notification settings - Fork 2
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
Valdeci Jr
committed
Aug 10, 2017
1 parent
533562d
commit cb2ac5c
Showing
15 changed files
with
910 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
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,2 +1,24 @@ | ||
# samba-videos-api | ||
PHP library for the Samba Videos API. http://dev.sambatech.com/documentation/sambavideos/index.html | ||
# Samba Videos API | ||
|
||
PHP library for Samba Videos API. http://dev.sambatech.com/documentation/sambavideos/index.html | ||
|
||
|
||
## Requirements | ||
|
||
- PHP >= 5.6 | ||
- ext-curl | ||
- ext-json | ||
- [Unirest for PHP](https://github.com/Mashape/unirest-php) | ||
- [Monolog - Logging for PHP](https://github.com/Seldaek/monolog) | ||
|
||
|
||
## Installation | ||
|
||
```bash | ||
composer require izapbrasil/samba-videos-api | ||
``` | ||
|
||
|
||
## Contributors | ||
|
||
To see the contributors please visit the [contributors graph](https://github.com/izapbrasil/samba-videos-api/graphs/contributors). |
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 @@ | ||
{ | ||
"name": "izapbrasil/samba-videos-api", | ||
"description": "PHP library for Samba Videos API.", | ||
"type": "library", | ||
"homepage": "https://github.com/izapbrasil/samba-videos-api", | ||
"keywords": ["sambatech", "sambavideos", "samba-videos"], | ||
"license": "Apache-2.0", | ||
"authors": [ | ||
{ | ||
"name": "iZap", | ||
"homepage": "https://izap.com.br" | ||
}, | ||
{ | ||
"name": "Valdeci Jr", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"minimum-stability": "stable", | ||
"require": { | ||
"php": ">=5.6.0", | ||
"ext-curl": "*", | ||
"ext-json": "*", | ||
|
||
"mashape/unirest-php": "^3.0", | ||
"monolog/monolog": "^1.23" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"SambaVideos\\": "src/SambaVideos" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,40 @@ | ||
<?php | ||
/* | ||
* Copyright 2017 iZap | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
require_once '../vendor/autoload.php'; | ||
|
||
$access_token = 'ACCESS-TOKEN'; | ||
|
||
try { | ||
// Projects | ||
$project = \SambaVideos\Resource\Project::instance($access_token); | ||
$projects = $project->search(); | ||
$project_id = $projects[0]['id']; | ||
var_dump($projects); | ||
|
||
// Categories | ||
$category = \SambaVideos\Resource\Category::instance($access_token); | ||
$categories = $category->search(['pid' => $project_id]); | ||
var_dump($categories); | ||
|
||
// Medias | ||
$media = \SambaVideos\Resource\Media::instance($access_token); | ||
$medias = $media->search(['pid' => $project_id]); | ||
var_dump($medias); | ||
} catch (Exception $e) { | ||
var_dump($e); | ||
} | ||
|
Oops, something went wrong.