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 UC of partial collection #165

Closed
wants to merge 3 commits into from

Conversation

tpluscode
Copy link
Contributor

@tpluscode tpluscode commented May 13, 2018

Fixes #163

I've updated the example of a partial collection to be represented using the PartialCollectionView as agreed in #42.


This change is Reviewable

// do something with the _member_, i.e. display it
}
// load some more on demand
data = client.get(data.next);
for (const member of data.members) {
collection = client.get(data.view[0].next);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alien-mcl Maybe this snippet could already use the new API as proposed in HydraCG/Heracles.ts#34

Copy link
Member

Choose a reason for hiding this comment

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

I think it's a good idea. I'll try to update that PR with API "release candidate" :)

Choose a reason for hiding this comment

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

If I am correct we have also replaced get method with getResource. If no one is working on this then I would like to create a PR adapting use cases to new client API.

@tpluscode
Copy link
Contributor Author

@lanthaler, do we still keep the second items property to give the number in a single view?

{
  "totalItems": 100, // total
  "view": [{
    "items": 10 // this page/view
  }]
}

@lanthaler
Copy link
Member

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


drafts/use-cases/3.2.pagination.md, line 26 at r1 (raw file):

Previously, alien-mcl (Karol Szczepański) wrote…

I think it's a good idea. I'll try to update that PR with API "release candidate" :)

Yeah, just calling next here would be problematic as that would return the PartialCollectionView instead. Also, you renamed data to collection so you need to change it in this line as well


Comments from Reviewable

@lanthaler
Copy link
Member

Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@tpluscode
Copy link
Contributor Author

Closing as we no longer have maintain these use case document in this repo.

@tpluscode tpluscode closed this Apr 1, 2019
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.

4 participants