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

Get single nodes from bank and validator class #121

Closed
tomijaga opened this issue Apr 1, 2021 · 3 comments · Fixed by #125
Closed

Get single nodes from bank and validator class #121

tomijaga opened this issue Apr 1, 2021 · 3 comments · Fixed by #125

Comments

@tomijaga
Copy link
Contributor

tomijaga commented Apr 1, 2021

Task

Contributors are able to complete this task and earn thenewboston coins. Check out the labels to learn how much you can earn for contributing by completing this task. Please make sure to be honest if you wish to contribute by saying you can't finish this and we can just un-assign you with no harm done! There is no point in delaying tasks from being completed for miscommunication!

Overview

Get single nodes from bank and validator class

  • getValidator
  • getBank

Behavior

Methods should return a single record of the node or account requested

Please ask for this task to be assigned to you and earn and its sweet reward 😉

Remember to include your account number in your PR description for us to pay you 💰

** Pull Requests **
All Pull Request should be made to development branch, read contributors guild for more information about contributing

@tomijaga
Copy link
Contributor Author

tomijaga commented Apr 1, 2021

Will complete this once #120 merged

@sisco0
Copy link

sisco0 commented Apr 2, 2021

Hello @tomijaga. Should these methods return the first result in the pagination results array, or should a query be accomplished using account_number, node_identifier or any other field for filtering and getting the first result?

@tomijaga
Copy link
Contributor Author

tomijaga commented Apr 2, 2021

@sisco0 The API uses a node_identifier param to get a single node. So all we need to is specify the node_identifier as a parameter on the banks/validators endpoints and the nodes will return the details for the requested node
You can view the documentation here: https://thenewboston.com/bank-api/validators

You can use this bank server to test it out
http://13.57.215.62/banks/01181490ac0fa6f73bd980adb81f1a3e72f81eb6b4ccab4dac8b6db7544e5eb1

Edit: I removed the getAccount method because the Api doesn't support it

@tomijaga tomijaga changed the title Get single nodes or accounts from bank and validator class Get single nodes from bank and validator class Apr 2, 2021
@zinoadidi zinoadidi linked a pull request Apr 3, 2021 that will close this issue
@zinoadidi zinoadidi added the Paid label May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants