hacocms / hacocms-php-sdk
hacoCMS PHP SDK
v1.1.0
2024-10-04 02:45 UTC
Requires
- ext-json: *
- guzzlehttp/guzzle: 7.*
Requires (Dev)
- phpunit/phpunit: ^9.5
README
Install
$ composer require hacocms/hacocms-php-sdk
Usage
Call list api
- リスト形式APIのコール
$client = new HacoCMS\V1\HacoCMSApiClient('subdomain', 'access_token'); // https://[subdomain].hacocms.com/api/v1/[endpoint] $res = $client->list('endpoint');
Call listSingleContent api
- リスト形式APIのコール
- (リスト内の単一コンテンツを取得する)
$client = new HacoCMS\V1\HacoCMSApiClient('subdomain', 'access_token'); // https://[subdomain].hacocms.com/api/v1/[endpoint]/[content_id] $res = $client->listSingleContent('endpoint', 'content_id');
Call single api.
- シングル形式APIのコール
$client = new HacoCMS\V1\HacoCMSApiClient('subdomain', 'access_token'); // https://[subdomain].hacocms.com/api/v1/[endpoint] $res = $client->single('endpoint');
Use Project-Draft-Token
$client = new HacoCMS\V1\HacoCMSApiClient('subdomain', 'access_token', 'project-draft-token');
ライセンス
MIT License