How to use the trakt.interfaces.base.authenticated function in trakt

To help you get started, we’ve selected a few trakt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fuzeman / trakt.py / trakt / interfaces / sync / ratings.py View on Github external
    @authenticated
    def movies(self, store=None, rating=None, **kwargs):
        return self.get('movies', store, rating, **kwargs)
github sharkykh / TraktPlaybackProgressManager / trakt / interfaces / sync / core / mixins.py View on Github external
    @authenticated
    def movies(self, store=None, **kwargs):
        return self.get(
            'movies',
            store,
            **kwargs
        )
github trakt / Plex-Trakt-Scrobbler / Trakttv.bundle / Contents / Libraries / Shared / trakt / interfaces / show / __init__.py View on Github external
    @authenticated
    def scrobble(self, title, year, season, episode, duration, progress, credentials=None, **kwargs):
        """Notify trakt that a user has finished watching a show.

        This commits the show to the users profile. You should use show/watching
        prior to calling this method.

        :param title: Show title.
        :type title: str

        :param year: Show year.
        :type year: int

        :param season: Show season. Send 0 if watching a special.
        :type season: int

        :param episode: Show episode.
github fuzeman / trakt.py / trakt / interfaces / sync / core / mixins.py View on Github external
    @authenticated
    def add(self, items, **kwargs):
        response = self.http.post(
            data=items,
            **popitems(kwargs, [
                'authenticated',
                'validate_token'
            ])
        )

        return self.get_data(response, **kwargs)
github fuzeman / trakt.py / trakt / interfaces / users / __init__.py View on Github external
    @authenticated
    def likes(self, type=None, **kwargs):
        if type and type not in ['comments', 'lists']:
            raise ValueError('Unknown type specified: %r' % type)

        if kwargs.get('parse') is False:
            raise ValueError("Parse can't be disabled on this method")

        # Send request
        response = self.http.get(
            'likes',
            params=[type],
            **popitems(kwargs, [
                'authenticated',
                'validate_token'
            ])
        )
github timbooo / traktforalfred / trakt / interfaces / sync / watchlist.py View on Github external
    @authenticated
    def episodes(self, store=None, **kwargs):
        return self.get(
            'episodes',
            store,
            **kwargs
        )
github fuzeman / trakt.py / trakt / interfaces / users / lists / list_.py View on Github external
    @authenticated
    def like(self, username, id, **kwargs):
        # Send request
        response = self.http.post(
            '/users/%s/lists/%s/like' % (clean_username(username), id),
            **popitems(kwargs, [
                'authenticated',
                'validate_token'
            ])
        )

        return 200 <= response.status_code < 300
github trakt / Plex-Trakt-Scrobbler / Trakttv.bundle / Contents / Libraries / Shared / trakt / interfaces / movie / __init__.py View on Github external
    @authenticated
    def library(self, movies, **kwargs):
        """Add movies to your library collection.

        :param movies: list of movies to add to your collection
        :type movies: list of dict {title, year, [imdb_id]}
        """
        return self.action(
            'library', data={
                'movies': movies
            },
            **kwargs
        )
github fuzeman / trakt.py / trakt / interfaces / users / lists / list_.py View on Github external
    @authenticated
    def update(self, username, id, name=None, description=None, privacy=None, display_numbers=None,
               allow_comments=None, return_type='object', **kwargs):
        data = {
            'name': name,
            'description': description,

            'privacy': privacy,
            'allow_comments': allow_comments,
            'display_numbers': display_numbers
        }

        # Remove attributes with `None` values
        for key in list(data.keys()):
            if data[key] is not None:
                continue
github fuzeman / trakt.py / trakt / interfaces / sync / ratings.py View on Github external
    @authenticated
    def seasons(self, store=None, rating=None, **kwargs):
        return self.get('seasons', store, rating, **kwargs)