- ACCOUNT_URL
- API_URL
- RETURN_ASSOC
- RETURN_OBJECT
array SpotifyWebAPI\Request::account(string $method, string $uri, array $parameters, array $headers)
Make a request to the "account" endpoint.
$methodstring - The HTTP method to use.$uristring - The URI to request.$parametersarray - Optional. Query string parameters or HTTP body, depending on $method.$headersarray - Optional. HTTP headers.
- array Response data.
- array|object body The response body. Type is controlled by
Request::setReturnType(). - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by
array SpotifyWebAPI\Request::api(string $method, string $uri, array $parameters, array $headers)
Make a request to the "api" endpoint.
$methodstring - The HTTP method to use.$uristring - The URI to request.$parametersarray - Optional. Query string parameters or HTTP body, depending on $method.$headersarray - Optional. HTTP headers.
- array Response data.
- array|object body The response body. Type is controlled by
Request::setReturnType(). - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by
array SpotifyWebAPI\Request::getLastResponse()
Get the latest full response from the Spotify API.
- array Response data.
- array|object body The response body. Type is controlled by
Request::setReturnType(). - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by
string SpotifyWebAPI\Request::getReturnType()
Get a value indicating the response body type.
- string A value indicating if the response body is an object or associative array.
array SpotifyWebAPI\Request::send(string $method, string $url, array $parameters, array $headers)
Make a request to Spotify.
You'll probably want to use one of the convenience methods instead.
$methodstring - The HTTP method to use.$urlstring - The URL to request.$parametersarray - Optional. Query string parameters or HTTP body, depending on $method.$headersarray - Optional. HTTP headers.
- array Response data.
- array|object body The response body. Type is controlled by
Request::setReturnType(). - array headers Response headers.
- int status HTTP status code.
- string url The requested URL.
- array|object body The response body. Type is controlled by
void SpotifyWebAPI\Request::setReturnType(string $returnType)
Set the return type for the response body.
$returnTypestring - One of the Request::RETURN_* constants.
- void