Home

Awesome

ovopy

BuildStatus Version 1.0.0 Supported python versions: 3.6 License Codacy Badge Donate

Un-official OVOid Python3 Client

Language: English Indonesia


Install

python3 setup.py install

Function status

FunctionStatus
login2FAOK
verifyLogin2FAOK
loginSecurityCodeOK
getBudgetOK
getFrontModelOK
generateTrxIdOK
transferOvoBalanceError: Invalid Model
logoutOK
getUnreadNotificationOK
getWalletTransactionOK

Tested on OVO v2.8.0 | 27/03/2019 | Python 3.6

Examples

Login

You can check at test.py.

WARNING: When you logged in at the first time, make sure you got the token, because OVO limits loggedin device

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())

Account Information

Get account information

r = ovo.getFrontModel()
print(r) # resp: FrontResponse(...)

Budget Details

Get details of budget

r = ovo.getBudget()
print(r) # resp: BudgetResponse(budget=History(amount=0, categoryId=None, spending=0), totalSpending=0, cycleDate=1, summary=[...])

Transaction History

Get list of transactions history

r = ovo.getWalletTransaction(page=1, limit=1)
print(r) # resp: WalletTransactionResponse(...)

Balance Transfer

Currently, You can only transfer two times, for the 3rd one you'll need signature header. Please make pull request if you know how to reproduce the signature, Thank you.

rtrx = ovo.transferOvoBalance('<to_phone_number>', 10000, None)
print(rtrx) # resp: CustomerTransferResponse(...)

Notifications

# 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

Logout from client

r = ovo.logout()
print(r) # resp: LogoutResponse(httpStatus=200)

Errors

OVOUnexpectedError

An error occured from REST Endpoint caused by http code response is not 200, Most of them caused by invalid client payload

Other Programming Languages

Checkout also other Un-official OVO[id] Clients!

RepositoryLanguage
@lintangtimur/ovoidPHP
@anysz/ovopyPython

Author

Anysz / @Anysz