Example #1
0
 public function indexAction()
 {
     $token = $this->gettoken();
     echo $token;
     die;
     $serverapi = new \ServerAPI($this->appKey, $this->appSecret);
     //刷新用户信息
     $serverapi->userRefresh($userId, $name = '', $portraitUri = '');
     //检查用户在线状态
     $serverapi->userCheckOnline($userId);
     //封禁用户   $minute,封禁时长,单位为分钟,最大值为43200分钟
     $serverapi->userBlock($userId, $minute);
     //解除用户封禁
     $serverapi->userUnBlock($userId);
     //获取被封禁用户信息
     $serverapi->userBlockQuery();
     //添加用户到黑名单  $blackUserId,被加黑的用户Id
     $serverapi->userBlacklistAdd($userId, $blackUserId = array());
     //获取某个用户的黑名单列表
     $serverapi->userBlacklistQuery($userId);
     //移除黑名单
     $serverapi->userBlacklistRemove($userId, $blackUserId = array());
 }