Missing API methods
Me again.
So far as I can tell, the following methods are missing:
'getCustomFields' => ['get', 'customFields/%s'],
https://developers.trello.com/v1.0/reference#customfieldsid-3
'getCustomFieldsOptions' => ['get', 'customFields/%s/options'],
https://developers.trello.com/v1.0/reference#customfieldsidoptions-1
'getCustomFieldsOption' => ['get', 'customFields/%s/options/%s'],
https://developers.trello.com/v1.0/reference#customfieldsidoptionsidcustomfieldoption-3
Or something along those lines. The Trello docs seem to state both customFields and customField inconsistently - I think the cURL example is a typo.
Cheers.
For the curious : if you want to fetch the custom fields information from a card, you can do the following :
$client->getBoardCards(
'xXxXxXx', // board ID
[
'customFieldItems' => true,
]
);
Which add the following to each card array :
"customFieldItems" => array:1 [
0 => array:5 [
"id" => "xXxXxXx"
"value" => array:1 [
"text" => "your custom value..."
]
"idCustomField" => "xXxXxXx"
"idModel" => "xXxXxXx"
"modelType" => "card"
]
]
See https://developers.trello.com/v1.0/docs/getting-started-custom-fields#section-getting-customfielditems-for-cards
@gnutix thanks for that. I recently discovered that myself (https://github.com/stevenmaguire/trello-php/issues/27#issuecomment-376102340) and I plan to submit a PR explaining that in the docs somewhere.
Cheers