PHP Classes
elePHPant
Icontem

PHP Envato API: Get users, items and forums in Envato Market

Recommend this page to a friend!
  Info   View files Documentation   View files View files (19)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-06-11 (3 months ago) RSS 2.0 feedNot enough user ratingsTotal: 61 All time: 8,926 This week: 557Up
Version License PHP version Categories
envato-php 1.0.1The PHP License5Web services
Description Author

This class can get users, items and forums in Envato Market.

It can send HTTP requests to the Envato Market API Web server to perform several types of operations. Currently it can:

- Get the current user details, name, email, sales, earnings, purchases, buyer download, buyer purchases, statements, bookmarks and collections
- Get other user account details, badges, items and files
- Market collections, individual items, popular items, new items, random new items, item prices, categories, features, search for items, site users, site items, items as categories
- Forum active threads, last post of user, status of thread

Innovation Award
PHP Programming Innovation award nominee
February 2017
Number 4


Prize: One downloadable e-book of choice by O'Reilly
Envato is a well known site that is used by developers that want to sell their components.

This class can retrieve several types of interesting information about the developers and packages that they sell on Envato, like access statistics, sales, prizes, etc..

Manuel Lemos
  Performance   Level  
Name: Nahid Bin Azhar <contact>
Classes: 9 packages by
Country: Bangladesh Bangladesh
Age: 26
All time rank: 136523 in Bangladesh Bangladesh
Week rank: 67 Up1 in Bangladesh Bangladesh Up
Innovation award
Innovation award
Nominee: 3x

Winner: 2x

Details

Envato PHP

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.

Installation

To install this package run this command in you terminal from project root

composer require nahid/envato-php

For Laravel

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.

Usages

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().

For Laravel Usage

 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 folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagesrc (2 files, 3 directories)
Files folder imagetests (2 files, 1 directory)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file readme.md Doc. Documentation

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file envato.php Conf. Configuration script

  Files folder image Files  /  src  
File Role Description
Files folder imageApi (6 files)
Files folder imageFacades (1 file)
Files folder imageHttpManager (2 files)
  Plain text file Envato.php Class Class source
  Plain text file EnvatoServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Api  
File Role Description
  Plain text file AbstractApi.php Class Class source
  Plain text file Authentication.php Class Class source
  Plain text file Forum.php Class Class source
  Plain text file Market.php Class Class source
  Plain text file Me.php Class Class source
  Plain text file User.php Class Class source

  Files folder image Files  /  src  /  Facades  
File Role Description
  Plain text file Envato.php Class Class source

  Files folder image Files  /  src  /  HttpManager  
File Role Description
  Plain text file RequestHandler.php Class Class source
  Plain text file Response.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageFacades (1 file)
  Plain text file EnvatoServiceProviderTest.php Class Class source
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  Facades  
File Role Description
  Plain text file Envato.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:61
This week:0
All time:8,926
This week:557Up