diff options
Diffstat (limited to 'src/ampache/models.py')
-rw-r--r-- | src/ampache/models.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ampache/models.py b/src/ampache/models.py new file mode 100644 index 0000000..2e0ed1b --- /dev/null +++ b/src/ampache/models.py @@ -0,0 +1,25 @@ +""" +The data structures of the ampache API (songs, artists, albums, etc). +""" +from dataclasses import dataclass +import datetime + + +@dataclass +class AuthToken: + expires: datetime.datetime + auth: str + + def __str__(self): + return f"Expires: {self.expires}\nToken: {self.auth}" + + +@dataclass +class Song: + song_id: str + title: str + album: str + artist: str + + def __str__(self): + return f"{self.title} by {self.artist}" |