Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/droath/recurlyclient
Recurly API PHP Library
https://github.com/droath/recurlyclient
Last synced: 7 days ago
JSON representation
Recurly API PHP Library
- Host: GitHub
- URL: https://github.com/droath/recurlyclient
- Owner: droath
- Created: 2015-03-23T01:13:38.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-03T16:24:09.000Z (over 9 years ago)
- Last Synced: 2024-04-13T00:39:18.092Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 180 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Recurly Client
================[![Build Status](https://travis-ci.org/droath/RecurlyClient.svg?branch=master)](https://travis-ci.org/droath/RecurlyClient)
The Recurly Client library allows you to simply interact with the exposed RESTful API Services provided by [Recurly.com](https://recurly.com/).
We're using the PHP Guzzle library to construct the HTTP requests for the available Recurly web services. This will give us the opportunity to leverage Guzzle and its pluggable HTTP adapters. Hopefully it will make for a more feature rich experience when handling the Recurly web services.
## Requirements
The PHP library depends on PHP 5.4 or higher.
**NOTE:** Currently we don't support PHP:hhvm, due to HHVM not fully supporting the SimpleXMLIterator class.
## Installation
### Composer
If you're using [Composer](http://getcomposer.org/), you can simply add a dependency `droath/recurly_client` to your project's composer.json file. Here's a snippet of the composer.json.
{
"require": {
"droath/recurly_client": "*"
}
}## Usage
### Configuration
Set the Recurly API key and subdomain, which are defined within your [Recurly Account](https://app.recurly.com/login).```php
getRequestTypes();print $request_types;
```
#### Invoke
Display the Recurly response object based on the invoked request type action.```php
invoke('list')->execute();
} catch (Exception $e) {
// Handle errors here
}print $response;
```### Response
#### Extract
Simply extract the data that was retrieved from the Recurly web service. The data can be extracted from the response in the following formats: Array, JSON, or XML.```php
invoke('list')->execute();
} catch (Exception $e) {
// Handle errors here
}// Available formats are: array, json, xml.
$data = $response->getData()->extract('array');
```