A community driven Golang SDK for Splitwise 3rd-party APIs.
- You should get the package via
go get
command:
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"
)
func main() {
auth := splitwise.NewAPIKeyAuth("PUT_YOUR_API_KEY_HERE")
client := splitwise.NewClient(auth)
currentUser, err := client.CurrentUser(context.Background())
if err != nil {
panic(err)
}
fmt.Println(currentUser)
}