Get single nodes from bank and validator class
tomijaga opened this issue · 3 comments
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
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?
@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