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

[Fix] API Url #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[Fix] API Url #25

wants to merge 1 commit into from

Conversation

KhadijaMahanga
Copy link
Contributor

Description

Fix wrong api url in the curl example.
Screenshot from 2021-01-29 11-35-00

to

http://api.sensors.africa/v1/node/

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Screenshots

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@vercel
Copy link

vercel bot commented Jan 29, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/codeforafrica/wb-sensors-dashboard/d5ar3qvkl
✅ Preview: https://wb-sensors-dashboard-git-documentation.codeforafrica.vercel.app

@gertie-sheshe
Copy link
Contributor

@KhadijaMahanga is this therefore wrong? https://github.com/CodeForAfrica/WB-sensors-Dashboard/blob/master/src/pages/api/nodes/index.js#L12 We are fetching from /v2/nodes 🤔

@KhadijaMahanga
Copy link
Contributor Author

@gertie-sheshe v2/nodes returns other nodes that may or may not belong to a particular network. From @kilemensi's explanation it is optimized for map.

@KhadijaMahanga
Copy link
Contributor Author

@gertie-sheshe more explanation on this, v2/nodes/ returns all nodes that have been active in the last 5 minutes. So if you want network specific use or regardless of last time active use v1/node/

@kilemensi
Copy link
Member

Hey @KhadijaMahanga / @gertie-sheshe

Sorry for missing this discussion so far:

  1. Is v1/node returning the same format as v2/nodes?
  2. If yes, we can switch now, otherwise we need to "process" the returned results a bit I think.

PS: I also think v1/node returns paginated results while v2/nodes doesn't

Base automatically changed from master to main February 11, 2021 10:44
@gertie-sheshe
Copy link
Contributor

Hey @KhadijaMahanga Is this still in need of a review?

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.

None yet

3 participants