Un-official OVOid Python3 Client
python3 setup.py install
Fungsi | Status |
---|---|
login2FA |
OK |
verifyLogin2FA |
OK |
loginSecurityCode |
OK |
getBudget |
OK |
getFrontModel |
OK |
generateTrxId |
OK |
transferOvoBalance |
Error: Invalid Model |
logout |
OK |
getUnreadNotification |
OK |
getWalletTransaction |
OK |
Telah dites pada OVO v2.8.0 | 27/03/2019 | Python 3.6
Untuk contoh penggunaan bisa cek di file test.py
.
PERHATIAN: Setelah masuk pertama kali, pastikan token yang didapat tersimpan, karena OVO membatasi akun tiap deviceId
import ovopy
# By default, settings saved to local .json file, so when you attempted to login with phone number (again) it'll use token that saved on local .json file resolved by phone number. You can disable this feature by adding `save_auth=False` at OVO class argument.
# ovo = ovopy.OVO(save_auth=False)
ovo = ovopy.OVO()
# with phone_number
l2fa = ovo.login('<phone_number>')
vl2fa = ovo.verifyLogin2FA(l2fa.refId, '<SMS Pincode>', '<phone_number>')
lsc = ovo.loginSecurityCode('<6digit of security code>', vl2fa.updateAccessToken)
# with token
lwt = ovo.login(token='<token here JWT>')
# Test now! :D
print(ovo.getFrontModel())
Mendapatkan informasi tentang akun
r = ovo.getFrontModel()
print(r) # resp: FrontResponse(...)
Mendapatkan informasi seputar budget
r = ovo.getBudget()
print(r) # resp: BudgetResponse(budget=History(amount=0, categoryId=None, spending=0), totalSpending=0, cycleDate=1, summary=[...])
Mendapatkan daftar histori transaksi
r = ovo.getWalletTransaction(page=1, limit=1)
print(r) # resp: WalletTransactionResponse(...)
Untuk sementara, hanya bisa melakukan transfer dua kali, untuk yang ketiga membutuhkan header signature. Bila anda menemukan implementasi signature bisa membuat request pull, Terima kasih.
rtrx = ovo.transferOvoBalance('<to_phone_number>', 10000, None)
print(rtrx) # resp: CustomerTransferResponse(...)
# Get all notifications
rx = ovo.getAllNotification()
print(rx) # resp: NotificationAllRespone(notifications=[...])
# Get total unread notification
r = ovo.getUnreadNotification()
print(r) # resp: NotificationUnreadResponse(Total=0)
Logout dari client
r = ovo.logout()
print(r) # resp: LogoutResponse(httpStatus=200)
Sebuah error terjadi karena respon kode http bukan 200, Kebanyakkan terjadi karena invalid client payload
Cek juga Un-official OVO[id] client yang lainnya!
Repositori | Bahasa |
---|---|
@lintangtimur/ovoid | PHP |
@anysz/ovopy | Python |
Anysz / @Anysz