- Remove
magrittr
import and use|>
internally, hence bumping the R dependency to>= 4.1
.
- Add GitHub actions via
usethis::use_github_actions()
- Use the tidy CI setup via
usethis::use_tidy_ci()
, this bumps the R dependency to>= 3.2
.
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 trakt_client_id
.
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.
See vignette("Implemented-API-methods", package = "tRakt")
for an overview of implemented methods with an indicator on whether authentication is required (it usually isn't).
episodes_summary()
[shows/:id/seasons/:season/episodes/:episode
]: Whatseasons_season()
andseasons_summary()
do, but for a single episode. Only really implemented for completeness' sake. Wraps this method.user_profile()
[user/:id
]: Get a user's profile.user_lists()
[users/:id/lists
]: Get all user lists.user_list()
[users/:id/lists/:list_id
]: Get a single list.user_list_items()
[users/:id/lists/:list_id/items/:type
]: Get the items in said lists.
Rename all the things to snake_case and drop the trakt.
prefix.
This results in (most) functions mapping directly to API endpoints in the form section_method
,
e.g. the API endpoint movies/collected
is handled by function movies_collected()
.
trakt.search
->search_query()
trakt.search.byid
->search_id()
trakt.popular
- ->
movies_popular()
- ->
shows_popular()
- ->
trakt.trending
- ->
movies_trending()
- ->
shows_trending()
- ->
trakt.anticipated
- ->
movies_anticipated()
- ->
shows_anticipated()
- ->
trakt.played
- ->
movies_played()
- ->
shows_played()
- ->
trakt.watched
- ->
movies_watched()
- ->
shows_watched()
- ->
trakt.collected()
- ->
movies_collected()
- ->
shows_collected()
- ->
trakt.updates()
- ->
movies_updates()
- ->
shows_updates()
- ->
trakt.movies.summary
->movies_summary()
trakt.movies.boxoffice
->movies_boxoffice()
trakt.movies.releases
->movies_releases()
trakt.movies.people
->movies_people()
trakt.shows.summary
->shows_summary()
trakt.shows.people
->shows_people()
trakt.seasons.summary
->seasons_summary()
trakt.seasons.season
->seasons_season()
(It's silly, I know, but oh well)
trakt.movies.ratings
->movies_ratings()
trakt.shows.ratings
->shows_ratings()
trakt.seasons.ratings
->seasons_ratings()
trakt.episodes.ratings
->episodes_ratings()
trakt.movies.related
->movies_related()
trakt.shows.related
->shows_related()
trakt.movies.stats
->movies_stats()
trakt.shows.stats
->shows_stats()
trakt.seasons.stats
->seasons_stats()
trakt.episodes.stats
->episodes_stats()
trakt.people.summary
->people_summary()
trakt.people.movies
->people_movies()
trakt.people.shows
->people_shows()
trakt.user.network
- ->
user_followers()
- ->
user_following()
- ->
user_friends()
- ->
trakt.user.collection
->user_collection()
trakt.user.history
->user_history()
trakt.user.ratings
->user_ratings()
trakt.user.stats
->user_stats()
trakt.user.watched
->user_watched()
trakt.user.watchlist
->user_watchlist()
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 (
.show.
->.shows.
,.movie.
->.movies.
) for consistency. -
Rename
get_trakt_credentials
->trakt_credentials
-
Many functions now return much flatter output, notably
*people*
functions. They return alist
withcast
andcrew
objects, which in turn are both flattibbles
.
- Improved search function (
trakt.search
).- If the result has a
year
that isNA
but a searchscore == 1000
, that's probably bad and dropped.
- If the result has a
- Added more of the automated list methods, like most anticipated, most played and most watched items.
- Added
trakt.user.history
for 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.- Add a
pkgdown
site and aREADME.Rmd
- Use
codecov
- Apply
styler::style_pkg()
- Update documentation to use markdown
- Redo vignette
- Tests. So many tests.
- Completely removed plyr dependency in favor of purrr
- Rename
trakt.getEpisodeData
->trakt.get_all_episodes
- Expand handling of
season_nums
argument to make it easier to get all episodes of a show. - Vectorize to enable multiple target input
- Expand handling of
- Rename
trakt.getFullShowData
->trakt.get_full_showdata
- Vectorize
trakt.seasons.summary
- Fix some bugs
- Improve tests
- Add
dropunaired
param totrakt.seasons.summary
(defaults toTRUE
).- Requires
extended
to be more thanmin
since the requiredaired_episodes
field is only present with higher levels of detail.
- Requires
- Add
extended
param totrakt.user.f*
- Fix
trakt.user.f*
now returnNULL
when the user is private instead of failing.
- User internal, generalized functions to reduce duplicate code for the following:
trakt.*.popular
trakt.*.related
trakt.*.trending
trakt.*.summary
trakt.*.ratings
- Add multiple target input support (vectorization) for:
trakt.user.f*
functions: Results will berbind
ed together and asource_user
column is appended.trakt.seasons.season
: Soon to maketrakt.getEpisodeData
obsolete.trakt.*.summary
: Forcesforce_data_frame
toTRUE
to enablerbind
ing.trakt.*.related
: Appendssource
column containing respective inputid
.trakt.*.ratings
: Returns result as alist
with each entry containing data for each show or movie to accommodate thedistribution
variable (data.frame
)trakt.people.summary
: Appendsperson
column withtarget
id.trakt.*.watching
: Returnsdata.frame
withsource
column containing eachtarget
.
- Add
build_trakt_url
to ease trakt API URL assembly and reduce duplicate code. - Add
force_data_frame
option totrakt.*.summary
: Forces unnesting. - Rename
trakt.show.stats
totrakt.stats
, will work with both movies and shows as soon as the API endpoint actually works.
- Expand
@family
tags in docs a little
- Add
trakt.movie.watching
andtrakt.show.watching
: Get trakt.tv users watching. - Add
trakt.movie.releases
: Gets release dates & certifications per movie. - Fix
trakt.search.byid
: Used to only work on shows, now actually works on movies. - Fix
fix_datetime
(internal): improve reliability.
- Fix documentation error in
*.movie.*
functions. - Added tests for new functions
- Internal restructuring (moving functionally similar functions together)
- TODO: Create generic functions for both movie and show functions to reduce duplicate code
- Add
extended
param totrakt.user.watchlist
- Improve consistency between
trakt.user.watched
andtrakt.user.collection
- Rename
slug
toid.slug
- Ensure proper datetime conversion
- Rename
- Fix error in
trakt.user.watchlist
whentype = shows
was ignored by accident
- Rename
trakt.getSeasons -> trakt.seasons.summary
for consistency with the trakt API. - Rename
trakt.show.season -> trakt.seasons.season
for consistency with the trakt API. - Rename
getNameFromUrl -> parse_trakt_url
to be more descriptive. Also, de-camelCasezation. - Update vignette to reflect the above changes
- Add some
people
functions:trakt.people.summary
trakt.people.movies
trakt.people.shows
- Unify output of
trakt.show.people
andtrakt.movie.people
- Add
extended
argument totrakt.movies.related
andtrakt.shows.related
(defaults tomin
) - Add
page
param to paginated functions:trakt.shows.popular
trakt.shows.trending
trakt.movies.popular
trakt.movies.trending
- The usual bug fixes
trakt.user.stats
:- Tidy up rating distribution
- Remove
to.data.frame
option because the output is too messy
- Add another
@family
tag to docs for aggregation functions (.popular
,.trending
,.related
) - Individual functions don't have to warn about missing headers, that's
trakt.api.call
's job. trakt.getEpisodeData
:- Explicitly drop episodes with
NA
firstaired fields - The
episode_abs
field is usuallyNA
, so let's dumpepnum
on it
- Explicitly drop episodes with
- Use
extended = "min"
as default across functions for consistency with the trakt API
- Add
year
parameter totrakt.search
- If
query
intrakt.search
ends with a 4 digit number, this will be used asyear
parameter and stripped from the originalquery
- Minor internal fixes
- Add
testthat
tests - Internal changes to how/where datetime variables are converted (user doesn't see any of that)
- If
lubridate::parse_date_time
fails,as.POSIXct
is used as a fallback
- If
- Various bug fixes
- Add movie functions:
trakt.movies.popular
: Analogous totrakt.shows.popular
trakt.movies.trending
: Analogous totrakt.shows.trending
trakt.movie.summary
: Get a single movie's details, analogous totrakt.show.summary
trakt.movies.related
: Get related moviestrakt.movie.people
: Analogous totrakt.show.people
- Add both
trakt.show.ratings
andtrakt.movie.ratings
to receive just the ratings and distribution for a single show or movie - Rename
trakt.show.related
->trakt.shows.related
for consistency with.trending
and.popular
- Expand allowed
target
params in accordance with changed trakt API docs
- Specified more exclusive package version requirements to avoid unforseen errors
- Add
trakt.user.ratings
: Currently supported types:shows
,movies
,episodes
- Add
extended
option totrakt.shows.popular
and.trending
- Make code in vignette a little more robust
- Fix a whole bunch of typos I only found after the CRAN release, naturally
- Improve consistency across functions
- The date fields ending in
.posix
have been removed and the existing date fiels are now converted toPOSIXct
to remove cluttering firstaired.posix
->first_aired
etc
- The date fields ending in
- Update vignette for the above change
- Added more user-facing functions (
trakt.user.following
/.followers
/.friends
) because maybe I want to throw networkD3 at my people - Improve consistency with date variables: The
.posix
variables should be removed and the existing date variables should just be properly converted toPOSIXct
- Improve documentation: Added
@family
tags to all functions to group them together - Add a package vignette
- Minor fixes and non-breaking additions
- Trying to keep things organized and all I got was this inconsistently header'd NEWS.md
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…
- Collection:
trakt.user.collection()
- Watched items:
trakt.user.watched()
- Stats:
trakt.user.stats()
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 trakt.show.stats
,
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.