Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Run CI for R using https://eddelbuettel.github.io/r-ci/

name: ci

on:
push:
pull_request:

env:
_R_CHECK_FORCE_SUGGESTS_: "false"

jobs:
ci:
strategy:
matrix:
include:
- {os: macos-latest}
- {os: ubuntu-latest}

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v6

- name: Setup
uses: eddelbuettel/github-actions/r-ci@master
with:
dev_version: 'TRUE'
backend: 'RAPT'

- name: Dependencies
run: ./run.sh install_deps

- name: Test
run: ./run.sh run_tests

#- name: Coverage
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: ./run.sh coverage
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
15 changes: 4 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
Package: tinyspotifyr
Title: Tinyverse R Wrapper for the 'Spotify' Web API
Version: 0.2.2
Authors@R: c(person("Troy", "Hernandez", email = "troy.hernandez.phd@gmail.com", role = c("aut", "cre")), person("Charlie", "Thompson", email = "chuck@rcharlie.com", role = c("aut")), person("Josiah", "Parry", email = "josiah.parry@yahoo.com", role = "aut"), person("Donal", "Phipps", email = "donal.phipps@gmail.com", role = "aut"), person("Tom", "Wolff", email = "tom.wolff@duke.edu", role = "aut"))
Author: Troy Hernandez [aut, cre],
Charlie Thompson [aut],
Josiah Parry [aut],
Donal Phipps [aut],
Tom Wolff [aut]
Maintainer: Troy Hernandez <troy.hernandez.phd@gmail.com>
Description: An R wrapper for the 'Spotify' Web API
Authors@R: c(person("Troy", "Hernandez", email = "troy@cornball.ai", role = c("aut", "cre"), comment = c(ORCID = "0009-0005-4248-604X")), person("Charlie", "Thompson", email = "chuck@rcharlie.com", role = c("aut")), person("Josiah", "Parry", email = "josiah.parry@yahoo.com", role = "aut"), person("Donal", "Phipps", email = "donal.phipps@gmail.com", role = "aut"), person("Tom", "Wolff", email = "tom.wolff@duke.edu", role = "aut"))
Description: An R wrapper for the 'Spotify' Web API
<https://developer.spotify.com/web-api/>.
Depends: R (>= 3.2)
Imports:
Expand All @@ -17,6 +11,5 @@ Imports:
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
URL: https://github.com/TroyHernandez/tinyspotifyr
BugReports: https://github.com/TroyHernandez/tinyspotifyr/issues
URL: https://github.com/cornball-ai/tinyspotifyr
BugReports: https://github.com/cornball-ai/tinyspotifyr/issues
9 changes: 5 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by roxygen2: do not edit by hand
# tinyrox says don't edit this manually, but it can't stop you!

export(add_items_to_playlist)
export(add_latest_to_playlist)
Expand Down Expand Up @@ -66,15 +66,16 @@ export(toggle_my_shuffle)
export(transfer_my_playback)
export(unfollow_playlist)
export(verify_result)
importFrom(httr,GET)
importFrom(httr,RETRY)

importFrom(httr,accept_json)
importFrom(httr,authenticate)
importFrom(httr,config)
importFrom(httr,content)
importFrom(httr,oauth2.0_token)
importFrom(httr,GET)
importFrom(httr,oauth_app)
importFrom(httr,oauth_endpoint)
importFrom(httr,oauth2.0_token)
importFrom(httr,RETRY)
importFrom(httr,stop_for_status)
importFrom(jsonlite,fromJSON)
importFrom(jsonlite,toJSON)
9 changes: 3 additions & 6 deletions R/tinyspotifyr.R
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#' \code{tinyspotifyr} package
#'
#' A Quick and Easy Wrapper for Spotify's Web API
#' tinyspotifyr: A Quick and Easy Wrapper for Spotify's Web API
#'
#' See the README on
#' \href{https://github.com/troyhernandez/tinyspotifyr#readme}{GitHub}
#'
#' @docType package
#' @name tinyspotifyr
#' @importFrom httr RETRY GET accept_json authenticate config content oauth2.0_token oauth_app oauth_endpoint stop_for_status
#' @importFrom jsonlite fromJSON toJSON
NULL
#' @keywords internal
"_PACKAGE"

globalVars <- c(
"album_name",
Expand Down
12 changes: 3 additions & 9 deletions man/add_items_to_playlist.Rd
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/playlists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{add_items_to_playlist}
\alias{add_items_to_playlist}
\title{Add one or more tracks to a user’s playlist.}
\usage{
add_items_to_playlist(
playlist_id,
uris,
position = NULL,
market = "US",
authorization = get_spotify_authorization_code()
)
add_items_to_playlist(playlist_id, uris, position = NULL, market = "US",
authorization = get_spotify_authorization_code())
}
\arguments{
\item{playlist_id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the playlist.}
Expand Down
12 changes: 3 additions & 9 deletions man/add_latest_to_playlist.Rd
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/playlists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{add_latest_to_playlist}
\alias{add_latest_to_playlist}
\title{Add the latest episode of a podcast to a user’s playlist.}
\usage{
add_latest_to_playlist(
playlist_id,
uri,
position = NULL,
market = "US",
authorization = get_spotify_authorization_code()
)
add_latest_to_playlist(playlist_id, uri, position = NULL, market = "US",
authorization = get_spotify_authorization_code())
}
\arguments{
\item{playlist_id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the playlist.}
Expand Down
12 changes: 3 additions & 9 deletions man/add_tracks_to_playlist.Rd
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/playlists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{add_tracks_to_playlist}
\alias{add_tracks_to_playlist}
\title{Add one or more tracks to a user’s playlist.}
\usage{
add_tracks_to_playlist(
playlist_id,
uris,
position = NULL,
market = NULL,
authorization = get_spotify_authorization_code()
)
add_tracks_to_playlist(playlist_id, uris, position = NULL, market = NULL,
authorization = get_spotify_authorization_code())
}
\arguments{
\item{playlist_id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the playlist.}
Expand Down
14 changes: 4 additions & 10 deletions man/change_playlist_details.Rd
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/playlists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{change_playlist_details}
\alias{change_playlist_details}
\title{Change a playlist’s name and public/private state. (The user must, of course, own the playlist.)}
\usage{
change_playlist_details(
playlist_id,
name = NULL,
public = NULL,
collaborative = NULL,
description = NULL,
authorization = get_spotify_authorization_code()
)
change_playlist_details(playlist_id, name = NULL, public = NULL,
collaborative = NULL, description = NULL,
authorization = get_spotify_authorization_code())
}
\arguments{
\item{playlist_id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the playlist.}
Expand Down
3 changes: 1 addition & 2 deletions man/check_me_following.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/follow.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{check_me_following}
\alias{check_me_following}
\title{Check if Current User Follows Artists or Users}
Expand Down
10 changes: 3 additions & 7 deletions man/check_users_following.Rd
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/follow.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{check_users_following}
\alias{check_users_following}
\title{Check if Users Follow a Playlist}
\usage{
check_users_following(
playlist_id,
ids,
authorization = get_spotify_authorization_code()
)
check_users_following(playlist_id, ids,
authorization = get_spotify_authorization_code())
}
\arguments{
\item{playlist_id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} of the playlist.}
Expand Down
14 changes: 4 additions & 10 deletions man/create_playlist.Rd
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/playlists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{create_playlist}
\alias{create_playlist}
\title{Create a playlist for a Spotify user. (The playlist will be empty until you add tracks.)}
\usage{
create_playlist(
user_id,
name,
public = TRUE,
collaborative = FALSE,
description = NULL,
authorization = get_spotify_authorization_code()
)
create_playlist(user_id, name, public = TRUE, collaborative = FALSE,
description = NULL,
authorization = get_spotify_authorization_code())
}
\arguments{
\item{user_id}{Required. The user's \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify user ID}.}
Expand Down
10 changes: 3 additions & 7 deletions man/follow_artists_or_users.Rd
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/follow.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{follow_artists_or_users}
\alias{follow_artists_or_users}
\title{Add the current user as a follower of one or more artists or other Spotify users.}
\usage{
follow_artists_or_users(
type,
ids,
authorization = get_spotify_authorization_code()
)
follow_artists_or_users(type, ids,
authorization = get_spotify_authorization_code())
}
\arguments{
\item{type}{Required. The ID type: either \code{"artist"} or \code{"user"}.}
Expand Down
10 changes: 3 additions & 7 deletions man/follow_playlist.Rd
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/follow.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{follow_playlist}
\alias{follow_playlist}
\title{Add the current user as a follower of a playlist.}
\usage{
follow_playlist(
playlist_id,
public = FALSE,
authorization = get_spotify_authorization_code()
)
follow_playlist(playlist_id, public = FALSE,
authorization = get_spotify_authorization_code())
}
\arguments{
\item{playlist_id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} of the playlist. Any playlist can be followed, regardless of its \href{https://developer.spotify.com/documentation/general/guides/working-with-playlists/#public-private-and-collaborative-status}{public/private status}, as long as you know its playlist ID.}
Expand Down
3 changes: 1 addition & 2 deletions man/get_album.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/albums.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_album}
\alias{get_album}
\title{Get Spotify catalog information for a single album.}
Expand Down
14 changes: 4 additions & 10 deletions man/get_album_tracks.Rd
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/albums.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_album_tracks}
\alias{get_album_tracks}
\title{Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.}
\usage{
get_album_tracks(
id,
limit = 20,
offset = 0,
market = NULL,
authorization = get_spotify_access_token(),
include_meta_info = FALSE
)
get_album_tracks(id, limit = 20, offset = 0, market = NULL,
authorization = get_spotify_access_token(),
include_meta_info = FALSE)
}
\arguments{
\item{id}{Required. The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the album.}
Expand Down
11 changes: 3 additions & 8 deletions man/get_albums.Rd
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/albums.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_albums}
\alias{get_albums}
\title{Get Spotify catalog information for multiple albums identified by their Spotify IDs.}
\usage{
get_albums(
ids,
market = NULL,
authorization = get_spotify_access_token(),
include_meta_info = FALSE
)
get_albums(ids, market = NULL, authorization = get_spotify_access_token(),
include_meta_info = FALSE)
}
\arguments{
\item{ids}{Required. A character vector of the \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify IDs} for the albums. Maximum: 20 IDs.}
Expand Down
3 changes: 1 addition & 2 deletions man/get_artist.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/artists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_artist}
\alias{get_artist}
\title{Get Spotify catalog information for a single artist identified by their unique Spotify ID.}
Expand Down
17 changes: 6 additions & 11 deletions man/get_artist_albums.Rd
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/artists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_artist_albums}
\alias{get_artist_albums}
\title{Get Spotify catalog information for multiple artists identified by their Spotify IDs.}
\usage{
get_artist_albums(
id,
include_groups = c("album", "single", "appears_on", "compilation"),
market = NULL,
limit = 20,
offset = 0,
authorization = get_spotify_access_token(),
include_meta_info = FALSE
)
get_artist_albums(id,
include_groups = c("album", "single", "appears_on", "compilation"),
market = NULL, limit = 20, offset = 0,
authorization = get_spotify_access_token(),
include_meta_info = FALSE)
}
\arguments{
\item{id}{The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the artist.}
Expand Down
12 changes: 4 additions & 8 deletions man/get_artist_top_tracks.Rd
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/artists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_artist_top_tracks}
\alias{get_artist_top_tracks}
\title{Get Spotify catalog information about an artist’s top tracks by country.}
\usage{
get_artist_top_tracks(
id,
market = "US",
authorization = get_spotify_access_token(),
include_meta_info = FALSE
)
get_artist_top_tracks(id, market = "US",
authorization = get_spotify_access_token(),
include_meta_info = FALSE)
}
\arguments{
\item{id}{The \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify ID} for the artist.}
Expand Down
10 changes: 3 additions & 7 deletions man/get_artists.Rd
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/artists.R
% tinyrox says don't edit this manually, but it can't stop you!
\name{get_artists}
\alias{get_artists}
\title{Get Spotify catalog information for multiple artists identified by their Spotify IDs.}
\usage{
get_artists(
ids,
authorization = get_spotify_access_token(),
include_meta_info = FALSE
)
get_artists(ids, authorization = get_spotify_access_token(),
include_meta_info = FALSE)
}
\arguments{
\item{ids}{Required. A character vector of the \href{https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids}{Spotify IDs} for the artists. Maximum: 50 IDs.}
Expand Down
Loading