PHP 클래스 SpotifyWebAPI\Session

파일 보기 프로젝트 열기: jwilsson/spotify-web-api-php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$accessToken
$clientId
$clientSecret
$expirationTime
$redirectUri
$refreshToken
$request

공개 메소드들

메소드 설명
__construct ( string $clientId, string $clientSecret, string $redirectUri = '', Request $request = null ) 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.

메소드 상세

__construct() 공개 메소드

Constructor Set up client credentials.
public __construct ( string $clientId, string $clientSecret, string $redirectUri = '', Request $request = null )
$clientId string The client ID.
$clientSecret string The client secret.
$redirectUri string Optional. The redirect URI.
$request Request Optional. The Request object to use.

getAccessToken() 공개 메소드

Get the access token.
public getAccessToken ( ) : string
리턴 string The access token.

getAuthorizeUrl() 공개 메소드

Get the authorization URL.
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.

getClientId() 공개 메소드

Get the client ID.
public getClientId ( ) : string
리턴 string The client ID.

getClientSecret() 공개 메소드

Get the client secret.
public getClientSecret ( ) : string
리턴 string The client secret.

getRedirectUri() 공개 메소드

Get the client's redirect URI.
public getRedirectUri ( ) : string
리턴 string The redirect URI.

getRefreshToken() 공개 메소드

Get the refresh token.
public getRefreshToken ( ) : string
리턴 string The refresh token.

getTokenExpiration() 공개 메소드

Get the access token expiration time.
public getTokenExpiration ( ) : integer
리턴 integer A Unix timestamp indicating the token expiration time.

refreshAccessToken() 공개 메소드

Refresh an access token.
public refreshAccessToken ( string $refreshToken ) : boolean
$refreshToken string The refresh token to use.
리턴 boolean Whether the access token was successfully refreshed.

requestAccessToken() 공개 메소드

Request an access token given an authorization code.
public requestAccessToken ( string $authorizationCode ) : boolean
$authorizationCode string The authorization code from Spotify.
리턴 boolean True when the access token was successfully granted, false otherwise.

requestCredentialsToken() 공개 메소드

Request an access token using the Client Credentials Flow.
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.

setClientId() 공개 메소드

Set the client ID.
public setClientId ( string $clientId ) : void
$clientId string The client ID.
리턴 void

setClientSecret() 공개 메소드

Set the client secret.
public setClientSecret ( string $clientSecret ) : void
$clientSecret string The client secret.
리턴 void

setRedirectUri() 공개 메소드

Set the client's redirect URI.
public setRedirectUri ( string $redirectUri ) : void
$redirectUri string The redirect URI.
리턴 void

프로퍼티 상세

$accessToken 보호되어 있는 프로퍼티

protected $accessToken

$clientId 보호되어 있는 프로퍼티

protected $clientId

$clientSecret 보호되어 있는 프로퍼티

protected $clientSecret

$expirationTime 보호되어 있는 프로퍼티

protected $expirationTime

$redirectUri 보호되어 있는 프로퍼티

protected $redirectUri

$refreshToken 보호되어 있는 프로퍼티

protected $refreshToken

$request 보호되어 있는 프로퍼티

protected $request