givey/givey

此包的最新版本(v0.2)没有可用的许可证信息。

PHP库,用于https://api.givey.com

v0.2 2015-03-12 18:04 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:11:10 UTC


README

这是一个预览版,请自行承担风险并报告您可能遇到的问题。如有任何疑问,请联系Givey 支持

Build Status Downloads Version Licence

用法

安装

{
    "require": {
        "givey/givey" : "*"
    }
}

设置资源和适配器

use Givey\Adapter\Buzz;
use Givey\Resource;

Resource::setAdapter(new Buzz($token));

用户

use Givey\User;

User::retrieve('scott'); // Givey\Entity\User
User::all(array('business_id' => 100); // array(Givey\Entity\User, Givey\Entity\User)

企业

use Givey\Business;

$business = Business::retrieve('giveybiz'); // Givey\Entity\Business
$business->employees(); // array(Givey\Entity\User, Givey\Entity\User)

慈善机构

use Givey\Charity;

Charity::retrieve('dogstrust'); // Givey\Entity\Charity
Charity::all(array('business_id' => 100); // array(Givey\Entity\Charity, Givey\Entity\Charity)