This is a guide for developing a Distributor Integration Go SDK which Quoter can integrate on Product Cloud.
This template is an API Wrapper which implements the Search
function from the APIClient
. This gives the ability for Quoter APIs to search and display products on Product Cloud.
- Fork this reposistory.
- Complete and adapt the TODOs on the code for your API needs.
- Publish a release (on Github) following semver.
func main() {
client, err := sdk.NewClient(sdk.NewClientOpts{
ID: clientID,
Secret: clientSecret,
})
if err != nil {
fmt.Println(err)
}
resp, err := client.Search(context.Background(), SearchOpts{
UniqueIdentifier: "product-123",
})
if err != nil {
fmt.Println(err)
return
}
fmt.Println(resp)
}
auth.go -> API authentication utils
client.go -> API client initialization and implementation
pna.go -> Product and Availability (Search) implementation
Suggestions or faced any issues? Open an issue here.