You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/calumj/ebay-oauth-go-client

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/calumj/ebay-oauth-go-client

v0.0.0-20200123104330-8540e6d72ffc
Source
Go
Version published
Created
Source

eBay OAuth Client Library (Go)

This is a loose implementation of the ebay-oauth-java-client for Go

How To Install

Current Version : 0.2

Download code using go get github.com/calumj/ebay-oauth-go-client

How To Use

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)

Example Client Credentials

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

FAQs

Package last updated on 23 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts