UNOFFICIAL Python bindings for TraffMonetizer Dashboard API
Project description
Traff Monetizer API
UNOFFICIAL Python bindings for Traff Monetizer Dashboard API
Installation
pip install pyTraffMonetizer
Usage
Login with email and password:
from pyTraffMonetizer import TraffMonetizer
# Your TraffMonetizer login email and password
EMAIL = ""
PASSWORD = ""
g_captcha_response = "" # I haven't figured out how to use this (so this function is actually unusable)
# Initialise the TraffMonetizer object
user = TraffMonetizer()
# Optionally, when instantiating you can pass in the following attributes to the TraffMonetizer class:
| Attribute | Description | Default Value |
|---|---|---|
| API_BASE_URL | The API BASE URL | https://data.traffmonetizer.com |
| API_PREFIX | The API PREFIX | /api |
| API_VERSION | The API VERSION | "" |
# Call the complete_login_flow method to login and set the JWT in self.jwt
user.complete_login_flow(USERNAME, PASSWORD, g_captcha_response)
Add proxies for future requests:
from pyTraffMonetizer import TraffMonetizer
# With authentication & protocol
user.set_proxy("ip:port:username:password", "socks5")
# Without authentication & protocol
user.set_proxy("ip:port", "socks5")
# Alternative way
user.set_socks5_proxy("ip:port")
user.set_socks5_proxy("ip:port:username:password")
user.set_https_proxy("ip:port")
user.set_https_proxy("ip:port:username:password")
Functions
-
Get user balance
# Get balance and traffic sold as shown on the dashboard. user.get_balance()
-
Remove a proxy
# Removes a proxy for future requests. user.remove_proxy()
-
Get all the devices
# Get all the devices (with earnings) user.get_earnings_by_devices()
-
Payout history
# Get payout history user.get_payout_history()
-
Is Logged In
# Check if you're logged in user.is_logged_in()
-
Logout
# Logged out user.logout()
-
Set JWT Token
# Set JWT Token if you have one (otherwise use the login()) user.set_jwt_token(TOKEN)
Exceptions
- The following exceptions are defined.
Exception Reason NotLoggedInErrorRaised when you try to access protected routes (dashboard, payout history, etc).
Liked my work?
Consider donating:
-
BTC: bc1qu98aj9etma5l64lcfldweua7w8gnjzets05v6p
-
LTC: LiTzM41bD1ewPAjFxcGyNDZXFYXqUS9fXK
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyTraffMonetizer-0.0.1.tar.gz.
File metadata
- Download URL: pyTraffMonetizer-0.0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0615fcc28f06ef8c365f9efa04b6d5493fa73bf7f6c87513a6f4085fd3afbf28
|
|
| MD5 |
947eda2e2be6efbc9ea75fb563ad5064
|
|
| BLAKE2b-256 |
473185ff913ce193c4e6a8643108dd968d4c30f83777f6604e1b471555f2ae31
|
File details
Details for the file pyTraffMonetizer-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pyTraffMonetizer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.27.1 setuptools/54.0.0 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c232be1caa139e93198b85c7671b0852015916667c6f6a0ab0e594484c3f847
|
|
| MD5 |
df5ab7a3aa20f4ddf4bbb43ad9a23c64
|
|
| BLAKE2b-256 |
c1306c2853f4b0e8bc9877662c20a82c7ce72aa4c6372e1d04eef623b4f1f9a1
|