Skip to content

Commit 4079089

Browse files
authored
Merge pull request #2 from daryush/feature/send-custom-field-item
Update custom field item on card
2 parents 60a1e65 + 38827df commit 4079089

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

lib/Trello/Api/Card/CustomFieldItems.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,24 @@ public function all($id, array $params = array())
3333

3434
return array_key_exists('customFieldItems', $data) ? $data['customFieldItems'] : array();
3535
}
36+
37+
/**
38+
* Update a given custom field value on a given card
39+
* @link https://developers.trello.com/docs/getting-started-custom-fields#section-setting-updating-customfielditems
40+
*
41+
* @param string $id the card's id or short link
42+
* @param string $customFieldId the card's id or short link
43+
* @param array $value the member's id
44+
*
45+
* @return array
46+
*/
47+
public function update($id, $customFieldId, $value = array())
48+
{
49+
$path = $this->getPath($id) . 'customField/' . rawurldecode($customFieldId) . '/item';
50+
51+
return $this->put(
52+
$path,
53+
$value
54+
);
55+
}
3656
}

0 commit comments

Comments
 (0)