UNOFFICIAL Python bindings for Earnapp dashboard API
Project description
EarnApp API
A Python binding to interact with Earnapp dashboard API.
Installation
pip install pyEarnapp
Usage
from pyEarnapp import EarnApp
AUTH = "YOUR_AUTH_CODE_FROM_EARNAPP_DASHBOARD"
api = EarnApp(AUTH) # Initiallise the EarnApp object
To use API with proxies
from pyEarnapp import EarnApp
AUTH = "YOUR_AUTH_CODE_FROM_EARNAPP_DASHBOARD"
api = EarnApp(AUTH)
proxy_conf = {
'http': socks5://username:password@ipaddress:port,
'https': socks5://username:password@ipaddress:port,
}
earning_info = api.get_user_data(proxies=proxy_conf)
All additional arguements are passed on to the requests.method call.
Functions
-
Get information about the user.
get_user_data()
-
Returns an object of type
UserDatawith the following attributes.Attribute Description first_nameUser's first name last_nameUser's last name nameUser's full name emailUser's login email
-
-
Get information on user's earnings.
get_earning_info()
-
Returns an object of type
EarningInfowith the following attributes.Attribute Description balanceCurrent earned balance. earnings_totalAmount earned till date. multiplierEarning multiplier. tokensNo idea what this is. redeem_detailsReturns object of type RedeemDetails.bonusesEarnings from referrals. bonuses_totalTotal earnings from referrals till date. referral_partReferral bonus percentage. -
The object
RedeemDetailshas the following attributes.Attribute Description emailRedemption email payment_methodRedemption method
-
-
Get all the connected device's information.
get_devices_info()
-
Returns an object of type
DevicesInfowith the following attributes.Attribute Description devicesList of nodes connected with each node of object type Device.windows_devicesNumber of Windows devices. linux_devicesNumber of Linux devices. other_devicesNumber of other type of devices. total_bandwidth_usageShows bandwidth usage of all devices combined -
The object
Devicehas the following attributes.Attribute Description uuidUUID of the device. bandwidth_usageUnredeemed bandwidth usage. total_bandwidthTotal bandwindth usage. redeemed_bandwidthRedeemed bandwidth usage. ratePrice/GB of the device. countryCountry of the device. device_typeType of device. (win/node/ None)
-
-
Get a list of all the transactions.
get_transaction_info()
-
Returns an object of type
Transactionswith the following attributes.Attribute Description transactionsListof all transactions with each object of typeTransaction.pending_paymentsNumber of pending payments. paidNumber of payments completed. total_transactionsTotal number of transactions. -
The
Transactionobject has the following attributes.Attribute Description uuidTransaction ID. statusStatus of transaction ( pending/paid).payment_methodMode of payment. payment_dateIs an object of type datetime.datetime, as date of payment.amountAmount redeemed. redeem_dateIs an object of type datetime.datetime, as date on which balance was redeemed.is_paidTrueif the payment is completed.
-
-
Add new node/device to your ID.
add_new_device("EARNAPP_NODE_ID")
- Returns the response from the server on success. Else raise an exception.
-
Get a list of all referrals and their bonuses.
get_referral_info()
-
Returns an obejct of type
Referralswith the following attributes.Attribute Description referralsListof all the referrals with each object of typeReferee.referral_earningsUnredeemed earnings from referrals. (Same as get_earning_info().bonuses)total_referral_earningsTotal earnings from referrals. (Same as get_earning_info().bonuses_total)number_of_referralsTotal number of accepted referrals -
The
Refereeobject has the following attributes.Attribute Description idReferral ID. bonusesUnredeemed bonus from referred user. bonuses_totalTotal bonus from referred user. emailPartially hidden referred user's email.
-
-
Delete linked device
delete_device(device_uuid = 'sdk-node-adfbafdnbasgnb')
- Returns
truewhen deleted, elseFalse
- Returns
-
Check if IP Address is usable on earnapp
is_ip_allowed()
- Returns
trueif IP Address is allowed, elsefalse.
- Returns
-
Redeem balance to PayPal
redeem_to_paypal(paypal_email = 'someone@example.com')
- Returns
trueon successfull redeem, elseFalse.
- Returns
Exceptions
- The following exceptions are defined.
Exception Reason AuthenticationErrorRaised on authentication failure. DeviceAddErrorWhen the attempt to add device is failed. DeviceNotFoundErrorWhen the device to be added is not found. DeviceAlreadyAddedErrorWhen the device ID is already linked UnKnownDeviceAddErrorWhen cause of failure is not known. TooManyRequestsErrorRaised when earnapp rate limit is reached. UnKnownIPCheckErrorRaised when there's an error checking if the IP address is valid. InValidIPAddressErrorRaised when the IP address is invalid. UnKnownRedeemErrorWhen unknown error occurs on redeption. MinimumRedeemBalanceErrorWhen account doesn't have minimum balance needed for redeeming.
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 Distributions
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 pyEarnapp-0.0.16.1-py3-none-any.whl.
File metadata
- Download URL: pyEarnapp-0.0.16.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df82ba0b644f8ba54d4e6120fcd28d4b3370ed5a6c41df681cc4d2b8983fc6ff
|
|
| MD5 |
6642e68a302f4a2c37b42a5727681246
|
|
| BLAKE2b-256 |
8b9f4b6e883b625dc590f0b2ff25d10995a4eec112ddc4745e9d4b2d85f53f54
|