@@ -52,22 +52,22 @@ public function getOne($id)
5252 * Application auth key must be set.
5353 *
5454 * @param int $limit Results offset (results are sorted by ID)
55- * @param int $offset How many devices to return (max 50 )
55+ * @param int $offset How many devices to return (max 300 )
5656 *
5757 * @return array
5858 */
5959 public function getAll ($ limit = self ::DEVICES_LIMIT , $ offset = 0 )
6060 {
61- return $ this -> api -> request ( ' GET ' , ' /players? ' . http_build_query ( [
62- 'limit ' => max (0 , min (self ::DEVICES_LIMIT , filter_var ($ limit , FILTER_VALIDATE_INT ))),
61+ $ query = [
62+ 'limit ' => max (1 , min (self ::DEVICES_LIMIT , filter_var ($ limit , FILTER_VALIDATE_INT ))),
6363 'offset ' => max (0 , min (self ::DEVICES_LIMIT , filter_var ($ offset , FILTER_VALIDATE_INT ))),
64- ]), [
64+ 'app_id ' => $ this ->api ->getConfig ()->getApplicationId (),
65+ ];
66+
67+ return $ this ->api ->request ('GET ' , '/players? ' . http_build_query ($ query ), [
6568 'headers ' => [
6669 'Authorization ' => 'Basic ' . $ this ->api ->getConfig ()->getApplicationAuthKey (),
6770 ],
68- 'json ' => [
69- 'app_id ' => $ this ->api ->getConfig ()->getApplicationId (),
70- ],
7171 ]);
7272 }
7373
@@ -224,13 +224,12 @@ public function onFocus($id, array $data)
224224 */
225225 public function csvExport ()
226226 {
227- return $ this ->api ->request ('POST ' , '/players/csv_export ' , [
227+ $ url = '/players/csv-export?app_id= ' . $ this ->api ->getConfig ()->getApplicationId ();
228+
229+ return $ this ->api ->request ('POST ' , $ url , [
228230 'headers ' => [
229231 'Authorization ' => 'Basic ' . $ this ->api ->getConfig ()->getApplicationAuthKey (),
230232 ],
231- 'json ' => [
232- 'app_id ' => $ this ->api ->getConfig ()->getApplicationId (),
233- ],
234233 ]);
235234 }
236235
0 commit comments