1 | <?php |
||
13 | class Webhooks extends AbstractApi |
||
14 | { |
||
15 | protected $path = 'tokens/#id#/webhooks'; |
||
16 | |||
17 | /** |
||
18 | * Get webhooks related to a given token |
||
19 | * @link https://trello.com/docs/api/token/#get-1-tokens-token-webhooks |
||
20 | * |
||
21 | * @param string $id the token's id |
||
22 | * @param array $params optional parameters |
||
23 | * |
||
24 | * @return array |
||
25 | */ |
||
26 | 1 | public function all($id, array $params = array()) |
|
30 | |||
31 | /** |
||
32 | * Get a webhook |
||
33 | * @link https://trello.com/docs/api/token/#get-1-tokens-token-webhooks-idwebhook |
||
34 | * |
||
35 | * @param string $id the token's id |
||
36 | * @param string $webhookId the webhook's id |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | 1 | public function show($id, $webhookId) |
|
44 | |||
45 | /** |
||
46 | * Create a webhook |
||
47 | * @link https://trello.com/docs/api/token/#post-1-tokens-token-webhooks |
||
48 | * |
||
49 | * @param string $id the id of the token the webhook should be created on |
||
50 | * @param array $params optional attributes |
||
51 | * |
||
52 | * @return array card info |
||
53 | */ |
||
54 | 3 | public function create($id, array $params) |
|
60 | |||
61 | /** |
||
62 | * Update a webhook |
||
63 | * @link https://trello.com/docs/api/token/#put-1-tokens-token-webhooks |
||
64 | * |
||
65 | * @param string $id the id of the token the webhook is attached to |
||
66 | * @param array $params optional attributes |
||
67 | * |
||
68 | * @return array card info |
||
69 | */ |
||
70 | 3 | public function update($id, array $params) |
|
76 | |||
77 | /** |
||
78 | * Remove a webhook |
||
79 | * @link https://trello.com/docs/api/token/#delete-1-tokens-token-webhooks-idwebhook |
||
80 | * |
||
81 | * @param string $id the id of the token the webhook is attached to |
||
82 | * @param string $webhookId id of the webhook to remove |
||
83 | * |
||
84 | * @return array card info |
||
85 | */ |
||
86 | 1 | public function remove($id, $webhookId) |
|
90 | } |
||
91 |