validate_parameters | R Documentation |
Assertions are made to give early and precise error messages for wrong API call parameters.
validate_parameters(
artists_or_tracks = NULL,
artist_or_user = NULL,
market = NULL,
country = NULL,
limit = NULL,
offset = NULL,
locale = NULL,
volume_percent = NULL,
time_range = NULL,
position_ms = NULL,
state = NULL,
include_meta_info = NULL
)
artists_or_tracks |
The type parameter must be either 'artists' or 'tracks'." |
artist_or_user |
"The type parameter must be either 'artist' or 'user'." |
market |
Optional. |
country |
Optional. |
limit |
Optional. The maximum number of items to return.
Default to |
offset |
Optional. The index of the first item to return.
Defaults to |
locale |
Optional. The desired language, consisting of an
ISO 639-1 language code and
an ISO 3166-1 alpha-2 country code, joined by an underscore. For example: |
volume_percent |
Required integer value. The volume to set.
Must be a value from 0 to 100 inclusive. Defaults to |
time_range |
Optional. Over what time frame the affinities are computed.
Valid values: long_term (calculated from several years of data and including all new data
as it becomes available), |
position_ms |
Optional. Integer indicating from what position to start playback. Must be a positive number. Passing in a position that is greater than the length of the track will cause the player to start playing the next song. |
state |
The state parameter must be exactly one of |
include_meta_info |
Optional. Boolean indicating whether to include full result,
with meta information such as |
These assertions are called from various wrapper functions. However, you can also call this function directly to make sure that you are adding (programatically) the correct parameters to a call.
All validate_parameters
parameters default to NULL
.
Asserts the correct parameter values for any values that are not NULL
.
A boolean if the parameter matches the Spotify Web API parameter range.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.