Givey PHP SDK
This is a preview release so please use at your own risk and report any issues you may experience. Contact Givey Support if you have any questions., (*1)
, (*2)
Usage
Install
``` json
{
"require": {
"givey/givey" : "*"
}
}, (*3)
### Setup Resource and Adapter
``` php
use Givey\Adapter\Buzz;
use Givey\Resource;
Resource::setAdapter(new Buzz($token));
Users
``` php
use Givey\User;, (*4)
User::retrieve('scott'); // Givey\Entity\User
User::all(array('business_id' => 100); // array(Givey\Entity\User, Givey\Entity\User), (*5)
### Businesses
``` php
use Givey\Business;
$business = Business::retrieve('giveybiz'); // Givey\Entity\Business
$business->employees(); // array(Givey\Entity\User, Givey\Entity\User)
Charities
``` php
use Givey\Charity;, (*6)
Charity::retrieve('dogstrust'); // Givey\Entity\Charity
Charity::all(array('business_id' => 100); // array(Givey\Entity\Charity, Givey\Entity\Charity)
```, (*7)