2017 © Pedro Peláez
 

library edd-api-client

PHP Client For EDD API

image

calderawp/edd-api-client

PHP Client For EDD API

  • Saturday, June 24, 2017
  • by Shelob9
  • Repository
  • 3 Watchers
  • 3 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 4 % Grown

The README.md

edd-api-client

PHP HTTP Client For Easy Digital Downloads API, (*1)

Installation

composer require calderawp/edd-api-client, (*2)

  • Requires: PHP7.0+
  • Uses Guzzle 6

Usage

EDD Core

  • Create Client
  //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  );

Get Customers

  • Page 1, (*3)

    $customers = $site->customers();, (*4)

  • Page 2, (*5)

    $customers = $site->customers(2);, (*6)

  • 50 Customers $customers = $site->customers(1,50);, (*7)

  • Customer with ID 42, (*8)

    $customer = $site->customerr( 42 );, (*9)

Get Products

  • Page 1, (*10)

    $products = $site->products();, (*11)

  • Page 2, (*12)

    $products = $site->products(2);, (*13)

  • 50 Products, (*14)

    $products = $site->product(1,50);, (*15)

  • Prodcut with ID 42, (*16)

    $product = $site->product( 42 );, (*17)

Get Sales

  • Most recent, (*18)

    $sales = $site->sales();, (*19)

  • Sales by customer Email, (*20)

    $sales = $site->sales( 'roy@roysivan.com' );, (*21)

  • Sale with ID 42, (*22)

    $sals = $site->sale( 42 );, (*23)

EDD Recurring

NOTE: I submitted some pull requests to make this work, use the api-fix branch in my fork for now., (*24)

Get Subscriptions

$subscriptions = new \CalderaWP\EDD\API\Subscriptions( $client, $key, $token );
$page1 = $subscriptions->subscriptions();
$page2 = $subscriptions->subscriptions(2);

Get Subscription

$sub = $subscriptions->subscription(42);

License

Copyright 2016+ CalderaWP LLC. Licnesed under the GNU GPL V2+, (*25)

The Versions

24/06 2017

dev-master

9999999-dev

PHP Client For EDD API

  Sources   Download

GPL-2.0+

The Requires

 

wordpress

24/06 2017

2.0.0

2.0.0.0

PHP Client For EDD API

  Sources   Download

GPL-2.0+

The Requires

 

wordpress

14/01 2017

1.0.0

1.0.0.0

PHP Client For EDD API

  Sources   Download

GPL-2.0+

The Requires

 

wordpress