Package Data | |
---|---|
Maintainer Username: | Ikstar |
Maintainer Contact: | petr@phone2action.com (Peter Arapov) |
Package Create Date: | 2017-01-09 |
Package Last Update: | 2017-01-30 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-04-25 15:06:32 |
Package Statistics | |
---|---|
Total Downloads: | 598 |
Monthly Downloads: | 3 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 37 |
Total Forks: | 1 |
Total Open Issues: | 0 |
This package implements a PHP wrapper to work with http://www.yourmembership.com/company/api-reference/
No Support for Versions below 5.1 (5.0 Untested)
Require this package with composer by adding the following to your composer file:
{
"require": {
"phone2action/ym-api": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/phone2action/ym-api"
}
]
}
After updating composer, add the service provider to the providers
array in config/app.php
P2A\YourMembership\YourMembershipServiceProvider::class,
You can publish the config file for this package
php artisan vendor:publish --provider="P2A\YourMembership\YourMembershipServiceProvider"
$client = app(P2A\YourMembership\YourMembershipClient::class,[$apiKey,$saPasscode]);
Instantiate the client
$guzzleClient = new \GuzzleHttp\Client();
$client = new P2A\YourMembership\YourMembershipClient($guzzleClient, $apiKey, $saPasscode)
Make API calls using this client
$response = $client->makeCall('Session.Create')->toArray();
echo $response['SessionID'];
$response = $client->makeCall('Session.Create')->toObject();
echo $response->SessionID;