Skip to content
Go client for Usabilla Public API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
internal
.gitignore
LICENSE
README.md
auth.go
auth_test.go
date.go
date_test.go
l4a.go
l4e.go
l4w.go
request.go
request_test.go
resource.go
response.go
signing.go
signing_test.go
usabilla.go

README.md

Usabilla

This is a Go client for Usabilla API.

CircleCI GoDoc

Getting Started

After installing Go and setting up your GOPATH, create a main.go file

package main

import (
    "os"
    "fmt"

    "github.com/usabilla/api-go"
)

func main() {
    key := os.Getenv("USABILLA_API_KEY")
    secret := os.Getenv("USABILLA_API_SECRET")

    // Pass the key and secret which should be defined as ENV vars
    usabilla := usabilla.New(key, secret, nil)

    resource := usabilla.Buttons()

    // Get the first ten buttons
    params := map[string]string{"limit": "10"}
    buttons, _ := resource.Get(params)

    // Print all feedback items for each button
    for _, button := range buttons.Items {
        feedback, _ := resource.Feedback().Get(button.ID, nil)
        fmt.Printf("Feedback for button: %s\n%v\n", button.ID, feedback.Items)
    }
}

Then install usabilla package

go get github.com/usabilla/api-go

Run the file

go run main.go

And you will get all feedback items for each button.

The project includes a more detailed example, which you can run from the root directory of the project

go run example/main.go
You can’t perform that action at this time.