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