@@ 47-57 (lines=11) @@ | ||
44 | * |
|
45 | * @return array |
|
46 | */ |
|
47 | public function getAll($limit = self::NOTIFICATIONS_LIMIT, $offset = 0) |
|
48 | { |
|
49 | return $this->api->request('GET', '/notifications?' . http_build_query([ |
|
50 | 'limit' => max(0, min(self::NOTIFICATIONS_LIMIT, filter_var($limit, FILTER_VALIDATE_INT))), |
|
51 | 'offset' => max(0, min(self::NOTIFICATIONS_LIMIT, filter_var($offset, FILTER_VALIDATE_INT))), |
|
52 | ]), [ |
|
53 | 'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(), |
|
54 | ], json_encode([ |
|
55 | 'app_id' => $this->api->getConfig()->getApplicationId(), |
|
56 | ])); |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * Send new notification with provided data. |
@@ 51-61 (lines=11) @@ | ||
48 | * |
|
49 | * @return array |
|
50 | */ |
|
51 | public function getAll($limit = self::DEVICES_LIMIT, $offset = 0) |
|
52 | { |
|
53 | return $this->api->request('GET', '/players?' . http_build_query([ |
|
54 | 'limit' => max(0, min(self::DEVICES_LIMIT, filter_var($limit, FILTER_VALIDATE_INT))), |
|
55 | 'offset' => max(0, min(self::DEVICES_LIMIT, filter_var($offset, FILTER_VALIDATE_INT))), |
|
56 | ]), [ |
|
57 | 'Authorization' => 'Basic ' . $this->api->getConfig()->getApplicationAuthKey(), |
|
58 | ], json_encode([ |
|
59 | 'app_id' => $this->api->getConfig()->getApplicationId(), |
|
60 | ])); |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * Register a device for your application. |