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