go-jaccount

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: Apache-2.0

README

Go Client for jAccount

Build Status Go Report Card GoDoc License

go-jaccount is a Go Client for jAccount API.

Installation

go get github.com/dyweb/go-jaccount

Example

// 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())

References

License

Apache 2.0

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL