J. R. Swab avatar

Go-Hive 0.1.0 - Get Account Functionality Added

jrswab

Published: 02 Apr 2020 โ€บ Updated: 02 Apr 2020Go-Hive 0.1.0 - Get Account Functionality Added

Go-Hive 0.1.0 - Get Account Functionality Added

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/go-hive-dev@lists.sr.ht" 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:

Leave Go-Hive 0.1.0 - Get Account Functionality Added to:

Written by

Christian Blogger & Podcaster Writing About Technology & Self Improvement. ๐Ÿฆ… Eagle Scout ๐Ÿ‘จโ€๐Ÿ’ป Programmer ๐Ÿ“— Komencanto Esperantisto.

Read more #hive posts


Best Posts From J. R. Swab

We have not curated any of jrswab's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From J. R. Swab