hacocms/hacocms-php-sdk

v1.0.2 2023-04-19 07:42 UTC

This package is not auto-updated.

Last update: 2024-05-01 06:55:14 UTC


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');

ライセンス

MIT License