setAppKeyToken('MDMwZThjYWMtOWQ4ZC00YzU3LWIwNjktOGYzNTA2NjA3NTBh') ->setUserKeyToken('YTdmZGE5MGEtN2Y3Yi00Mzk0LTgyOGQtMGMzNDkzYTcxYmJh'); $this->apiInstance = new DefaultApi( new GuzzleHttp\Client(), $config ); } public function getPlayers() { $limit = 10; $getPlayersResult = $this->apiInstance->getPlayers('6bbd561f-4d8e-4d04-a6c4-dbef1bf99694', $limit); print_r($getPlayersResult->getPlayers()); } public function addPlayers() { $data=$this->request->post(); $user = User::getByUserId($data['user_id']); if ($user) { $user->group_id = $data['group_id']; $user->save(); }else{ User::create($data, true); } $this->success(); } function createNotification($enContent){ $content = new StringMap(); $content->setEn($enContent); $notification = new Notification(); $notification->setAppId('6bbd561f-4d8e-4d04-a6c4-dbef1bf99694'); $notification->setContents($content); $notification->setIncludedSegments(['SegmentA']); return $notification; } public function send(){ $notification = $this->createNotification(' wk Test notification'); $result = $this->apiInstance->createNotification($notification); print_r($result); } }