A community driven Golang SDK for Splitwise 3rd-party APIs.
- You should get the package via
go getcommand:
go get -u github.com/anvari1313/splitwise.go
Register your application here and obtain an API key for your app.
Put your API key in your code:
package main
import (
"context""fmt""github.com/anvari1313/splitwise.go"
)
funcmain() {
auth:=splitwise.NewAPIKeyAuth("PUT_YOUR_API_KEY_HERE")
client:=splitwise.NewClient(auth)
currentUser, err:=client.CurrentUser(context.Background())
iferr!=nil {
panic(err)
}
fmt.Println(currentUser)
}