Getting started in earnest with Adapter API

This commit is contained in:
Sumner Evans
2020-04-17 10:51:04 -06:00
parent 5206f55115
commit 38b29b8909
7 changed files with 378 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
"""
Defines the objects that are returned by adapter methods.
"""
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from typing import List, Optional
@dataclass
class Playlist:
id: str
name: str
songCount: Optional[int]
duration: Optional[timedelta]
created: Optional[datetime]
changed: Optional[datetime]
allowedUser: List[str] = field(default_factory=list)
value: Optional[str] = None
comment: Optional[str] = None
owner: Optional[str] = None
public: Optional[bool] = None
coverArt: Optional[str] = None
@dataclass
class PlaylistDetails:
pass