HawAPI SDK for Golang designed to simplify the integration with the API.
Usage
Installation
go get github.com/HawAPI/go-sdk/hawapi@latest
Importing and Requesting
1package main2
3import (4 "fmt"5
6 "github.com/HawAPI/go-sdk/hawapi"7)8
9func main() {10 // Create a new client with default options11 client := hawapi.NewClient()12
13 // Override options14 client.WithOpts(hawapi.Options{15 Endpoint: "http://localhost:8080/api",16 // When using 'WithOpts' or 'NewClientWithOpts' the value of17 // 'UseInMemoryCache' will be set to false18 UseInMemoryCache: true,19 })20
21 res, err := client.ListActors()22 if err != nil {23 panic(err)24 }25
26 fmt.Println(res)27 fmt.Println(len(res.Data))28}