bulldog / lacrm
Less Annoying CRM 的 API 客户端
v0.1.0
2018-08-27 20:53 UTC
Requires (Dev)
- guzzlehttp/guzzle: ^6.3
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^7.3
- vlucas/phpdotenv: ^2.5
Suggests
- guzzlehttp/guzzle: You will need this if you don't want to write your own adapter.
This package is auto-updated.
Last update: 2024-09-05 19:04:34 UTC
README
一个简单的 Less Annoying CRM PHP 客户端。
安装
composer require bulldog/lacrm
用法
如果您不想自己编写适配器,您需要通过运行 composer require guzzlehttp/guzzle
来安装 guzzlehttp/guzzle
。如果您想编写自己的适配器,则需要在这个包中实现 ClientInterface
。如果您不确定该怎么做,可以通过运行 composer require guzzlehttp/guzzle
来安装 Guzzle。
简单客户端
<?php include 'vendor/autoload.php'; // If you installed Guzzle, then this will create and return the Client object $client = Bulldog\LaCrm\SimpleClient::create('UserCode', 'ApiToken'); $contact = new Bulldog\LaCrm\Endpoints\Contacts\CreateContact; $contact->FullName = "Levi"; $client->createContact($contact);