Go (golang) client library for accessing the Colete Online API.
go get github.com/radulucut/coleteonline
- /search/country/{needle}
- /search/location/{countryCode}/{needle}
- /search/city/{countryCode}/{county}/{needle}
- /search/street/{countryCode}/{city}/{county}/{needle}
- /search/postal-code/{countryCode}/{city}/{county}/{street}
- /search/validate-postal-code/{countryCode}/{city}/{county}/{street}/{postalCode}
- /search/postal-code-reverse/{countryCode}/{postalCode}
- /address
- /service/list
- /order
- /order/price
- /order/status/{uniqueId}
- /order/awb/{uniqueId}
- /user/balance
package main
import (
"fmt"
"log"
"time"
"github.com/radulucut/coleteonline"
)
func main() {
client := coleteonline.NewClient(coleteonline.Config{
ClientId: "<ClientId>",
ClientSecret: "<ClientSecret>",
UseProduction: true,
Timeout: 10 * time.Second,
})
order := &coleteonline.Order{
// ...
}
res, err := client.CreateOrder(order)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", res)
}