kopia lustrzana https://codeberg.org/argrento/huami-token
Increased cell width
rodzic
dfd24053b0
commit
310b2005e0
|
@ -2,4 +2,5 @@ notebooks
|
|||
.idea
|
||||
.DS_Store
|
||||
*.zip
|
||||
__pycache__
|
||||
__pycache__
|
||||
*.dump
|
||||
|
|
24
README.md
24
README.md
|
@ -18,6 +18,30 @@ Huami servers.
|
|||
3. Clone this repo:
|
||||
```git clone https://github.com/argrento/huami-token.git```
|
||||
|
||||
## Usage
|
||||
```
|
||||
usage: huami_token.py [-h] -m {amazfit,xiaomi} [-e EMAIL] [-p PASSWORD] [-b]
|
||||
[-g] [-a] [-n]
|
||||
|
||||
Obtain Bluetooth Auth key from Amazfit servers and download AGPS data.
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-m {amazfit,xiaomi}, --method {amazfit,xiaomi}
|
||||
Login method
|
||||
-e EMAIL, --email EMAIL
|
||||
Account e-mail address
|
||||
-p PASSWORD, --password PASSWORD
|
||||
Account Password
|
||||
-b, --bt_keys Get bluetooth tokens of paired devices
|
||||
-g, --gps Download A-GPS files
|
||||
-a, --all Do everything: get bluetooth tokens, download A-GPS
|
||||
files
|
||||
-n, --no_logout Do not logout, keep active session and display app
|
||||
token and access token
|
||||
```
|
||||
|
||||
|
||||
## Logging in with Amazfit account
|
||||
Run script with your cridentials: `python huami_token.py --method amazfit --email youemail@example.com --password your_password --bt_keys`.
|
||||
|
||||
|
|
|
@ -239,7 +239,7 @@ if __name__ == "__main__":
|
|||
console = Console()
|
||||
table = Table(show_header=True, header_style="bold", box=box.ASCII)
|
||||
table.add_column("MAC", style="dim", width=17, justify='center')
|
||||
table.add_column("auth_key", width=36, justify='center')
|
||||
table.add_column("auth_key", width=50, justify='center')
|
||||
|
||||
device = HuamiAmazfit(method=args.method,
|
||||
email=args.email,
|
||||
|
|
6
urls.py
6
urls.py
|
@ -6,6 +6,7 @@ URLS = {
|
|||
'login_amazfit': 'https://account.huami.com/v2/client/login',
|
||||
'devices': 'https://api-mifit-us2.huami.com/users/{user_id}/devices',
|
||||
'agps': 'https://api-mifit-us2.huami.com/apps/com.huami.midong/fileTypes/{pack_name}/files',
|
||||
'data_short': 'https://api-mifit-us2.huami.com/users/{user_id}/deviceTypes/4/data',
|
||||
'logout': 'https://account-us2.huami.com/v1/client/logout'
|
||||
}
|
||||
|
||||
|
@ -41,6 +42,11 @@ PAYLOADS = {
|
|||
'agps': {
|
||||
'apptoken': None
|
||||
},
|
||||
'data_short': {
|
||||
'apptoken': None,
|
||||
'startDay': None,
|
||||
'endDay': None
|
||||
},
|
||||
'logout': {
|
||||
'login_token': None
|
||||
},
|
||||
|
|
Ładowanie…
Reference in New Issue