Skip to content

Commit

Permalink
Add PlaybackEntry dataclass
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 7, 2024
1 parent b37c570 commit 097c3fc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions trakt/sync.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# -*- coding: utf-8 -*-
"""This module contains Trakt.tv sync endpoint support functions"""
from collections import defaultdict
from dataclasses import dataclass
from datetime import datetime, timezone
from typing import Any

from deprecated import deprecated

Expand All @@ -10,12 +12,23 @@

__author__ = 'Jon Nappi'
__all__ = ['Scrobbler', 'comment', 'rate', 'add_to_history', 'get_collection',
'PlaybackEntry',
'get_watchlist', 'add_to_watchlist', 'remove_from_history',
'remove_from_watchlist', 'add_to_collection',
'remove_from_collection', 'search', 'search_by_id', 'checkin_media',
'delete_checkin']


@dataclass(frozen=True)
class PlaybackEntry:
progress: float
paused_at: str
id: int
type: str
# data for "type" structure
data: Any


@post
def comment(media, comment_body, spoiler=False, review=False):
"""Add a new comment to a :class:`Movie`, :class:`TVShow`, or
Expand Down

0 comments on commit 097c3fc

Please sign in to comment.