nelson.cli icon indicating copy to clipboard operation
nelson.cli copied to clipboard

Add paging mechanism to /peer api endpoint

Open H3npi opened this issue 8 years ago • 1 comments

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

H3npi avatar Jan 06 '18 16:01 H3npi

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

romansemko avatar Jan 09 '18 01:01 romansemko