All Projects → fuzeman → Trakt.py

fuzeman / Trakt.py

Licence: mit
Python interface for the Trakt.tv API

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Trakt.py

Rapidql
Query multiple APIs and DBs and join them in a single query
Stars: ✭ 91 (-22.22%)
Mutual labels:  api-client
Yelp Ruby
A Ruby gem for communicating with the Yelp REST API
Stars: ✭ 107 (-8.55%)
Mutual labels:  api-client
Nodejs Foscam
Remote control, view and config a Foscam or compatible IP camera
Stars: ✭ 113 (-3.42%)
Mutual labels:  api-client
Sypht Java Client
A Java client for the Sypht API
Stars: ✭ 93 (-20.51%)
Mutual labels:  api-client
Nodejs Youtube
Access public YouTube data feeds from your Node.js apps
Stars: ✭ 102 (-12.82%)
Mutual labels:  api-client
Laqul
A complete starter kit that allows you create amazing apps that look native thanks to the Quasar Framework. Powered by an API developed in Laravel Framework using the easy GraphQL queries language. And ready to use the Google Firebase features.
Stars: ✭ 110 (-5.98%)
Mutual labels:  api-client
Medusa
Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
Stars: ✭ 1,268 (+983.76%)
Mutual labels:  trakt
Coinbase Pro Node
Coinbase Pro API written in TypeScript and covered by tests.
Stars: ✭ 116 (-0.85%)
Mutual labels:  api-client
Python Scaleway
🐍 Python SDK to query Scaleway APIs.
Stars: ✭ 107 (-8.55%)
Mutual labels:  api-client
Quandl R
This is Quandl's R Package
Stars: ✭ 113 (-3.42%)
Mutual labels:  api-client
Adyen Php Api Library
Adyen API Library for PHP
Stars: ✭ 93 (-20.51%)
Mutual labels:  api-client
Tracker api
Ruby Wrapper for Pivotal Tracker v5 API
Stars: ✭ 102 (-12.82%)
Mutual labels:  api-client
Trakt.tv
A Trakt.tv API wrapper for Node.js
Stars: ✭ 111 (-5.13%)
Mutual labels:  trakt
Algoliasearch Client Android
Algolia Search API Client for Android
Stars: ✭ 92 (-21.37%)
Mutual labels:  api-client
Douyin Api
抖音API、抖音数据、抖音直播数据、抖音直播Api、抖音视频Api、抖音爬虫、抖音去水印、抖音视频下载、抖音视频解析、抖音直播监控、抖音数据采集
Stars: ✭ 112 (-4.27%)
Mutual labels:  api-client
Contextio Node
[DEPRECATED] - Official Node.js client library for the Context.IO Email API
Stars: ✭ 86 (-26.5%)
Mutual labels:  api-client
Huawei Lte Api
API For huawei LAN/WAN LTE Modems
Stars: ✭ 108 (-7.69%)
Mutual labels:  api-client
Sdk Js
Directus JS SDK — JavaScript Software Development Kit for Node and Browser
Stars: ✭ 117 (+0%)
Mutual labels:  api-client
Pixiv Api Client
Promise based Pixiv API client for node.js and react native
Stars: ✭ 114 (-2.56%)
Mutual labels:  api-client
Tekore
Spotify Web API client for Python 3
Stars: ✭ 111 (-5.13%)
Mutual labels:  api-client

trakt.py

.. image:: https://img.shields.io/pypi/v/trakt.py.svg?style=flat-square :target: https://pypi.python.org/pypi/trakt.py

.. image:: https://img.shields.io/travis/fuzeman/trakt.py.svg?style=flat-square :target: https://travis-ci.org/fuzeman/trakt.py

.. image:: https://img.shields.io/codeclimate/github/fuzeman/trakt.py.svg?style=flat-square :target: https://codeclimate.com/github/fuzeman/trakt.py

.. image:: https://img.shields.io/coveralls/fuzeman/trakt.py.svg?style=flat-square :target: https://coveralls.io/r/fuzeman/trakt.py?branch=master

Python interface for the Trakt.tv API.

Install

.. code-block:: shell

pip install trakt.py

Examples

Configure the client

.. code-block:: python

from trakt import Trakt


Trakt.configuration.defaults.client(
    id='<client-id>',
    secret='<client-secret>'
)

Scrobble an episode

.. code-block:: python

show = {
    'title': 'Community',
    'year': 2009
}

episode = {
    'season': 5,
    'number': 13
}

# Send "start" event
Trakt['scrobble'].start(
    show=show,
    episode=episode,

    progress=1
)

# [...] (watching episode)

# Send "stop" event (scrobble)
Trakt['scrobble'].stop(
    show=show,
    episode=episode,

    progress=93
)

Add a movie to your collection

.. code-block:: python

Trakt['sync/collection'].add({
    'movies': [
        {
            'title': "Twelve Monkeys",
            'year': 1995,

            'ids': {
                'imdb': "tt0114746"
            }
        }
    ]
})

Retrieve shows that a user has watched

.. code-block:: python

# `watched` = {<key>: <Show>} dictionary
watched = Trakt['sync/watched'].movies()

for key, show in watched.items():
    print '%s (%s)' % (show.title, show.year)

License

The MIT License (MIT)

Copyright (c) 2014 Dean Gardiner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].