Added
- Interfaces:
Trakt['movies']recommended()Trakt['shows']recommended()
Added
- Interfaces:
Trakt['movies']popular()Trakt['shows']popular()
Changed
- Updated "arrow" requirement to support v1.0.0 (#91)
- Updated "requests" requirement to exclude v2.16.0 (#88)
Added
- Interfaces:
Trakt['lists']popular(),trending()Trakt['users/*']get(),follow(),unfollow()Trakt['users/*/watched']get(),movies(),shows()
- Objects:
PublicList
- Properties:
Mediaplayslast_updated_atlast_watched_atreset_at
Added
- Documentation is now generated for a number of modules that were previously missing
- Interfaces:
Trakt['sync/watchlist']- Now supports the
sortparameter
- Now supports the
Trakt['users/*/following']Trakt['users/*/friends']Trakt['users/*/history']Trakt['users/*/ratings']Trakt['users/*/watchlist']
- Methods:
Trakt['sync/history']seasons(),episodes()Trakt['sync/ratings']all()
- Objects:
User
Changed
- Methods:
Trakt['users/*/lists']create()now cleans the providedusernameparameter.
BREAKING
pagination=Truenow always returns aPaginationIteratorwith:total_items- Total number of itemstotal_pages- Total number of pagesget(page)- Fetch the specified page__iter__- Iterate over all items, automatically requesting the next page as required
Trakt['search'].lookup()now always returns a list of matched items (previously a list was only returned when more than one item was returned)
Added
- Pages can now be requested without using
pagination=Trueby using thepageandper_pageparameters on: Trakt['movies']trending()Trakt['search']lookup(),query()Trakt['shows']trending()Trakt['sync/history']get(),movies(),shows()Trakt['sync/ratings']get(),movies(),shows(),seasons(),episodes()Trakt['sync/watchlist']get(),seasons(),episodes()Trakt['users']likes()Trakt['users/*/lists/*']items()
- Pages can now be requested without using
Trakt['users/*/lists/*'].items()now supports amediaparameter (#76)
Added
- Exposed episode runtime (#69)
- Support
extendedparameter on listitems()function (#71)
Added
- Support for absolute episode numbers (#63)
- Support for rating votes (#68)
Changed
- Dropped support for Python 3.4
Added
- Implemented the show progress interface (#60)
- Support for the
extendedparameter on sync methods (#57)
Changed
- Requests that raise exceptions are now retried (with
retry=True) - Dropped support for Python 2.6, 3.3
Fixed
- Issue disabling pagination on watchlist requests (#62)
Added
__future__imports totrakt/hooks.py
Added
- Support for Python 3.6
- Package version is now automatically written into the
trakt.versionmodule onpython setup.py egg_info __future__imports for more consistent Python 3 compatibilitySummaryMapper.episodemethod now accepts the "parse_show" parameter- Interfaces:
Trakt['calendars'](#56)
Changed
- Dropped support for Python 3.2
- Cleaned up documentation
- Switched to pbr setup configuration
- Ordering of import statements has been updated to be more consistent
Tests
- Replaced usage of
responsesin tests withhttmock - Updated
tox.iniwith additional test environments and flake8 plugins - Improved the
fixturesdirectory structure
Travis CI
- Switched to using "tox-travis", instead of running pytest directly
- Releases are now automatically uploaded to PyPI and GitHub Releases
Added
Trakt['sync/playback'].delete(<id>)method (#54)
Added
- Improved token refreshing (and added the "oauth.refresh" and "oauth.refresh.rejected" events)
- RequestFailedError exception will now be raised if no response was returned (if exceptions=True)
Trakt.http.keep_aliveproperty (defaults to :code:`True`)Trakt.http.ssl_versionproperty (defaults to :code:`None` / :code:`PROTOCOL_TLS` / :code:`PROTOCOL_SSLv23`)
Changed
- Switched default API endpoint to https://api.trakt.tv
- SSL protocol version is now automatically negotiated with the server (instead of defaulting to TLS v1.0)
- Warning will now be displayed if a deadlock is detected inside token refresh events
- Fixed some inconsistencies in the handling of error responses
- Updated bundled emitter module (fuzeman/PyEmitter@3c558c7c2bc3ae07cb1e8e18b2c1c16be042c748)
- Interfaces:
Trakt['search']- Updated to use the new search endpoints
- Methods:
Trakt['search'].lookup- Now supports the
extendedparameter
- Now supports the
Trakt['search'].query- Now supports the
fieldsandextendedparameters
- Now supports the
Fixed
@authenticateddecorator wasn't applied to some methods, resulting in tokens not being refreshed- Exception raised when
Trakt['scrobble']methods are provided "app_version" or "app_date" parameters - Error responses weren't being returned correctly with
parse=False - Issue handling
Noneresponses in the automatic token refresher - Inconsistent handling of error responses in some methods
Added
- Properties
Movietaglinereleasedruntimecertificationupdated_athomepagetrailerlanguageavailable_translationsgenres
Showfirst_airedairsruntimecertificationnetworkcountryupdated_atstatushomepagelanguageavailable_translationsgenresaired_episodes
Seasonfirst_airedepisode_countaired_episodes
Episodefirst_airedupdated_atavailable_translations
Changed
- Methods on the
Trakt['movies']andTrakt['shows']interfaces now support theextendedparameter (#51) - Minor improvements to property descriptions on the
ShowandEpisodeobjects
Changed
- Removed some stray files from the source distribution
Added
- Methods:
Trakt['shows'].next_episode(#50)Trakt['shows'].last_episode(#50)
Added
- Properties:
Person.listed_atVideo.action
- Methods:
Trakt['sync/history'].getTrakt['sync/history'].showsTrakt['sync/history'].movies
Changed
- Updated
SyncMapperto support flat iterators - Methods:
Trakt['sync/ratings'].get- Flat iterator will now be returned if no
mediaparameter is provided
- Flat iterator will now be returned if no
Trakt['sync/watchlist'].get- Pagination is now supported, can be enabled with
pagination=True mediaparameter can now be specified asNoneto return all items (with no type filter)
- Pagination is now supported, can be enabled with
Fixed
- Pagination wouldn't work correctly if a starting page was specified
Added
- Lists containing people are now supported (instead of raising an exception)
SyncMappercan now be used without thestoreparameter- Objects:
Person
- Properties:
Video.id(history id)Video.watched_at(history timestamp)
- Methods:
Media.get_key(<service>)
Fixed
- Invalid classifier was defined in [setup.py]
Added
- Support for multiple
mediaoptions on theTrakt['search'].query()method - Implemented the
mediaparameter on theTrakt['search'].lookup()method
Changed
- "Request failed" warnings now display the request method and path to help with debugging
- Improved handling of requirements in [setup.py]
Changed
- Updated request error messages
Fixed
- Authorization tokens generated with device authentication wouldn't refresh correctly
Added
Trakt['oauth/device'](seeexamples/authentication/device.pyfor usage details)Trakt['shows'].seasons()now supports theextended="episodes"parameter- Pagination can now be enabled with
pagination=True, warnings will be displayed if you ignore pagination responses
Changed
- Moved the
Trakt['oauth'].pin_url()method toTrakt['oauth/pin'].url(), the old method still works but will display a deprecation warning
Fixed
- Issue retrieving lists by users with the
.character in their usernames
Added
in_watchlistproperty toMovie,Show,SeasonandEpisodeobjects (#45)Trakt.site_urlsetter to override automatic detectionHttpClientnow supports direct calls (#43)
Changed
- Tests are now included in builds, but are excluded from installations
Fixed
- Issue installing trakt.py when "six" hasn't been installed yet
Added
Trakt['users'].likes()methodCustomList.items()methodCommentobjectMedia.indexattribute (list item position/rank)- Basic documentation generation (#29)
NullHandlerto the logger to avoid "No handler found" warnings (#33)
Changed
- 'movies' and 'shows' interface methods to support the
exceptions=Trueparameter (#32) Interface.get_data()to only parse the response body if the request is successful (#32)
Fixed
TypeErrorwas raised inSummaryMapperif the request failed (#30, #31)- Constructing "Special" episodes could raise an
AttributeError(#38, #39) Media._update()"images" attribute- Issue serializing
Listobjects
Fixed
- Issue where the "_client" attribute on objects was being serialized
- Issue installing trakt.py when "arrow" isn't available yet
Added
trending()method toTrakt['shows']andTrakt['movies']interfaces (#23)seasons()andepisodes()methods to theTrakt['sync/watchlist']interface (#26)- Custom lists support (
Trakt['users/*/lists'],Trakt['users/*/lists/*']) (#26) __eq__()method on theRatingclassproxiesattribute onTrakt.http
Changed
datetimeobjects are now returned offset-aware (make sure you use offset-aware `datetime` objects when comparing timestamps now)- Force requests to use
ssl.PROTOCOL_TLSv1connections for https:// (#25) - Return site url from
Trakt['oauth'].authorize_url() - Use season number from parent when one isn't defined in the episode
Changes
- Added support for PIN authentication
- Added automatic OAuth token refreshing (see "examples/pin.py" for an example)
- Added
Trakt.configuration.oauth.from_response()configuration method - Added tests for the
Trakt['oauth']interface - Added tests to ensure authentication headers are being sent
Trakt['oauth']methods now raise an exception if you are missing required configuration parametersTrakt['oauth'].token()method has been renamed toTrakt['oauth'].token_exchange()(old method is still present for compatibility)
Fixed
Trakt['oauth']"_url" methods could raise an exception in some cases
Changes
- Added unit tests (with travis-ci.org and coveralls.io integrations)
- Added
/movies,/shows,/searchand/users/settingsinterfaces - Added parent properties ("show", "season")
- Added "images", "overview" and "score" properties to the
Mediaclass - Added "last_watched_at" property to movies and episodes
- Updated
/sync/playbackinterface (to include type filtering) - "progress" and "paused_at" properties are now included in
to_dict()
Fixed
- "year" property could be returned as a string in some cases
- Catch an exception in
trakt.media_mapper - Catch a case where
Interface.get_data()can raise aKeyError: 'content-type'exception
Changes
- Updated to use the new v2 API endpoint (api-v2launch.trakt.tv)
- Episode and Movie
to_dict()method now always returns "plays" as an integer - Added "http.retry_sleep" and "http.timeout" configuration parameters
- Setup travis/coveralls services
Fixed
- Python 3.x compatibility issues
Changes
- Added "exceptions" and "parse" parameter to Interface.get_data()
- Added additional error messages (502, 504, 520)
- Renamed media object to_info() method to to_identifier()
- Added new to_dict() method which returns a dictionary representation of the media object
- Request retrying (on 5xx errors) can now be enabled with Trakt.configuration.http(retry=True)
- requests/urllib3 now retries requests on connection errors (default: 3 retries)
Fixed
- Thread synchronization issue with trakt.core.configuration
- [/sync] last_activities() used an incorrect path
- Catch all response errors to avoid issues parsing the returned body
- Handle a case where [media_mapper] processes an item with an empty "ids" dict
- Switched to manual interface importing to avoid security restrictions
- Convert all datetime properties to UTC
- Allow for charset definitions in "Content-Type" response header
- Display request failed messages in log (with error name/desc)
- Fixed broken logging message
- Properly handle responses where trakt.tv returns errors without a json body
- Re-designed to support trakt 2.0 (note: this isn't a drop-in update - interfaces, objects and methods have changed to match the new API)
- Support for OAuth and xAuth authentication methods
- Simple configuration system
- "title" and "year" parameters are now optional on scrobble() and watching() methods
- [movie] Added unseen() method
- [show/episode] Added unseen() method
- Return None if an action fails validation (instead of raising an exception)
- Added Trakt.configure() method
- Rebuild session on socket.gaierror (workaround for urllib error)
- Fixed bugs sending media actions
- Renamed cancel_watching() to cancelwatching()
- "title" and "year" parameters are now optional on media actions
- [movie] Added seen(), library() and unlibrary() methods
- [movie] Implemented media mapping
- [rate] Added shows(), episodes() and movies() methods
- [show] Added unlibrary() method
- [show/episode] Added library() and seen() methods
- Added @authenticated to MediaInterface.send()
- Fixed missing imports
- Initial release