To make things easier for third-party developers, we developed a PHP class to handle most of the hard stuff in using the API. This class makes use of the cURL library to handle HTTP communication with the WishList Member API as well as all authentication requirements.
You can download the API Class for free Right Here.
To use the API class, you will need to put the following code at the top of your application
<?php include('wlmapiclass.php'); $api = new wlmapiclass('http://yourblog.com/', 'yourAPIKey'); $api->return_format = 'php'; // <- value can also be xml or json ?>
http://yourblog.com/ with the full URL of your WordPress installation.
yourAPIKey with the WishList Member API key found under the settings tab
Yup, that easy. Initializing the class handles all authentication requirements between your application and the WishList Member API.
It's best to put those 3 lines of code in a separate config file and include it on top of your application.
Support for Other Programming Languages
WishList Member only provides a PHP version of wlmapiclass at the moment and will only support official versions of this class. You are however allowed and encouraged to translate the class to any language of your choice if you need to.
API Class Methods
The WishList Member API makes use of the Create, Retrieve, Update and Delete (CRUD) model in managing data. To complement this, the API Class has four (4) methods that you can use to communicate with the WishList Member API. Each method represents one of the four (4) HTTP verbs that the API supports, namely:
With this four methods/verbs, it is possible to manipulate all data that is exposed by WishList Member through its API. You can learn more about the class methods here.