# EarnAPI
EarnApp API wrapper written in Python using asyncio, inspired
from [pyEarnapp](https://github.com/fazalfarhan01/EarnApp-API.git) (which does not use asyncio).
## Be careful how you use this library!
This library is not officially supported by EarnApp. Use it at your own risk.
I am not responsible for any damage caused by using this library.\
Also, please do not spam the API with requests.
It is not nice and can get you banned or rate limited, and EarnApp rate limits last a lot.
## Installation
```bash
pip install earnapi
```
## Example usage
```python
import asyncio
from earnapi import Client
loop = asyncio.get_event_loop()
client = Client("your_auth_token_cookie")
async def main():
# Get user information
userdata = await client.get_user_data()
print("User data:", userdata)
# Get information about earnings
earnings = await client.get_earnings()
print("Earnings:", earnings)
# Get a list of devices
devices = await client.get_devices()
print("Devices:", devices)
# Get your transactions
transactions = await client.get_transactions()
print("Transactions:", transactions)
# Get referrals
referrals = await client.get_referrals()
print("Referrals:", referrals)
# Device statuses
device_statuses = await client.get_device_statuses()
print("Device statuses:", device_statuses)
# IP check
ip_allowed = await client.is_ip_allowed("your_ip_address_here")
print("IP", "is" if ip_allowed else "is not", "allowed to use EarnApp")
# Redeem to PayPal, may raise an exception
redeemed = await client.redeem_to_paypal("your_paypal@email_he.re")
print("Redeemed" if redeemed else "Could not redeem", "your balance to PayPal.")
# Add a device (not tested)
#await client.add_device("sdk-xxxxx-xxxxxxxxxxxx")
# Delete a device (not tested)
#await client.delete_device("sdk-xxxxx-xxxxxxxxxxxx")
loop.run_until_complete(main())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Vinchethescript/earnapi",
"name": "earnapi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "python, earnapi, python earnapp api, python earnapp api wrapper, earnapp api wrapper, earnapp, passive income, earnapp api, earnapp dashboard, requests, python earnapp",
"author": "Vinche.zsh",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/dd/25/cccf92140827b94d3b50ec06d1dfadc88214106ed75da816449b610a73d8/earnapi-1.1.2.tar.gz",
"platform": null,
"description": "\n# EarnAPI\n\nEarnApp API wrapper written in Python using asyncio, inspired\nfrom [pyEarnapp](https://github.com/fazalfarhan01/EarnApp-API.git) (which does not use asyncio).\n\n## Be careful how you use this library!\nThis library is not officially supported by EarnApp. Use it at your own risk.\nI am not responsible for any damage caused by using this library.\\\nAlso, please do not spam the API with requests.\nIt is not nice and can get you banned or rate limited, and EarnApp rate limits last a lot.\n\n## Installation\n```bash\npip install earnapi\n```\n## Example usage\n```python\nimport asyncio\nfrom earnapi import Client\n\nloop = asyncio.get_event_loop()\nclient = Client(\"your_auth_token_cookie\")\nasync def main():\n # Get user information\n userdata = await client.get_user_data()\n print(\"User data:\", userdata)\n # Get information about earnings\n earnings = await client.get_earnings()\n print(\"Earnings:\", earnings)\n # Get a list of devices\n devices = await client.get_devices()\n print(\"Devices:\", devices)\n # Get your transactions\n transactions = await client.get_transactions()\n print(\"Transactions:\", transactions)\n # Get referrals\n referrals = await client.get_referrals()\n print(\"Referrals:\", referrals)\n # Device statuses\n device_statuses = await client.get_device_statuses()\n print(\"Device statuses:\", device_statuses)\n # IP check\n ip_allowed = await client.is_ip_allowed(\"your_ip_address_here\")\n print(\"IP\", \"is\" if ip_allowed else \"is not\", \"allowed to use EarnApp\")\n # Redeem to PayPal, may raise an exception\n redeemed = await client.redeem_to_paypal(\"your_paypal@email_he.re\")\n print(\"Redeemed\" if redeemed else \"Could not redeem\", \"your balance to PayPal.\")\n # Add a device (not tested)\n #await client.add_device(\"sdk-xxxxx-xxxxxxxxxxxx\")\n # Delete a device (not tested)\n #await client.delete_device(\"sdk-xxxxx-xxxxxxxxxxxx\")\n\nloop.run_until_complete(main())\n```\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "Asynchronous EarnApp API wrapper written in Python using asyncio.",
"version": "1.1.2",
"project_urls": {
"Homepage": "https://github.com/Vinchethescript/earnapi"
},
"split_keywords": [
"python",
" earnapi",
" python earnapp api",
" python earnapp api wrapper",
" earnapp api wrapper",
" earnapp",
" passive income",
" earnapp api",
" earnapp dashboard",
" requests",
" python earnapp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "aeb662e331d8e8b48df948dbe19387c5a3aba1b6e0ce466656926acac624d021",
"md5": "b2c8f39df7c5aeb5e926133bba25a67f",
"sha256": "c0a28567a07e7f7a8ee105bf3411b6867b1ff6c2450d937849f801864c538457"
},
"downloads": -1,
"filename": "earnapi-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b2c8f39df7c5aeb5e926133bba25a67f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 19565,
"upload_time": "2024-04-29T06:33:55",
"upload_time_iso_8601": "2024-04-29T06:33:55.387229Z",
"url": "https://files.pythonhosted.org/packages/ae/b6/62e331d8e8b48df948dbe19387c5a3aba1b6e0ce466656926acac624d021/earnapi-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dd25cccf92140827b94d3b50ec06d1dfadc88214106ed75da816449b610a73d8",
"md5": "0cc00ae7f9ca4a7372cd09f04ccf9dbf",
"sha256": "4ce2d305e1dc5bf083a7356f3d5c1065b5dba352cc4bfad80f9cf67566558771"
},
"downloads": -1,
"filename": "earnapi-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "0cc00ae7f9ca4a7372cd09f04ccf9dbf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 19746,
"upload_time": "2024-04-29T06:33:56",
"upload_time_iso_8601": "2024-04-29T06:33:56.951303Z",
"url": "https://files.pythonhosted.org/packages/dd/25/cccf92140827b94d3b50ec06d1dfadc88214106ed75da816449b610a73d8/earnapi-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-29 06:33:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Vinchethescript",
"github_project": "earnapi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "earnapi"
}