Bånder

LastFmClient
in package

Table of Contents

Constants

BASE_URL  = 'https://ws.audioscrobbler.com/2.0/'

Properties

$auth  : AuthHandler
$lookup  : LookupHandler
$search  : SearchHandler
$tags  : TagHandler
$user  : UserHandler
$client  : Client
$credentialService  : LastFmCredentialService

Methods

__clone()  : mixed
Clone the handlers when cloning the client
__construct()  : mixed
clearSession()  : void
Reset session key for all handlers (logout)
forUser()  : static
Get authenticated client for a specific user
getBaseUrl()  : string
Get the base URL
getClient()  : Client
Get the HTTP client
getCredentialService()  : LastFmCredentialService
Get the credential service
getSessionKey()  : string|null
Get the current session key from credential service
hasValidCredentials()  : bool
Check if current user has valid credentials
isAuthenticated()  : bool
Check if the client is configured for authenticated requests
setSessionKey()  : void
Override session key for all handlers
withSessionKey()  : static
Create a clone of this client with a specific session key
injectCredentialService()  : void
Inject credential service into all handlers that extend BaseHandler

Constants

BASE_URL

public mixed BASE_URL = 'https://ws.audioscrobbler.com/2.0/'

Properties

Methods

__clone()

Clone the handlers when cloning the client

public __clone() : mixed

clearSession()

Reset session key for all handlers (logout)

public clearSession() : void

forUser()

Get authenticated client for a specific user

public forUser(User $user) : static
Parameters
$user : User
Return values
static

getBaseUrl()

Get the base URL

public getBaseUrl() : string
Return values
string

getClient()

Get the HTTP client

public getClient() : Client
Return values
Client

getSessionKey()

Get the current session key from credential service

public getSessionKey() : string|null
Return values
string|null

hasValidCredentials()

Check if current user has valid credentials

public hasValidCredentials() : bool
Return values
bool

isAuthenticated()

Check if the client is configured for authenticated requests

public isAuthenticated() : bool
Return values
bool

setSessionKey()

Override session key for all handlers

public setSessionKey(string|null $sessionKey) : void
Parameters
$sessionKey : string|null

withSessionKey()

Create a clone of this client with a specific session key

public withSessionKey(string|null $sessionKey) : static
Parameters
$sessionKey : string|null
Return values
static

injectCredentialService()

Inject credential service into all handlers that extend BaseHandler

private injectCredentialService() : void

        
On this page

Search results