| @@ 52-59 (lines=8) @@ | ||
| 49 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
|
| 50 | * @throws \Freshdesk\Exceptions\ValidationException |
|
| 51 | */ |
|
| 52 | public function monitor($id, $userId) |
|
| 53 | { |
|
| 54 | $data = [ |
|
| 55 | 'user_id' => $userId |
|
| 56 | ]; |
|
| 57 | ||
| 58 | return $this->api()->request('POST', $this->endpoint($id . '/follow'), $data); |
|
| 59 | } |
|
| 60 | ||
| 61 | /** |
|
| 62 | * Unmonitor a resource |
|
| @@ 81-88 (lines=8) @@ | ||
| 78 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
|
| 79 | * @throws \Freshdesk\Exceptions\ValidationException |
|
| 80 | */ |
|
| 81 | public function unmonitor($id, $userId) |
|
| 82 | { |
|
| 83 | $query = [ |
|
| 84 | 'user_id' => $userId |
|
| 85 | ]; |
|
| 86 | ||
| 87 | return $this->api()->request('POST', $this->endpoint($id . '/follow'), null, $query); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * Monitor status |
|
| @@ 110-117 (lines=8) @@ | ||
| 107 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
|
| 108 | * @throws \Freshdesk\Exceptions\ValidationException |
|
| 109 | */ |
|
| 110 | public function monitorStatus($id, $userId) |
|
| 111 | { |
|
| 112 | $query = [ |
|
| 113 | 'user_id' => $userId |
|
| 114 | ]; |
|
| 115 | ||
| 116 | return $this->api()->request('GET', $this->endpoint($id . '/follow'), null, $query); |
|
| 117 | } |
|
| 118 | } |
|
| 119 | ||