TraktV2
: addisUnauthorized(response)
,isAccountLocked(response)
andisNotVip(response)
helper methods.TraktV2
: addgetPageCount(response)
andgetItemCount(response)
helper methods.
2024-08-30
TraktV2.notes()
: support to add, get, update and delete a note. #152TraktV2.users().notes(...)
: Support to get all notes for a user. #152- Add
Sync.removePlayback(id)
. #151
2024-07-12
- LastActivities: Add missing fields. Thanks @ZelKami! #148
2024-05-24
- Deprecated TV rage ID, it appears to be no longer used.
- Add variants of the comments methods that accept a
Cache-Control
header. This can be used to skip the local cache and get the latest comments from the server. - Update retrofit [2.9.0 -> 2.11.0].
- Update okhttp [4.10.0 -> 4.12.0].
- Update gson [2.9.1 -> 2.11.0].
- Update threetenbp [1.6.1 -> 1.6.9].
2024-01-25
- Add method to reorder lists. Thanks @ZelKami! #131
- Add limits to user settings.
2022-09-01
- Update bundled R8 rules to remove unused entity classes.
2022-08-25
- Add explicit Gson dependency [2.9.1]: transient dependency on 2.8.5 has a security vulnerability and this library uses the Gson API explicitly.
2022-08-25
- Bundle R8 rules into library. Thanks @Goooler! #127
- Update threetenbp [1.5.1 -> 1.6.1].
- Add explicit OkHttp dependency [4.10.0].
2021-08-05
- Change sync ratings endpoints to add pagination. Thanks @defhead!
- Update retrofit to 2.9.0, requires Java 8/Android 5. But most should be using that version anyhow (including latest okhttp).
- Update threetenbp [1.5.0 -> 1.5.1].
2021-02-29
- Add support for staging environment. See the new constructors for
SgTraktV2
. Thanks @srggsf! - Annotate builder methods that return non-null.
2020-10-29
- Handle new HTTP 429 Too Many Requests response from Trakt. Note that if you use
TraktV2Interceptor
or its methods directly, it now is a regular interceptor (previously network interceptor) as it may retry requests. Details at https://trakt.docs.apiary.io/#introduction/rate-limiting. - Add more
Audio
types. Via #121 from @riksmith, thanks! - Update threetenbp [1.4.1 -> 1.5.0].
2020-09-11
- Switch
Authentication
methods to use API instead of website. This should make errors less likely.
2020-06-17
- Fix
TraktList
enum serialization (ListPrivacy
,SortHow
andSortBy
). - Added metadata to episodes and movies. Thanks @mlaggner!
2020-03-05
- Add support for Trakt device authentication. #112 Thanks @samicemalone!
- Update progress endpoints to provide the last episode watched/collected. #111 Thanks @samicemalone!
- Update retrofit [2.6.1 -> 2.6.4]. Note: if your project is Java 8+ or Android 5+ manually depend on retrofit 2.7.x.
- Update threetenbp [1.4.0 -> 1.4.1].
2019-09-12
- Support scrobble methods and getting playback progress. Thanks @courville!
2019-08-22
- In
Recommendations
movies
andshows
now have a page and limit parameter. Thanks @chrisbanes! - Update retrofit [2.5.0 -> 2.6.1].
2019-06-05
- Add
last_updated_at
returned bysync().watchedMovies()
andsync().watchedShows()
. Thanks @chrisbanes! #106 - Update threetenbp [1.3.7 -> 1.4.0].
2019-02-07
- Add
updated_at
,likes
anduser_rating
toComment
. Thanks @MMauro94! #105 - For the
com.uwetrottmann.trakt5.entities
package return values and fields are now annotated nullable.
2018-11-28
- Produce Java 8 bytecode. For Android this requires Android Gradle Plugin 3.2.x or newer.
- For the root package (this specifically excludes entity classes) return values and fields are now non-null unless otherwise annotated.
TraktV2.refreshAccessToken(refreshToken)
requires explicitly passing the refresh token.buildAuthorizationUrl()
,exchangeCodeForAccessToken()
andrefreshAccessToken()
now check for required values.
2018-11-23
- Support reordering list items with
Users.reorderListItems()
. Thanks @MMauro94! - Support adding/removing people from lists with
SyncItems.people()
. Thanks @MMauro94! - Add
sort_by
,sort_how
,created_at
,user
toTraktList
. Thanks @MMauro94! - Add
id
,rank
andtype
toListEntry
. Thanks @MMauro94! - Add list activity to
LastActivities
response. Thanks @MMauro94! - Update retrofit to 2.5.0.
- Update threetenbp to 1.3.7. Android projects should update ThreeTenABP to 1.1.1.
2018-09-20
- Change
SyncErrors.ids
fromList<Integer>
toList<Long>
. Thanks @MMarco94!
2018-09-12
- Add
first_aired
toSeason
. Thanks @Larsg310!
2018-08-08
- Add
runtime
andcomment_count
toEpisode
. Thanks @KilianB! - Update retrofit to 2.4.0.
- Update threetenbp to 1.3.6. Android projects should update ThreeTenABP to 1.1.0.
2018-06-21
SyncItems
useslong
instead ofint
for history entry IDs. Thanks @chrisbanes!
2018-04-06
- Add
title
andnetwork
toSeason
. Thanks @chrisbanes!
2018-01-18
- Add related shows endpoint. Thanks @chrisbanes!
2017-09-21
- Support parsing generic errors of unsuccessful responses with
TraktV2.checkForTraktError(response)
. TraktV2.checkForCheckinError(response)
now returns error instance with null value instead of throwing.
2017-09-20
- Properly serialize
OffsetDateTime
, fixes issues withwatched_at
andcollected_at
properties. - Update retrofit to 2.3.0.
2017-04-12
- Hard-code UTF-8 charset to support all Android versions.
java.nio.charset.StandardCharsets
is only available on Android API 19+.
2017-04-06
- Use ThreeTen to replace broken date parsing:
java.util.Date
replaced withOffsetDateTime
andLocalDate
. - Note: to avoid issues on Android exclude the
ThreeTen dependency and include ThreeTenABP instead:
compile ('com.uwetrottmann.trakt5:trakt-java:<latest-version>') { exclude group: 'org.threeten', module: 'threetenbp' } compile 'com.jakewharton.threetenabp:threetenabp:<latest-version>'
2017-03-30
- Drop
Extended.DEFAULT_MIN
flag, passnull
instead. - Drop joda-time dependency: switched from
DateTime
tojava.util.Date
. - Added new
TraktDate
to wrapDate
for methods. - Drop oltu dependency: build authorization URL ourselves.
2017-01-12
- Add
Extended
flag to new search methods.
2017-01-12
- Update to new search methods #89.
- Update joda-time to 2.9.7.
2016-11-10
- Remove
Username
in favor ofUserSlug
. The user slug is returned in the newids.slug
field ofUser
. It is known to be URL safe. If you still only have a username you can useUserSlug.fromUsername()
which will do its best to encode for trakt.
2016-11-09
- Removed images, except for user avatars, as trakt no longer returns them.
- Change host to api.trakt.tv (from api-v2launch.trakt.tv).
- Add
episodes
toSeason
, can be requested with season summary by passingExtended.EPISODES
. Thanks @mlaggner! - Add
ids
toUser
. - Update joda-time to 2.9.5.
2016-08-18
HistoryEntry
ids can beLong
(64 bit numbers). Thanks @mattkranzler5!
2016-07-31
- Add optional start and end date parameters to history methods. Thanks @mattkranzler5!
2016-07-14
- Added
stats
for movies, shows, seasons and episodes. - Update retrofit to 2.1.0.
2016-06-09
- Update to
retrofit2
. Read about the most notable changes and benefits. You will have to make changes to your app, see the README for an example of the new code flow. - Package name changed to
com.uwetrottmann.trakt5
. So you can keep using the old version while updating your code. - Removed
OAuthUnauthorizedException
andCheckinInProgressException
. You now have to handle authentication errors (check forresponse.code() == 401
) and check-in errors (TraktV2
now hascheckForCheckinError()
) yourself. - Better integrated support for handling OAuth, removing the need for a dedicated HTTP client (removed
TraktHttpClient
). - Better support for customizing
TraktV2
. You can now overrideretrofit()
,retrofitBuilder()
,okHttpClient()
orsetOkHttpClientDefaults()
. - Add
noseasons
extended flag. - Removed debug logging. You can easily add your own
HttpLoggingInterceptor
by overriding the newsetOkHttpClientDefaults()
inTraktV2
. SeeBaseTestCase
for an example. - Update joda-time to 2.9.4.
2016-05-27
- Add
getOkHttpClient()
toTraktV2
to allow supplying your own OkHttp client instance more easily.
2016-05-06
- Fix
dismissMovie
anddismissShow
endpoints (#77). Thanks @yacsrk! - Add tests for untested endpoints.
2016-05-06
- As a stop-gap solution use OkHttp 3 adapter with retrofit, update to OkHttp 3. Moving to retrofit2 soon.
- Drop user name from auth code request creator.
- Revert oltu.oauth2.client to 1.0.0.
- Update okhttp to 2.6.0.
- Update oltu.oauth2.client to 1.0.1.
- Also trim leading and trailing white spaces of usernames.
- Fix
/user
methods failing for usernames with spaces in them. - Support for
shows
andseasons
inHistoryType
. Thanks @hrk! - Update okhttp to 2.6.0.
- Update joda-time to 2.9.1.
- Fix
/user
methods failing for usernames with periods in them. Usernames now have to be passed usingnew Username("someuser")
, or for the currently authenticated userUsername.ME
. #70 - Update okhttp to 2.5.0.
- Allow checking in with show, season and episode without needing EpisodeIds. Thanks @samicemalone! #62
- Added
last_watched_at
to BaseEpisode. Thanks @mlaggner! #63 - Support new calendar methods. #64
- Add shows collected progress method. Update watched progress with new params, properties. #65
- Add watchlist methods to Users service. #66
- Support new
/users/:username/history
filters. Addedhistory
method, removedhistoryEpisodes
andhistoryMovies
. #67 - Support removing history items. #68
- Add
comment_count
to lists. - Add
aired_episodes
to season. - Add year parameter to search.
- Allow
null
year for show. - Fix some tests.
- Add helper methods to
TraktV2
to support trakt refresh tokens. Note: trakt access tokens expire after 90 days. Now that refresh tokens are supplied together with your access token, you can use them to refresh the access token without asking the user for authorization (if the user has not revoked authorization). - Add missing properties to
LastActivities
,Movie
,Season
,SeasonIds
andEpisode
. Thanks @florianmski! - Support
/sync/watchlist/seasons
. Thanks @florianmski!
- Switch to new API endpoint
https://api-v2launch.trakt.tv
fromhttps://api.trakt.tv
- For
BaseShow
,collected_at
is nowlast_collected_at
, addedlast_watched_at
. - Tests allow empty cast character name.
- Add users/follow, users/unfollow, users/followers, users/followed, users/friends.
- Use new retrofit parameterized path and query annotations.
- Update dependencies.
- Add
last_watched_at
property toBaseMovie
(e.g. for getting watched movies). - Added show watched progress to the Shows service. Thanks @oprisnik!
- Only throw
CheckinInProgressException
if using acheckin
method.
- Fix crash if check-in blocked error has broken body.
- Use production URL for
TraktLink
. - Add
type
property toSearchResult
.
- Support the v2 API (
TraktV2
). - Removed the v1 API (
Trakt
). For easy upgrading, use trakt-java 3.4.0 for development. Then switch to 4.0.0 once finished.
- Support the trakt v2 API.
- This version includes the new v2 API (
TraktV2
) aside the old v1 API (Trakt
), but marked deprecated. Use this for upgrading your code.
- Fix
show/summary
not returning user data with default extended flag (URL had trailing/
, causing redirect, stripping auth header). - Remove trailing
/
on all other methods using eitherExtended
orExtended2
flag.
- Easier customization of
RestAdapter
: set your own HTTP client or executor by overridingnewRestAdapterBuilder()
. - Add
okhttp
andokhttp-urlconnection
2.0.0 as optional dependencies. - Require Java 1.7.
- Use HTTPS.
- Use okhttp 1.6.0.
- Update to retrofit 1.6.1.
- Added
activity/friends
. - Update to retrofit 1.5.0.
- Added
user/progress/watched
anduser/progress/collected
endpoints. Thanks @samicemalone! - Added
search/movies
. Thanks @porzione! - Change fest dependency scope to
test
.
There were some API breaking changes due to the introduction of a new Extended
enum.
E.g. instead of calling libraryShowsAllMinimum(username)
call libraryShowsAll(username, Extended.MIN)
.
ExtendedParam
replaced withExtended
, adds aDEFAULT
value.user/library/shows
endpoints addExtended
param,-Minimum
and-Extended
versions are dropped.- Added
user/library/movies/
endpoints. - Added
movie/related
endpoint. - Added
show/summaries
andmovie/summaries
. - Added
user/calendar/shows
endpoint. - Add
last_updated
field. - Support
MovieComment
with TMDb id. - Use retrofit 1.4.1.
- Only create new
RestAdapter
instance when changing auth, API key or debug flag. - Changed tests to use annotations, only setup trakt once per class.
- More or less complete rewrite for retrofit backend. Not all previously supported endpoints are available yet (pull request to add new ones, it's easy!), but there are also new ones previously unsupported.
ServiceManager
is now justTrakt
, endpoints do not require you to call.fire()
anymore either.- For now this is NOT published to a Maven repository, let me know if there is demand.
- Start testing with FEST.
- Use retrofit 1.2.2.
- Added list and activity service.
- Movie and show services now have
checkin
andcancelchecking
methods. - All "getter" methods have been deprecated and instead the instance properties should be used directly.
- Transitioned methods which returned
MediaEntity
to use the more userfulActivityInfo
type.
- Add
dismissShow
anddismissMovie
methods to the recommendations service.
- Add
print()
method which acts likefire()
except writes relevant info to stdout rather than calling the remote API. This can be very useful for debugging just what your application is sending. - Add
setUseSsl
toggle toServiceManager
and the individual services to control whether or not the SSL API endpoint is used. - Add
TraktException
which is thrown when an exception was returned from the trakt servers. - Add genre service for listing movie and television genres.
- Add filtering methods to the recommendations service for start and end year as well as genre.
- Fix deserialization of fields whose names contained underscores.
getEpisodes()
inTvShowSeason
is now a complex type that can hold both a count, an episode number list, or a list of episode object.- Add new properties to
Movie
andTvShow
. - Some dates are now a
java.util.Calendar
where the precision is to the seconds. Ones that remainjava.util.Date
should only be used for the date they represent, not the time. - The search service is now available from
ServiceManager
. - New
enum
s for gender, rating type, and day of the week. - Full test suite implemented.
Initial version.