Go library for the Clever API
Switch branches/tags
Clone or download
Pull request Compare This branch is 115 commits behind Clever:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
.gitignore
.travis.yml
Makefile
README.md
clever.go
clever_test.go
mock.go

README.md

clever-go

Build Status

Usage

package main

import (
	"fmt"
	clevergo "github.com/Clever/clever-go"
	"os"
)

func main() {
	clever := clevergo.New(clevergo.Auth{"DEMO_KEY", ""}, "https://api.clever.com")
	resp := &clevergo.DistrictsResp{}
	if err := clever.Query("/v1.1/districts", map[string]string{}, resp); err != nil {
		fmt.Fprintf(os.Stderr, "Error getting districts: %s \n", err)
	}

	for _, dresp := range resp.Districts {
		fmt.Println(dresp.District)
	}
}