Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Missing schema properties #107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tap_spotify/schemas/album.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
th.Property("href", th.StringType),
th.Property("id", th.StringType),
th.Property("images", th.ArrayType(ImageObject)),
th.Property("is_playable", th.BooleanType),
th.Property("name", th.StringType),
th.Property("release_date", th.StringType),
th.Property("release_date_precision", th.StringType),
Expand Down
6 changes: 6 additions & 0 deletions tap_spotify/schemas/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@
th.Property("type", th.StringType),
th.Property("uri", th.StringType),
)

PlaylistTrackObject = th.PropertiesList(
*TrackObject,
th.Property("episode", th.BooleanType),
th.Property("track", th.BooleanType),
)
4 changes: 2 additions & 2 deletions tap_spotify/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from tap_spotify.client import SpotifyStream
from tap_spotify.schemas.artist import ArtistObject
from tap_spotify.schemas.audio_features import AudioFeaturesObject
from tap_spotify.schemas.track import TrackObject
from tap_spotify.schemas.track import PlaylistTrackObject, TrackObject
from tap_spotify.schemas.utils.rank import Rank
from tap_spotify.schemas.utils.synced_at import SyncedAt

Expand Down Expand Up @@ -197,7 +197,7 @@ class _PlaylistTracksStream(_RankStream, _SyncedAtStream, _TracksStream):

records_jsonpath = "$.tracks.items[*].track"
schema = th.PropertiesList(
*TrackObject,
*PlaylistTrackObject,
*AudioFeaturesObject,
*Rank,
*SyncedAt,
Expand Down