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

Partial objects and lazy loading #21

Closed
kawaii opened this issue Mar 5, 2019 · 1 comment
Closed

Partial objects and lazy loading #21

kawaii opened this issue Mar 5, 2019 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@kawaii
Copy link
Member

kawaii commented Mar 5, 2019

Objects need to know when they have not been fully populated. This can happen when the API sends us a subset of a hash instead of a full object hash.

This knowledge would also help us determine whether an object is new and thus needs to be created on Discord's end.

We could probably use the same or similar mechanism to know whether we need to update any fields, and which ones, thus enabling us to send PUT (or PATCH if that's an option) instead of a POST, which would help with #16.

We can also use this for lazy loading since we can populate an object with just its ID (for example) and let it fetch the rest of the data as needed.

@kawaii kawaii added the enhancement New feature or request label Mar 5, 2019
@kawaii kawaii added this to the 1.0 milestone Mar 5, 2019
@Altreus
Copy link
Member

Altreus commented Mar 28, 2020

We've implemented this using Object::Delayed

@Altreus Altreus closed this as completed Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants