- ACCOUNT_URL
- API_URL
Request::__construct($options)
Constructor
Set options.
$options
array|object - Optional. Options to set.
Request::account($method, $uri, $parameters, $headers)
Make a request to the "account" endpoint.
$method
string - The HTTP method to use.$uri
string - The URI to request.$parameters
string|array - Optional. Query string parameters or HTTP body, depending on $method.$headers
array - Optional. HTTP headers.
- array Response data.
- array|object body The response body. Type is controlled by the
return_assoc
option. - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by the
Request::api($method, $uri, $parameters, $headers)
Make a request to the "api" endpoint.
$method
string - The HTTP method to use.$uri
string - The URI to request.$parameters
string|array - Optional. Query string parameters or HTTP body, depending on $method.$headers
array - Optional. HTTP headers.
- array Response data.
- array|object body The response body. Type is controlled by the
return_assoc
option. - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by the
Request::getLastResponse()
Get the latest full response from the Spotify API.
- array Response data.
- array|object body The response body. Type is controlled by the
return_assoc
option. - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by the
Request::send($method, $url, $parameters, $headers)
Make a request to Spotify.
You'll probably want to use one of the convenience methods instead.
$method
string - The HTTP method to use.$url
string - The URL to request.$parameters
string|array|object - Optional. Query string parameters or HTTP body, depending on $method.$headers
array - Optional. HTTP headers.
- array Response data.
- array|object body The response body. Type is controlled by the
return_assoc
option. - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by the
Request::setOptions($options)
Set options
$options
array|object - Options to set.
- self