Easy Digital Downloads
  • Package
  • Class
  • Tree

Packages

  • EDD
    • Admin
      • Actions
      • Add-ons
      • Dashboard
      • Discounts
      • Downloads
      • Export
      • Notices
      • Pages
      • Payments
      • Reports
      • Settings
      • System
      • Upgrades
      • Upload
      • Welcome
    • Cart
    • Checkout
    • Classes
      • API
      • Fees
      • HTML
      • Roles
      • Session
    • Emails
    • Functions
      • AJAX
      • Compatibility
      • Errors
      • Formatting
      • Install
      • Login
      • Taxes
      • Templates
    • Gateways
    • Logging
    • Payments
    • Shortcodes
    • Widgets

Classes

  • EDD_API

Class EDD_API

EDD_API Class

Renders API returns as a JSON/XML array

Package: EDD\Classes\API
Copyright: Copyright (c) 2013, Pippin Williamson
License: GNU Public License
Since: 1.5
Located at includes/class-edd-api.php

Methods summary

public
# __construct( )

Setup the EDD API

Setup the EDD API

Author

Daniel J Griffiths

Since

1.5
public
# add_endpoint( array $rewrite_rules )

Registers a new rewrite endpoint for accessing the API

Registers a new rewrite endpoint for accessing the API

Parameters

$rewrite_rules
array
$rewrite_rules WordPress Rewrite Rules

Author

Daniel J Griffiths

Since

1.5
public array
# query_vars( array $vars )

Registers query vars for API access

Registers query vars for API access

Parameters

$vars
array
$vars Query vars

Returns

array
$vars New query vars

Author

Daniel J Griffiths

Since

1.5
public mixed
# get_user( integer $key = '' )

Retrieve the user ID based on the public key provided

Retrieve the user ID based on the public key provided

Parameters

$key
integer
$key Public Key

Returns

mixed
string if user ID is found, false otherwise

Since

1.5.1
public
# missing_auth( )

Displays a missing authentication error if all the parameters aren't provided

Displays a missing authentication error if all the parameters aren't provided

Author

Daniel J Griffiths

Since

1.5

Uses

EDD_API::output()
public
# invalid_auth( )

Displays an authentication failed error if the user failed to provide valid credentials

Displays an authentication failed error if the user failed to provide valid credentials

Since

1.5

Uses

EDD_API::output()
public
# invalid_key( )

Displays an invalid API key error if the API key provided couldn't be validated

Displays an invalid API key error if the API key provided couldn't be validated

Author

Daniel J Griffiths

Since

1.5

Uses

EDD_API::output()
public
# process_query( )

Listens for the API and then processes the API requests

Listens for the API and then processes the API requests

Author

Daniel J Griffiths

Since

1.5
public array
# get_customers( integer $customer = null )

Process Get Customers API Request

Process Get Customers API Request

Parameters

$customer
integer
$customer Customer ID

Returns

array
$customers Multidimensional array of the customers

Author

Daniel J Griffiths

Since

1.5
public array
# get_products( integer $product = null )

Process Get Products API Request

Process Get Products API Request

Parameters

$product
integer
$product Product (Download) ID

Returns

array
$customers Multidimensional array of the products

Author

Daniel J Griffiths

Since

1.5
public
# get_stats( array $args = array() )

Process Get Stats API Request

Process Get Stats API Request

Parameters

$args
array
$args Arguments provided by API Request

Author

Daniel J Griffiths

Since

1.5
public array
# get_recent_sales( )

Retrieves Recent Sales

Retrieves Recent Sales

Returns

array

Since

1.5
public
# output( array $data )

Output Query in either JSON/XML. The query data is outputted as JSON by default

Output Query in either JSON/XML. The query data is outputted as JSON by default

Parameters

$data
array
$data

Author

Daniel J Griffiths

Since

1.5

Used by

EDD_API::missing_auth()
EDD_API::invalid_auth()
EDD_API::invalid_key()
public
# user_key_field( object $user )

Modify User Profile

Modify User Profile

Modifies the output of profile.php to add key generation/revocation

Parameters

$user
object
$user Current user info

Author

Daniel J Griffiths

Since

1.5
public
# update_key( integer $user_id )

Generate and Save API key

Generate and Save API key

Generates the key requested by user_key_field and stores it in the database

Parameters

$user_id
integer
$user_id

Author

Daniel J Griffiths

Since

1.5

Magic methods summary

Easy Digital Downloads API documentation generated by ApiGen 2.8.0