build_trakt_url
assembles a trakt.tv API URL from different arguments.
The result should be fine for use with trakt_get, since that's what this
function was created for.
Arguments
- ...
Unnamed arguments will be concatenated with
/
as separators to form the path of the API URL, e.g. the argumentsmovies
,tron-legacy-2012
andreleases
will be concatenated tomovies/tron-legacy-2012/releases
. Additional named arguments will be used as query parameters, usuallyextended = "full"
or others.
See also
Other utility functions:
pad_episode()
Examples
build_trakt_url("shows", "breaking-bad", extended = "full")
#> [1] "https://api.trakt.tv/shows/breaking-bad?extended=full"
build_trakt_url("shows", "popular", page = 3, limit = 5)
#> [1] "https://api.trakt.tv/shows/popular?page=3&limit=5"
# Path can also be partially assembled already
build_trakt_url("users/jemus42", "ratings")
#> [1] "https://api.trakt.tv/users/jemus42/ratings"
build_trakt_url("shows", "popular", page = 1, limit = 5)
#> [1] "https://api.trakt.tv/shows/popular?page=1&limit=5"