Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 1.16 KB

README.md

File metadata and controls

50 lines (39 loc) · 1.16 KB

Apiary API - Golang library

Build Status GoDoc Coverage Status Go Report Card

Description

This is a small golang library that will provide support for Apiary API.

Installation

go get github.com/m1ome/apiary

Usage

package main

import (
    "fmt"
    "log"
    "os"

    "github.com/m1ome/apiary"
)

func main() {
    token := os.Getenv("APIARY_TOKEN")

    api := NewApiary(ApiaryOptions{
        Token: Token,
    })

    response, err := api.Me()
    if err != nil {
        log.Fatal(err)
    }

    fmt.Printf("ID: %d\n", response.ID)
    fmt.Printf("Name: %s\n", response.Name)
    fmt.Printf("URL: %s\n", response.URL)
}

Testing

go get gopkg.in/jarcoal/httpmock.v1
go test -v ./...