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

Update response schemas to match the latest API version #13

Merged
merged 7 commits into from
Jan 26, 2023

Conversation

InputUsername
Copy link
Owner

@InputUsername InputUsername commented Jan 16, 2023

ListenBrainz silently changed their response schemas, this PR addresses those changes (as reported in #12).

  • user/{user_name}/playing-now:
    • Add UserPlayingNowPayload::playing_now;
    • Add UserPlayingNowListen::playing_now;
    • Remove `UserPlayingNowListen::{user_name, inserted_at, recording_msid}.
  • user/{user_name}/listens:
    • Change the type of UserListensListen::inserted_at from String to i64.
  • stats/sitewide/artists:
    • Remove StatsSitewideArtistsPayload::time_ranges;
    • Add StatsSitewideArtistsPayload::artists;
    • Remove StatsSitewideArtistsTimeRange;
    • Remove StatsSitewideArtistsArtist::artist_msid.
  • stats/user/{user_name}/artist-map:
    • Change the return type of Client::stats_user_artist_map from Result<StatsUserArtistMapResponse, Error>
      to Result<Option<StatsUserArtistMapResponse>, Error>.
  • users/{user_list}/recent-listens:
    • Remove Client::users_recent_listens;
    • Remove UsersRecentListensResponse;
    • Remove UsersRecentListensPayload;
    • Remove UsersRecentListensListen;
    • Remove UsersRecentListensTrackMetadata;
    • Remove examples/users_recent_listens.rs.

@shymega
Copy link
Collaborator

shymega commented Jan 18, 2023

@InputUsername I'll review this tomorrow evening after I get back from my job interview.

@InputUsername
Copy link
Owner Author

@shymega perfect, thanks! And best of luck with your job interview 😄

shymega
shymega previously approved these changes Jan 19, 2023
Copy link
Collaborator

@shymega shymega left a comment

Choose a reason for hiding this comment

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

@InputUsername This all looks fine to me, I think we should make it clear in bold that it's a breaking change release, given a fair amount of return types have been modified, but other than that, excellent! 💯

@shymega
Copy link
Collaborator

shymega commented Jan 19, 2023

@shymega perfect, thanks! And best of luck with your job interview smile

Thanks! It went great, last time it didn't go so well (virtual, and it was mostly my fault), but this time they said my professionalism, body language, and questions/answers were vastly improved, so fingers crossed!

@InputUsername
Copy link
Owner Author

InputUsername commented Jan 20, 2023

@shymega

@InputUsername This all looks fine to me, I think we should make it clear in bold that it's a breaking change release, given a fair amount of return types have been modified, but other than that, excellent! 💯

Thanks! It definitely makes sense to indicate the breakage more clearly (even though it's not technically required), so I've added a note to the changelog.

Thanks! It went great, last time it didn't go so well (virtual, and it was mostly my fault), but this time they said my professionalism, body language, and questions/answers were vastly improved, so fingers crossed!

That's great, hoping for the best 🤞

@InputUsername InputUsername requested a review from shymega January 20, 2023 09:02
Copy link
Collaborator

@shymega shymega left a comment

Choose a reason for hiding this comment

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

All good, much better to present it as a breaking change.

@InputUsername InputUsername merged commit 5de1c2b into main Jan 26, 2023
@InputUsername InputUsername deleted the fix/responses branch January 26, 2023 14:54
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