Repository berikut ini merupakan porting dari ovoid untuk Go
go get github.com/adibaulia/ovoid-go
Anda harus mendapatkan Token untuk menggunakan API Ovo.
Langkah 1
package main
import (
ovo "github.com/adibaulia/ovoid-go"
)
func main(){
login, err := ovo.NewOvoLogin("your_phone")
if err != nil {
...
}
l, err := login.Login2FA()
if err != nil {
...
}
Langkah 2
accessToken, err := login.Login2FAVerify(l.RefID, "your_verification_code")
if err != nil {
...
}
Langkah 3
auth, err := login.LoginSecurityCode(accessToken.UpdateAccessToken)
if err != nil {
...
}
YOUR_TOKEN := auth.Token
Lalu gunakan YOUR_TOKEN untuk menggunakan package ovoid. Contoh:
package main
import (
ovo "github.com/adibaulia/ovoid-go"
)
func main(){
o, err := ovo.NewClient("YOUR_TOKEN")
if err != nil {
...
}
b, err := o.GetAllBalance()
if err != nil {
...
}
}
Masih dalam pengembangan. Silahkan Pull Request untuk berkontribusi.
Thank You !