-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Matatika/feature/audio-features
Sync audio features for tracks
- Loading branch information
Showing
2 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Schema definitions for audio features objects""" | ||
|
||
from singer_sdk.typing import ( | ||
IntegerType, | ||
NumberType, | ||
PropertiesList, | ||
Property, | ||
StringType, | ||
) | ||
|
||
from tap_spotify.schemas.utils.custom_object import CustomObject | ||
|
||
|
||
class AudioFeaturesObject(CustomObject): | ||
""" | ||
https://developer.spotify.com/documentation/web-api/reference/#/operations/get-audio-features | ||
https://developer.spotify.com/documentation/web-api/reference/#/operations/get-several-audio-features | ||
""" | ||
|
||
properties = PropertiesList( | ||
Property("acousticness", NumberType), | ||
Property("analysis_url", StringType), | ||
Property("danceability", NumberType), | ||
Property("duration_ms", IntegerType), | ||
Property("energy", NumberType), | ||
Property("id", StringType), | ||
Property("instrumentalness", NumberType), | ||
Property("key", IntegerType), | ||
Property("liveness", NumberType), | ||
Property("loudness", NumberType), | ||
Property("mode", IntegerType), | ||
Property("speechiness", NumberType), | ||
Property("tempo", NumberType), | ||
Property("time_signature", IntegerType), | ||
Property("track_href", StringType), | ||
Property("type", StringType), | ||
Property("uri", StringType), | ||
Property("valence", NumberType), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters