Skip to content

Adding support for Podcasts#436

Closed
shayo wants to merge 3 commits intoJohnnyCrazy:masterfrom
shayo:master
Closed

Adding support for Podcasts#436
shayo wants to merge 3 commits intoJohnnyCrazy:masterfrom
shayo:master

Conversation

@shayo
Copy link
Copy Markdown
Contributor

@shayo shayo commented Apr 13, 2020

Adding new models that represent Show and Episodes.
Modified several functions to support returning both tracks and episodes. The major change is in PlaybackContext Item field that is now an interface. This solves the issue that the same returned json field (item) can be either a track or an episode.

shayo added 2 commits April 12, 2020 21:14
Mostly small changes except for one major (Item in PlaybackContext).
Since Item can be either FullTrack or FullEpisode, I had to use an interface that decodes this on the fly.
@shayo
Copy link
Copy Markdown
Contributor Author

shayo commented Apr 13, 2020

I just noticed that there have also been changes to other endpoints. Namely /playlists/{playlist_id}/tracks. I implemented those as well and added a couple of bug fixes.

{
[JsonProperty("album")]
public SimpleAlbum Album { get; set; }

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small rant: Their docs are so inconsistent, it's really annoying at this point.

On this page: https://developer.spotify.com/documentation/web-api/reference/playlists/get-playlists-tracks/

It says 3 different things:

On success, the response body contains an array of track objects and episode objects

Where the link goes to track-object-simplified, containing NO album property

track object (full)

This is documented on the page although it's theoretically never used in the call?

playlist track object

Contains a link to track-object-full.

@JohnnyCrazy
Copy link
Copy Markdown
Owner

I added some changes but I was unable to update your fork, let's continue in #437

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants