go_gilt_api is a simple, transparent Go package for accessing the Gilt API.
Successful API queries return native Go structs that can be used immediately, with no need for type assertions.
You will need a gilt api key which you can get at api.gilt.com and instantiate your client as:
api := go_gilt_api.NewGiltApi("your-api-key")
go_gilt_api will implement the endpoints defined in the api.gilt.com resources For clarity, in most
cases, the function name is simply the name of the HTTP method and the endpoint
(e.g., the endpoint GET /sales/active
is provided by the function GetSalesActive
).
activeSales, err := api.GetSalesActive()
if err != nil {
fmt.Errorf("GetSearch yielded error %s", err.Error())
panic(err)
}
for _ , sale := range searchResult {
fmt.Print(sale.Name)
}