PHP code example of calderawp / edd-api-client
1. Go to this page and download the library: Download calderawp/edd-api-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
calderawp / edd-api-client example snippets
//make a guzzle instance
$client = new GuzzleHttp\Client( [ 'base_uri' => 'https://something.com/edd-api/' ] );
$key = '5419894a576acf9e773cdcdd1a8f9613';
$token = '4198047e657734f58a18f3a4051a6af8';
//create site instance
$site = new \CalderaWP\EDD\API\Site( $client, $key, $token );
$subscriptions = new \CalderaWP\EDD\API\Subscriptions( $client, $key, $token );
$page1 = $subscriptions->subscriptions();
$page2 = $subscriptions->subscriptions(2);