Package: pyEarnapp
EarnApp APIA Python binding to interact with Earnapp dashboard API.InstallationpipinstallpyEarnappUsagefrompyEarnappimportEarnAppAUTH="YOUR_AUTH_CODE_FROM_EARNAPP_DASHBOARD"api=EarnApp(AUTH)# Initiallise the EarnApp objectTo use API with proxiesfrompyEarnappimportEarnAppAUTH="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 therequests.methodcall.FunctionsGet information about the user.get_user_data()Returns an object of typeUserDatawith the following attributes.AttributeDescriptionfirst_nameUser's first namelast_nameUser's last namenameUser's full nameemailUser's login emailGet information on user's earnings.get_earning_info()Returns an object of typeEarningInfowith the following attributes.AttributeDescriptionbalanceCurrent earned balance.earnings_totalAmount earned till date.multiplierEarning multiplier.tokensNo idea what this is.redeem_detailsReturns object of typeRedeemDetails.bonusesEarnings from referrals.bonuses_totalTotal earnings from referrals till date.referral_partReferral bonus percentage.The objectRedeemDetailshas the following attributes.AttributeDescriptionemailRedemption emailpayment_methodRedemption methodGet all the connected device's information.get_devices_info()Returns an object of typeDevicesInfowith the following attributes.AttributeDescriptiondevicesList of nodes connected with each node of object typeDevice.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 combinedThe objectDevicehas the following attributes.AttributeDescriptionuuidUUID 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 typeTransactionswith the following attributes.AttributeDescriptiontransactionsListof all transactions with each object of typeTransaction.pending_paymentsNumber ofpendingpayments.paidNumber of paymentscompleted.total_transactionsTotal number of transactions.TheTransactionobject has the following attributes.AttributeDescriptionuuidTransaction ID.statusStatus of transaction (pending/paid).payment_methodMode of payment.payment_dateIs an object of typedatetime.datetime, as date of payment.amountAmount redeemed.redeem_dateIs an object of typedatetime.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 allreferralsand their bonuses.get_referral_info()Returns an obejct of typeReferralswith the following attributes.AttributeDescriptionreferralsListof all the referrals with each object of typeReferee.referral_earningsUnredeemedearnings from referrals. (Same asget_earning_info().bonuses)total_referral_earningsTotal earnings from referrals. (Same asget_earning_info().bonuses_total)number_of_referralsTotal number of accepted referralsTheRefereeobject has the following attributes.AttributeDescriptionidReferral ID.bonusesUnredeemed bonus from referred user.bonuses_totalTotal bonus from referred user.emailPartially hidden referred user's email.Delete linked devicedelete_device(device_uuid='sdk-node-adfbafdnbasgnb')Returnstruewhen deleted, elseFalseCheck if IP Address is usable on earnappis_ip_allowed()Returnstrueif IP Address is allowed, elsefalse.Redeem balance to PayPalredeem_to_paypal(paypal_email='someone@example.com')Returnstrueon successfull redeem, elseFalse.ExceptionsThe following exceptions are defined.ExceptionReasonAuthenticationErrorRaised on authentication failure.DeviceAddErrorWhen the attempt to add device is failed.DeviceNotFoundErrorWhen the device to be added isnot found.DeviceAlreadyAddedErrorWhen the device ID is already linkedUnKnownDeviceAddErrorWhen 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.