Go-Hive 0.1.0 - Get Account Functionality Added

in HiveDevs4 years ago (edited)

go-hive-update-v0.1.0
Gopher drawing by Rene French

Finally got some functionality into the project and I hope to have a good chunk of free time soon to plug away at it more.

What's added in v0.1.0?

  • NewChain helper function to create the chain struct.
  • GetAccountBandwidth to return the "forum" bandwidth for an account.
  • GetAccountCount to return the total number of accounts on the network.
  • GetAccountHistory to return the account's historical data.
  • GetAccountReputation to return an account's current reputation.
  • GetAccounts for retrieving account metadata
  • Unit tests for the methods and functions mentioned above

Usage Example:

package main

import (
    "fmt"
    a "git.sr.ht/~jrswab/go-hive"
)
func main () {
    c := a.NewClient()

    accData, err := c.GetAccounts("jrswab")
    if err != nil {
        fmt.Println(err)
    }
    fmt.Println(data[0].Balance)
}

Contributing:

The preferred contribution approach:

  1. Fork
  2. Make a new branch
  3. Write code
  4. Run the unit tests
  5. Update and add tests as needed
  6. Commit to your branch.
  7. Switch back to master
  8. git pull origin master
  9. git merge [your branch name] and resolve any conflicts
  10. Use git send-email --to="~jrswab/[email protected]" HEAD^ to create and send a patch.

Please use the Sourcehut Email Etiquettes when sending patches.
Using git send-email will take care of most of the etiquette for you.

To learn how to send patches with git send-email check out the tutorial at git-send-email.io

More Information:

Sort:  

More more. Let's get everyone here