hacocms/hacocms-php-sdk

v1.1.0 2024-10-04 02:45 UTC

This package is auto-updated.

Last update: 2025-06-04 11:14:19 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');

Use Project-Draft-Token

$client = new HacoCMS\V1\HacoCMSApiClient('subdomain', 'access_token', 'project-draft-token');

ライセンス

MIT License