私はこれを使用してTrelloのAPIからデータを取得することができます。Trello API:メンバー、添付ファイル、カード情報を1回の呼び出しで入手できますか?
private function get_card_info($card_id) {
$client = new \GuzzleHttp\Client();
$base = $this->endpoint . $card_id;
$params = "?key=" . $this->api_key . "&token=" . $this->token;
$cardURL = $base . $params;
$membersURL = $base . "/members" . $params;
$attachmentsURL = $base . "/attachments" . $params;
$response = $client->get($cardURL);
$this->card_info['card'] = json_decode($response->getBody()->getContents());
$response = $client->get($membersURL);
$this->card_info['members'] = json_decode($response->getBody()->getContents());
$response = $client->get($attachmentsURL);
$this->card_info['attachments'] = json_decode($response->getBody()->getContents());
}
しかし、これは3つの呼び出しに分割されます。カード情報、メンバー情報、添付情報を一度に入手する方法はありますか? docsは&fields=name,id
を使用して言及していますが、基本呼び出しから返される内容をcards
エンドポイントに限定するように見えます。
私はカード情報が必要なたびにAPIを3回押す必要はありませんが、必要なすべてを収集する例は見つかりません。
私は私の個人的なラップトップに帰るとすぐにこれをチェックします。これはどこのドキュメントにありますか? –