| @@ 64-71 (lines=8) @@ | ||
| 61 | * |
|
| 62 | * @return array |
|
| 63 | */ |
|
| 64 | public function add(array $data) |
|
| 65 | { |
|
| 66 | $data = $this->resolverFactory->createAppResolver()->resolve($data); |
|
| 67 | ||
| 68 | return $this->api->request('POST', '/apps', [ |
|
| 69 | 'Authorization' => 'Basic '.$this->api->getConfig()->getUserAuthKey(), |
|
| 70 | ], json_encode($data)); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Update application with provided data. |
|
| @@ 83-90 (lines=8) @@ | ||
| 80 | * |
|
| 81 | * @return array |
|
| 82 | */ |
|
| 83 | public function update($id, array $data) |
|
| 84 | { |
|
| 85 | $data = $this->resolverFactory->createAppResolver()->resolve($data); |
|
| 86 | ||
| 87 | return $this->api->request('PUT', '/apps/'.$id, [ |
|
| 88 | 'Authorization' => 'Basic '.$this->api->getConfig()->getUserAuthKey(), |
|
| 89 | ], json_encode($data)); |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| @@ 77-84 (lines=8) @@ | ||
| 74 | * |
|
| 75 | * @return array |
|
| 76 | */ |
|
| 77 | public function add(array $data) |
|
| 78 | { |
|
| 79 | $data = $this->resolverFactory->createNotificationResolver()->resolve($data); |
|
| 80 | ||
| 81 | return $this->api->request('POST', '/notifications', [ |
|
| 82 | 'Authorization' => 'Basic '.$this->api->getConfig()->getApplicationAuthKey(), |
|
| 83 | ], json_encode($data)); |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * Open notification. |
|