Skip to content

quotersoftware/dist-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributor Integrations SDK Template

This is a guide for developing a Distributor Integration Go SDK which Quoter can integrate on Product Cloud.

Explanation

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.

Usage

  1. Fork this reposistory.
  2. Complete and adapt the TODOs on the code for your API needs.
  3. Publish a release (on Github) following semver.

Example

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)
}

File Structure

auth.go   -> API authentication utils 
client.go -> API client initialization and implementation 
pna.go    -> Product and Availability (Search) implementation

Suggestions

Suggestions or faced any issues? Open an issue here.