芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/network.digitalhubbd.com/fns/hybridauth/Provider/TwitchTV.php
apiRequestHeaders['Client-ID'] = $this->clientId; } /** * {@inheritdoc} */ public function getUserProfile() { $response = $this->apiRequest('users'); $data = new Data\Collection($response); if (!$data->exists('data')) { throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); } $users = $data->filter('data')->values(); $user = new Data\Collection($users[0]); $userProfile = new User\Profile(); $userProfile->identifier = $user->get('id'); $userProfile->displayName = $user->get('display_name'); $userProfile->photoURL = $user->get('profile_image_url'); $userProfile->email = $user->get('email'); $userProfile->description = strip_tags($user->get('description')); $userProfile->profileURL = "https://www.twitch.tv/{$userProfile->displayName}"; return $userProfile; } }