This is a loose implementation of the ebay-oauth-java-client for Go
Current Version : 0.2
Download code using go get github.com/calumj/ebay-oauth-go-client
Initialise the default YAML credentials using creds, err := credentials.NewYAML(file)
Once the credentials have been initalised, all further interactions can be done using the API struct, using api := oauth.New(creds)
file, err := os.Open("./ebay-config.yaml")
if err != nil {
log.Fatal(err)
}
creds, err := credentials.NewYAML(file)
if err != nil {
log.Fatal(err)
}
api := oauth.New(creds)
token, client, err := api.GetApplicationTokenAndClient(context.Background(), environment.SANDBOX, "https://api.ebay.com/oauth/api_scope")
if err != nil {
log.Fatal(err)
}