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

Deserialize meta #286

Merged
merged 3 commits into from
Dec 11, 2019
Merged

Conversation

timoreimann
Copy link
Contributor

This change deserializes the meta field into the response, allowing easy access to the total number of objects returned by API operations yielding collections.

We also remove links and meta fields from stubbed getters that do not return collections: according to the respective documentations, links and meta fields won't be included for single element responses.

For now, I have only implemented the change for storage (volumes and snapshots). I'd appreciate getting some initial feedback on the approach, after which I'm more than happy to support all other collection-returning API operations as well.

Timo Reimann added 2 commits December 11, 2019 00:43
@zachgersh zachgersh merged commit 2a444d2 into digitalocean:master Dec 11, 2019
Copy link
Member

@bentranter bentranter left a comment

Choose a reason for hiding this comment

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

One note about the deprecated changelog file, other than that looks good to me. Thanks @timoreimann!

@@ -1,5 +1,9 @@
# Change Log

## unreleased
Copy link
Member

Choose a reason for hiding this comment

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

We've deprecated this changelog file in favour of using GitHub's release notes. Could you remove this entry?

Copy link
Member

Choose a reason for hiding this comment

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

Okay never mind, looks like Zach merged this already. I can do this.

Copy link
Member

Choose a reason for hiding this comment

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

Ohhh wait, I'm totally wrong, thought we did this here as well as doctl, but it's only for doctl. False alarm everyone 🤦‍♂

@timoreimann timoreimann deleted the deserialize-meta branch December 11, 2019 19:35
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.

3 participants