Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 83 | All time: 10,060 This week: 524 |
Version | License | PHP version | Categories | |||
envato-php 1.0.3 | The PHP License | 5 | Web services |
Description | Author | |||
This class can get users, items and forums in Envato Market. Innovation Award
|
Envato-PHP is a PHP client for Envato API. You can easily integrate it with your all kind of PHP based projects. This package is also compatible with Laravel 5.
To install this package run this command in you terminal from project root
composer require nahid/envato-php
Goto config/app.php
and add this service provider in providers section
Nahid\EnvatoPHP\EnvatoServiceProvider::class,
and add this facade in facades section
'Envato' => Nahid\EnvatoPHP\Facades\Envato::class,
Run this command in your terminal
php artisan vendor:publish --provider="Nahid\EnvatoPHP\EnvatoServiceProvider"
after publishing your config file then open config/envato.php
and add your envato app credentials.
return [
"client_id" => 'envato_app_client_id',
'client_secret' => 'envato_app_client_secret',
"redirect_uri" => 'redirect_uri',
'app_name' => 'nahid-envato-app',
];
Thats it.
use Nahid\EnvatoPHP\Envato;
$config = [
"client_id" => 'envato_app_client_id',
'client_secret' => 'envato_app_client_secret',
"redirect_uri" => 'redirect_uri',
'app_name' => 'nahid-envato-app',
];
$envato = new Envato($config);
$user = $envato->me()->accounts();
var_dump($user->data);
But first you have to authenticate envato app. to get authenticate URL just use $envato->getAuthUrl()
.
use Nahid\EnvatoPHP\Facades\Envato;
$user = Envato::me()->accounts();
dd($user->data);
// For envato purchase code verify
use Nahid\EnvatoPHP\Facades\Envato;
$purchaseCode = 'purchase_code_here';
$purchaseVerify = Envato::me()->sale($purchaseCode);
if($purchaseVerify->getStatusCode() == 200) {
dd($purchaseVerify->data);
} else {
dd("Invalid Purchase Code");
}
Files (19) |
File | Role | Description | ||
---|---|---|---|---|
config (1 file) | ||||
src (2 files, 3 directories) | ||||
tests (2 files, 1 directory) | ||||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
readme.md | Doc. | Documentation |
Files (19) | / | src |
File | Role | Description | ||
---|---|---|---|---|
Api (6 files) | ||||
Facades (1 file) | ||||
HttpManager (2 files) | ||||
Envato.php | Class | Class source | ||
EnvatoServiceProvider.php | Class | Class source |
Files (19) | / | src | / | Api |
File | Role | Description |
---|---|---|
AbstractApi.php | Class | Class source |
Authentication.php | Class | Class source |
Forum.php | Class | Class source |
Market.php | Class | Class source |
Me.php | Class | Class source |
User.php | Class | Class source |
Files (19) | / | src | / | HttpManager |
File | Role | Description |
---|---|---|
RequestHandler.php | Class | Class source |
Response.php | Class | Class source |
Files (19) | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Facades (1 file) | ||||
EnvatoServiceProviderTest.php | Class | Class source | ||
TestCase.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.