Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update GET /api/peers?limit=xxx&offset=yyy&state=zzz endpoint #5254

Closed
shuse2 opened this issue Apr 30, 2020 · 0 comments · Fixed by #5538
Closed

Update GET /api/peers?limit=xxx&offset=yyy&state=zzz endpoint #5254

shuse2 opened this issue Apr 30, 2020 · 0 comments · Fixed by #5538

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Apr 30, 2020

Description

Add the endpoints:

  • GET /api/peers?limit=xxx&offset=yyy&state=zzz

according to the following specification:

  • It should return decoded peers
  • Validate if limit and offset are valid numbers
  • Validate if state is either connected or disconnected
  • If query params are not specified, it should default to limit=100, offset=0, state=connected

Motivation

The HTTP API should return the stored peers in the attached node.

Acceptance Criteria

  • Add unit tests
  • Register plugin to core, and check if it returns decoded data
  • Check if invalid query returns 400 with error message

Additional Information

Related issues: #5213

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants