usethis::use_tidy_ci(), this bumps the R dependency to
By default, all requests to the API are now made using authentication if a
trakt_client_secret is set. See
?trakt_credentials() for details on how to set your credentials.
If no secret is available, unauthenticated requests are made as in previous versions. In this case, you still need either the built-in or your own
OAuth2 support comes with the need to handle secrets, i.e.
.httr-oauth files. This can be a pain with headless/automated setups, which is why I am trying to keep "no auth needed" as the default, as most (implemented) endpoints don't strictly require authentication.
vignette("Implemented-API-methods", package = "tRakt") for an overview of implemented methods with an indicator on whether authentication is required (it usually isn't).
seasons_summary()do, but for a single episode. Only really implemented for completeness' sake. Wraps this method.
user/:id]: Get a user's profile.
users/:id/lists]: Get all user lists.
users/:id/lists/:list_id]: Get a single list.
users/:id/lists/:list_id/items/:type]: Get the items in said lists.
Rename all the things to snake_case and drop the
This results in (most) functions mapping directly to API endpoints in the form
e.g. the API endpoint
movies/collected is handled by function
seasons_season()(It's silly, I know, but oh well)
This is a big one, but not 1.0.0 big one I guess.
This is a consolidation release with lots of internal improvements, but for the 1.0.0 I decided to overhaul the structure of the package again, so before I completely break any kind of backwards compatiblity, I thought I'd get this one out.
Major refactor of the docs. Sadly, the user will only notice a little more consistency.
Consolidate related functions into the same Rd page
Centrally document common parameters and reuse them where needed
Also consolidate many similar functions by factoring out the relevant bits into more flexible helper functions. In some cases those are exported as well.
In the process, some functions where partially renamed (
.movies.) for consistency.
Many functions now return much flatter output, notably
*people* functions. They return a
crew objects, which in turn are both flat
NAbut a search
score == 1000, that's probably bad and dropped.
trakt.user.historyfor user/:id/history methods
Many functions were refactored, which in some cases changes the output.
Not only do most functions return a
tibble now, but some additionally computed variables have been removed as well.
usethis::use_*all the things, basically.
pkgdownsite and a
season_numsargument to make it easier to get all episodes of a show.
extendedto be more than
minsince the required
aired_episodesfield is only present with higher levels of detail.
NULLwhen the user is private instead of failing.
trakt.user.f*functions: Results will be
rbinded together and a
source_usercolumn is appended.
trakt.seasons.season: Soon to make
sourcecolumn containing respective input
trakt.*.ratings: Returns result as a
listwith each entry containing data for each show or movie to accommodate the
sourcecolumn containing each
build_trakt_urlto ease trakt API URL assembly and reduce duplicate code.
trakt.*.summary: Forces unnesting.
trakt.stats, will work with both movies and shows as soon as the API endpoint actually works.
@familytags in docs a little
trakt.show.watching: Get trakt.tv users watching.
trakt.movie.releases: Gets release dates & certifications per movie.
trakt.search.byid: Used to only work on shows, now actually works on movies.
fix_datetime(internal): improve reliability.
type = showswas ignored by accident
trakt.getSeasons -> trakt.seasons.summaryfor consistency with the trakt API.
trakt.show.season -> trakt.seasons.seasonfor consistency with the trakt API.
getNameFromUrl -> parse_trakt_urlto be more descriptive. Also, de-camelCasezation.
pageparam to paginated functions:
to.data.frameoption because the output is too messy
@familytag to docs for aggregation functions (
episode_absfield is usually
NA, so let's dump
extended = "min"as default across functions for consistency with the trakt API
trakt.searchends with a 4 digit number, this will be used as
yearparameter and stripped from the original
as.POSIXctis used as a fallback
trakt.movies.popular: Analogous to
trakt.movies.trending: Analogous to
trakt.movie.summary: Get a single movie's details, analogous to
trakt.movies.related: Get related movies
trakt.movie.people: Analogous to
trakt.movie.ratingsto receive just the ratings and distribution for a single show or movie
trakt.shows.relatedfor consistency with
targetparams in accordance with changed trakt API docs
trakt.user.ratings: Currently supported types:
.posixhave been removed and the existing date fiels are now converted to
POSIXctto remove cluttering
.friends) because maybe I want to throw networkD3 at my people
.posixvariables should be removed and the existing date variables should just be properly converted to
@familytags to all functions to group them together
I've been working on some user-specific methods, so you can now use the
trakt.user.* family of functions to get a user's…
All of them default to the username set in
getOption("trakt.username"), but any publicly viewable user should work. Note that OAuth2 is not implemented, so private users can't be accessed.
As of today, all the functions are updated to use the new APIv2, except for
which is currently not yet implemented at trakt.tv, see their docs
Now the package is usable again, and I can continue to work on bug fixes and enhancements. Yay.
I am now trying to migrate everything to the new trakt.tv APIv2.
Since I mostly don't know what I'm doing, I have to make this up as I go along, but oh well.
Now the search function
trakt.search should be working fine, as it is the only function
that is tested/built with the new API in mind. Others to come.