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

Add paging mechanism to /peer api endpoint #41

Open
H3npi opened this issue Jan 6, 2018 · 1 comment
Open

Add paging mechanism to /peer api endpoint #41

H3npi opened this issue Jan 6, 2018 · 1 comment

Comments

@H3npi
Copy link

H3npi commented Jan 6, 2018

Expected behaviour

when calling the Endpoint there should be a metadatalist which contains the following information:
totalPeers:
numberOfPeers:
offset:
data:

the totalPeers are the total number of peers in the peer.list
numberOfPeers are the number of peers contained in the data object
offset: how many peers are skipped.
data: the actual peer objects

This would need a sorting at some point, i suggest data._id from the peer as a sorting indicator.

Actual behaviour

you get all the peers at once

Steps to reproduce

make a call to /peers

@romansemko
Copy link

I would consider adding a full express app as api endpoint. More flexibility in the future. Also regarding the versioning.

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

No branches or pull requests

2 participants