Skip to content

Commit 3d0cb0a

Browse files
committed
New live example: show all webhooks
1 parent 428a3d3 commit 3d0cb0a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

examples/all_webhooks.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
namespace Webhooks\Wrapper;
3+
4+
set_include_path('..');
5+
6+
require "vendor/autoload.php";
7+
8+
require ".config";
9+
10+
$client = new Trello\Client();
11+
$client->authenticate($key, $token, Trello\Client::AUTH_URL_CLIENT_ID);
12+
13+
$trello = new Trello($client);
14+
$webhooks = $trello->getWebhooks($token);
15+
16+
foreach ($webhooks as $webhook) {
17+
print_r($trello->getWebhook($webhook['id']));
18+
}
19+

lib/Trello/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
namespace Webhooks\Wrapper\Trello;
1010

1111

12+
use Trello\Api\ApiInterface;
13+
1214
class Client extends \Trello\Client
1315
{
1416

0 commit comments

Comments
 (0)