Description Usage Arguments Details Value Author(s) Examples
View source: R/get_spotify_item.R
This function searches spotify item by name
1 2 3 | get_spotify_item(name = NULL, type, limit = 1, offset = 0,
access_token = DSpoty::get_spotify_access_token(), artist = NULL,
album = NULL)
|
name |
String of item name (artist, album, track...). Default: NULL |
type |
String of the search type. Possible values are 'artist', 'album' and 'track'. |
limit |
Integer indicating the max number of artists to return. Defaults to 1, max of 50. |
offset |
Integer indicating the offset of the first artist to return. Defaults to 0 (Spotify's API default value). |
access_token |
Spotify Web API token. Defaults to DSpoty::get_spotify_access_token() |
artist |
String of album's artist name. Default: NULL |
album |
String of album name. Default: NULL |
You have two options to use this function: Search by parameter name or search by parameters artist + album. In this second case, type must always be 'album'.
Returns a data frame with the item's information
Alberto Almuiña
1 2 3 4 5 6 | ## Not run:
get_spotify_item(name = 'Arctic Monkeys', type = 'artist')
get_spotify_item(artist = 'Leiva', album = 'Nuclear', type = 'album')
get_spotify_item(name = 'Do I Wanna Know?', type = 'track')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.