// Generate a token and OAuth tokens here: https://stores.xoxoday.com/admin/accounts/platform-preferences/
const t = `{"success":1,"status":200,"access_token":"eyJ...`
var token xoxoday.Token
if err := json.Unmarshal([]byte(t), &token); err != nil {
return fmt.Errorf("failed to parse token: %w", err)
}
api := xoxoday.New(
context.Background(),
xoxoday.EnvDevelopment,
token,
xoxoday.OAuthConfig{
ClientID: "As generated on the URL above",
ClientSecret: "As generated on the URL above",
},
)
res, err := api.Balance()
if err != nil {
return fmt.Errorf("failed to get balance: %w", err)
}
fmt.Printf("Balance: %f%s\n", res.Points, res.Currency)
Go client for the xoxoday.com API
License
helsinki-systems/xoxoday
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Go client for the xoxoday.com API
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published