go-jaccount is a Go Client for jAccount API.
go get github.com/dyweb/go-jaccount
// OAuth 2.0 configuration
var config = &oauth2.Config{
ClientID: os.Getenv("clientid"),
ClientSecret: os.Getenv("secretkey"),
Endpoint: jaccount.Endpoint,
RedirectURL: "http://localhost:8000/callback",
Scopes: []string{"essential"},
}
var client *jaccount.Client
c := config.Client(oauth2.NoContext, token)
// jAccount API client
client = jaccount.NewClient(c)
// Get the profile of the user
profile, err := client.Profile.Get(context.Background())
Apache 2.0