Skip to content

satraul/bca-go

Repository files navigation

bca-go

go-bca is the (unofficial) BCA SDK for the Go programming language.

This SDK was kickstarted by the OpenAPI Generator project.

Installation

go get github.com/satraul/bca-go

Usage

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.

Documentation for API Endpoints

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

Documentation For Authorization

Login will return session cookies ([]*http.Cookie) that are used for auth in all other endpoints.

Contributing

Pull requests are welcome.

License

MIT