diff options
author | HombreLaser <sebastian-440@live.com> | 2022-05-14 14:39:45 -0500 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2022-05-14 14:39:45 -0500 |
commit | 74b01c4942e38afce9efdf60fa46ab573f4f6f86 (patch) | |
tree | 54f788021b8933c15b4b79fbc3200130343062cb /src/ampache/models.py |
Commit inicial
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}" |