https://github.com/satraul/bca-go
KlikBCA Client SDK for Go
https://github.com/satraul/bca-go
bca go
Last synced: about 1 year ago
JSON representation
KlikBCA Client SDK for Go
- Host: GitHub
- URL: https://github.com/satraul/bca-go
- Owner: satraul
- License: mit
- Created: 2020-08-21T00:34:46.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-29T04:07:25.000Z (over 3 years ago)
- Last Synced: 2023-07-27T22:36:19.986Z (almost 3 years ago)
- Topics: bca, go
- Language: Go
- Homepage:
- Size: 56.6 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bca-go
go-bca is the (unofficial) BCA SDK for the Go programming language.
This SDK was kickstarted by the [OpenAPI Generator](https://openapi-generator.tech) project.
## Installation
```shell
go get github.com/satraul/bca-go
```
## Usage
```golang
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](example/example.go).
## Documentation for API Endpoints
All URIs are relative to *https://m.klikbca.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BCAApi* | [**AccountStatementView**](docs/BCAApi.md#accountstatementview) | **Post** /accountstmt.do?value(actions)=acctstmtview | AccountStatementView
*BCAApi* | [**BalanceInquiry**](docs/BCAApi.md#balanceinquiry) | **Post** /balanceinquiry.do | BalanceInquiry
*BCAApi* | [**Login**](docs/BCAApi.md#login) | **Post** /authentication.do | Login
*BCAApi* | [**Logout**](docs/BCAApi.md#logout) | **Get** /authentication.do?value(actions)=logout | Logout
## Documentation For Authorization
[**Login**](docs/BCAApi.md#login) will return session cookies ([]*http.Cookie) that are used for auth in all other endpoints.
## Contributing
Pull requests are welcome.
## License
[MIT](LICENSE)