@@ -52,22 +52,22 @@ public function getOne($id)
52
52
* Application auth key must be set.
53
53
*
54
54
* @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 )
56
56
*
57
57
* @return array
58
58
*/
59
59
public function getAll ($ limit = self ::DEVICES_LIMIT , $ offset = 0 )
60
60
{
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 ))),
63
63
'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 ), [
65
68
'headers ' => [
66
69
'Authorization ' => 'Basic ' . $ this ->api ->getConfig ()->getApplicationAuthKey (),
67
70
],
68
- 'json ' => [
69
- 'app_id ' => $ this ->api ->getConfig ()->getApplicationId (),
70
- ],
71
71
]);
72
72
}
73
73
@@ -224,13 +224,12 @@ public function onFocus($id, array $data)
224
224
*/
225
225
public function csvExport ()
226
226
{
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 , [
228
230
'headers ' => [
229
231
'Authorization ' => 'Basic ' . $ this ->api ->getConfig ()->getApplicationAuthKey (),
230
232
],
231
- 'json ' => [
232
- 'app_id ' => $ this ->api ->getConfig ()->getApplicationId (),
233
- ],
234
233
]);
235
234
}
236
235
0 commit comments