This project provides a PHP wrapper to the Entrecredits OAuth API. The API allows you (the Consumer) to perform a number of operations, including credit transfers, on behalf of an Entrecredits user in a secure fashion.
It is recommended that developers intending to use the API have a passing familiarity with OAuth ( http://oauth.net/ ), although it is not necessary in order to use the wrapper.
The API generally follows the OAuth terminology, the following terms will be useful in understanding this document:
- Service Provider
- Consumer
- User
Simply include EccOAuth.php and OAuth.php in your project. You may optionally want to include the examples such as cointoss.php for reference. The Curl PHP extension is required, and the json_decode function must be available (PHP 5.2 onwards natively).
ECC uses an HTTP API with JSON returns, authorized by OAuth 1.0A. The EccOAuth.php library provides a wrapper over this, making integration reasonably straightforward without requiring excessive understanding of OAuth.
The API allows the application to act on behalf of a user. This is known as “3-legged auth”, in which the User asks the Consumer (application) to access ECC and perform some action(s).
For a list of accessible methods, see the class EccClient in EccOAuth.php and examples in cointoss.php.
If you have any questions regarding the API at the moment, please contact Richard Clark <richard@redspider.co.nz>