get_spotify_item {DSpoty}R Documentation

Get Spotify Item

Description

This function searches spotify item by name

Usage

get_spotify_item(name = NULL, type, limit = 1, offset = 0,
  access_token = DSpoty::get_spotify_access_token(), artist = NULL,
  album = NULL)

Arguments

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

Details

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'.

Value

Returns a data frame with the item's information

Author(s)

Alberto AlmuiƱa

Examples

## 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)

[Package DSpoty version 0.1.0 Index]