Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thedtvn committed Jun 1, 2024
1 parent cc3539f commit 34247c3
Show file tree
Hide file tree
Showing 11 changed files with 771 additions and 34 deletions.
26 changes: 26 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2


build:
os: ubuntu-22.04
tools:
python: "3.11"
commands:
- pip install pip-tools
- pip-compile '.\docs\req.in'
- pip install -r docs/req.txt
- python setup.py install
- cd docs && python gen_doc.py

mkdocs:
configuration: mkdocs.yml

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/req.txt
162 changes: 162 additions & 0 deletions docs/api_document/async_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# mbbank.MBBankAsync(username, password, tesseract_path)
: Core Async class

**Attributes**

deviceIdCommon (str): Device id common

sessionId (str or None): Current Session id

**Parameters**

`username` (str): MBBank Account Username

`password` (str): MBBank Account Password

`tesseract_path` (str): Tesseract path. Defaults to None.


### async getBalance()
: Get all main account and sub account balance

**Returns**

success (dict): list account balance

**Raises**

MBBankError: if api response not ok


### async getBalanceLoyalty()
: Get Account loyalty rank and Member loyalty point

**Returns**

success (dict): loyalty point

**Raises**

MBBankError: if api response not ok


### async getCardList()
: Get all card list from your account

**Returns**

success (dict): card list

**Raises**

MBBankError: if api response not ok


### async getCardTransactionHistory(cardNo, from_date, to_date)
: Get card transaction history

**Parameters**

`cardNo` (str): card number get from getCardList

`from_date` (datetime.datetime): from date

`to_date` (datetime.datetime): to date

**Returns**

success (dict): card transaction history

**Raises**

MBBankError: if api response not ok


### async getFavorBeneficiaryList(transactionType, searchType)
: Get all favor or most transfer beneficiary list from your account

**Parameters**

`transactionType` (Literal["TRANSFER", "PAYMENT"]): transaction type

`searchType` (Literal["MOST", "LATEST"]): search type

**Returns**

success (dict): favor beneficiary list

**Raises**

MBBankError: if api response not ok


### async getInterestRate(currency)
: Get saving interest rate

**Parameters**

`currency` (str): currency ISO 4217 format. Defaults to "VND" (Viet Nam Dong).

**Returns**

success (dict): interest rate

**Raises**

MBBankError: if api response not ok


### async getLoanList()
: Get all loan list from your account

**Returns**

success (dict): loan list

**Raises**

MBBankError: if api response not ok


### async getSavingList()
: Get all saving list from your account

**Returns**

success (dict): saving list

**Raises**

MBBankError: if api response not ok


### async getTransactionAccountHistory(accountNo, from_date, to_date)
: Get account transaction history

**Parameters**

`accountNo` (str): Sub account number Defaults to Main Account number.

`from_date` (datetime.datetime): transaction from date

`to_date` (datetime.datetime): transaction to date

**Returns**

success (dict): account transaction history

**Raises**

MBBankError: if api response not ok


### async userinfo()
: Get current user info

**Returns**

success (dict): user info

**Raises**

MBBankError: if api response not ok
162 changes: 162 additions & 0 deletions docs/api_document/sync_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# mbbank.MBBank(username, password, tesseract_path)
: Core class

**Attributes**

deviceIdCommon (str): Device id common

sessionId (str or None): Current Session id

**Parameters**

`username` (str): MBBank Account Username

`password` (str): MBBank Account Password

`tesseract_path` (str): Tesseract path. Defaults to None.


### getBalance()
: Get all main account and sub account balance

**Returns**

success (dict): list account balance

**Raises**

MBBankError: if api response not ok


### getBalanceLoyalty()
: Get Account loyalty rank and Member loyalty point

**Returns**

success (dict): loyalty point

**Raises**

MBBankError: if api response not ok


### getCardList()
: Get all card list from your account

**Returns**

success (dict): card list

**Raises**

MBBankError: if api response not ok


### getCardTransactionHistory(cardNo, from_date, to_date)
: Get card transaction history

**Parameters**

`cardNo` (str): card number get from getCardList

`from_date` (datetime.datetime): from date

`to_date` (datetime.datetime): to date

**Returns**

success (dict): card transaction history

**Raises**

MBBankError: if api response not ok


### getFavorBeneficiaryList(transactionType, searchType)
: Get all favor or most transfer beneficiary list from your account

**Parameters**

`transactionType` (Literal["TRANSFER", "PAYMENT"]): transaction type

`searchType` (Literal["MOST", "LATEST"]): search type

**Returns**

success (dict): favor beneficiary list

**Raises**

MBBankError: if api response not ok


### getInterestRate(currency)
: Get saving interest rate

**Parameters**

`currency` (str): currency ISO 4217 format. Defaults to "VND" (Viet Nam Dong).

**Returns**

success (dict): interest rate

**Raises**

MBBankError: if api response not ok


### getLoanList()
: Get all loan list from your account

**Returns**

success (dict): loan list

**Raises**

MBBankError: if api response not ok


### getSavingList()
: Get all saving list from your account

**Returns**

success (dict): saving list

**Raises**

MBBankError: if api response not ok


### getTransactionAccountHistory(accountNo, from_date, to_date)
: Get account transaction history

**Parameters**

`accountNo` (str): Sub account number Defaults to Main Account number.

`from_date` (datetime.datetime): transaction from date

`to_date` (datetime.datetime): transaction to date

**Returns**

success (dict): account transaction history

**Raises**

MBBankError: if api response not ok


### userinfo()
: Get current user info

**Returns**

success (dict): user info

**Raises**

MBBankError: if api response not ok
Empty file added docs/css/main.css
Empty file.
Loading

0 comments on commit 34247c3

Please sign in to comment.