https://github.com/dyweb/go-jaccount
Go Client for jAccount
https://github.com/dyweb/go-jaccount
go oauth2 oauth2-client shanghai-jiao-tong-university sjtu
Last synced: 5 months ago
JSON representation
Go Client for jAccount
- Host: GitHub
- URL: https://github.com/dyweb/go-jaccount
- Owner: dyweb
- License: apache-2.0
- Created: 2020-03-02T18:43:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-10T09:34:59.000Z (over 3 years ago)
- Last Synced: 2025-04-19T22:35:13.876Z (6 months ago)
- Topics: go, oauth2, oauth2-client, shanghai-jiao-tong-university, sjtu
- Language: Go
- Homepage: https://pkg.go.dev/github.com/dyweb/go-jaccount
- Size: 80.1 KB
- Stars: 12
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Go Client for jAccount
[](https://github.com/dyweb/go-jaccount/actions)
[](https://goreportcard.com/report/github.com/dyweb/go-jaccount)
[](https://pkg.go.dev/github.com/dyweb/go-jaccount)
[](https://github.com/dyweb/go-jaccount/blob/master/LICENSE)go-jaccount is a Go Client for jAccount API.
## Installation
```shell
go get github.com/dyweb/go-jaccount
```## Example
```go
// 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
- [google/go-github](https://github.com/google/go-github)
## License
Apache 2.0