\duncan3dc\Sonos\Cloud\InterfacesUserInterface

Summary

Methods
Constants
request()
isAuthorised()
getUrl()
setCode()
getHouseholds()
getHousehold()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

request()

request(string  $method, string  $url, array  $data = array()) : \stdClass

Send a request to the API.

Parameters

string $method

The HTTP method of the request

string $url

The endpoint to send the request to

array $data

Any additional data to send with the request

Returns

\stdClass

isAuthorised()

isAuthorised() : boolean

Check if we have access to this users account.

Returns

boolean

getUrl()

getUrl() : string

Get the URL to send the user to for authorisation.

Returns

string

setCode()

setCode(string  $code) : void

Set the user's authorisation code after redirect.

Parameters

string $code

The code returned by the successful authorisation

getHouseholds()

getHouseholds() : \duncan3dc\Sonos\Cloud\Interfaces\iterable|array<mixed,\duncan3dc\Sonos\Cloud\Interfaces\HouseholdInterface>

Get all the households this user has access to.

Returns

\duncan3dc\Sonos\Cloud\Interfaces\iterable|array<mixed,\duncan3dc\Sonos\Cloud\Interfaces\HouseholdInterface>