go-bca is the (unofficial) BCA SDK for the Go programming language.
This SDK was kickstarted by the OpenAPI Generator project.
go get github.com/satraul/bca-go
import (
"log"
bca "github.com/satraul/bca-go"
)
func main() {
api := bca.NewAPIClient(bca.NewConfiguration())
auth, err := api.Login(ctx, "username", "password", "1.2.3.4")
if err != nil {
panic(err)
}
balance, err := api.BalanceInquiry(ctx, auth)
if err != nil {
panic(err)
}
log.Printf("% v\n", balance)
if err := api.Logout(ctx, auth); err != nil {
panic(err)
}
}
See the a full example at example/example.go.
All URIs are relative to https://m.klikbca.com
Class | Method | HTTP request | Description |
---|---|---|---|
BCAApi | AccountStatementView | Post /accountstmt.do?value(actions)=acctstmtview | AccountStatementView |
BCAApi | BalanceInquiry | Post /balanceinquiry.do | BalanceInquiry |
BCAApi | Login | Post /authentication.do | Login |
BCAApi | Logout | Get /authentication.do?value(actions)=logout | Logout |
Login will return session cookies ([]*http.Cookie) that are used for auth in all other endpoints.
Pull requests are welcome.