Свойство | Тип | Описание | |
---|---|---|---|
$accessToken | |||
$clientId | |||
$clientSecret | |||
$expirationTime | |||
$redirectUri | |||
$refreshToken | |||
$request |
Метод | Описание | |
---|---|---|
__construct ( string $clientId, string $clientSecret, string $redirectUri = '', |
Constructor Set up client credentials. | |
getAccessToken ( ) : string | Get the access token. | |
getAuthorizeUrl ( array | object $options = [] ) : string | Get the authorization URL. | |
getClientId ( ) : string | Get the client ID. | |
getClientSecret ( ) : string | Get the client secret. | |
getRedirectUri ( ) : string | Get the client's redirect URI. | |
getRefreshToken ( ) : string | Get the refresh token. | |
getTokenExpiration ( ) : integer | Get the access token expiration time. | |
refreshAccessToken ( string $refreshToken ) : boolean | Refresh an access token. | |
requestAccessToken ( string $authorizationCode ) : boolean | Request an access token given an authorization code. | |
requestCredentialsToken ( array $scope = [] ) : boolean | Request an access token using the Client Credentials Flow. | |
setClientId ( string $clientId ) : void | Set the client ID. | |
setClientSecret ( string $clientSecret ) : void | Set the client secret. | |
setRedirectUri ( string $redirectUri ) : void | Set the client's redirect URI. |
public getAccessToken ( ) : string | ||
Результат | string | The access token. |
public getAuthorizeUrl ( array | object $options = [] ) : string | ||
$options | array | object | Optional. Options for the authorization URL. - array scope Optional. Scope(s) to request from the user. - boolean show_dialog Optional. Whether or not to force the user to always approve the app. Default is false. - string state Optional. A CSRF token. |
Результат | string | The authorization URL. |
public getClientId ( ) : string | ||
Результат | string | The client ID. |
public getClientSecret ( ) : string | ||
Результат | string | The client secret. |
public getRedirectUri ( ) : string | ||
Результат | string | The redirect URI. |
public getRefreshToken ( ) : string | ||
Результат | string | The refresh token. |
public getTokenExpiration ( ) : integer | ||
Результат | integer | A Unix timestamp indicating the token expiration time. |
public refreshAccessToken ( string $refreshToken ) : boolean | ||
$refreshToken | string | The refresh token to use. |
Результат | boolean | Whether the access token was successfully refreshed. |
public requestAccessToken ( string $authorizationCode ) : boolean | ||
$authorizationCode | string | The authorization code from Spotify. |
Результат | boolean | True when the access token was successfully granted, false otherwise. |
public requestCredentialsToken ( array $scope = [] ) : boolean | ||
$scope | array | Optional. Scope(s) to request from the user. |
Результат | boolean | True when an access token was successfully granted, false otherwise. |
public setClientId ( string $clientId ) : void | ||
$clientId | string | The client ID. |
Результат | void |
public setClientSecret ( string $clientSecret ) : void | ||
$clientSecret | string | The client secret. |
Результат | void |
public setRedirectUri ( string $redirectUri ) : void | ||
$redirectUri | string | The redirect URI. |
Результат | void |