Go-Hive v0.2.0: Get Blog Data

in HiveDevs5 years ago (edited)

Gopher drawing by Rene French

This update contains the condenser methods used to access an account's blog. The only one left out is get_tags_used_by_author since "api.hive.blog" does not have the tags plugin enabled.

Example Usage:

package main

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

    blog, err := c.GetBlog("jrswab", 0, 1)
    if err != nil {
        fmt.Println(err)
    }
    // Returns the body of the first post returned
    fmt.Println(blog[0].Body)
}

v0.2.0 Changelog

Added

  • Condenser Methods:
    • GetBlog
    • GetBlogEntries
    • GetFollowCount
    • GetFollowers
    • GetContent
    • GetContentReplies
    • GetRebloggedBy
    • GetReblogs (get_blog_authors)
  • Unit tests for blog.go methods

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. git send-email --to="~jrswab/[email protected]" HEAD^
    • This creates and sends a patch with your updates.

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


The project adheres to Semantic Versioning, is licensed under the BSD 3-Clause License, and all development is located at git.sr.ht/~jrswab/go-hive.

Sort:  

Hi! Go-Hive was added to HiveProjects.io - directory of apps, sites & tools created for Hive. You can also join Hive Projects Community to be on time with all new informations!