---
# CashPiggy-AM PyPI Package Documentation
## Overview
CashPiggy-AM is a Python package designed to provide easy access to CashPiggy's services through a set of classes and methods. CashPiggy is a platform that allows users to earn rewards by participating in surveys and referrals.
## Installation
You can install the CashPiggy-AM package via pip. Open your terminal and run the following command:
```bash
pip install cashpiggy-am
```
## Usage
### Importing the Package
You can import the CashPiggy-AM package in your Python script or interactive session using the following import statement:
```python
import cashpiggy_am
```
### Creating an Account
To create a CashPiggy account, you can use the `register` method of the `CashPiggyAccount` class:
```python
account = cashpiggy_am.CashPiggyAccount.register("your_email@example.com")
```
This method returns a `CashPiggyAccount` object representing the newly created account. If the registration fails, it returns `None`.
### Claiming Points
You can claim points using the `claim_points` method of the `CashPiggyAccount` class:
```python
success = account.claim_points(100)
```
This method takes the number of points to claim as an argument and returns `True` if the claim is successful, otherwise `False`.
### Cashout
To cash out your earnings, you can use the `cashout` method of the `CashPiggyAccount` class:
```python
success = account.cashout(cashpiggy_am.CashPiggyCashoutMethod.PAYPAL_5, "US")
```
This method takes the cashout method (`CashPiggyCashoutMethod` enum) and the country code as arguments and returns `True` if the cashout is successful, otherwise `False`.
### Getting Referrals
You can retrieve information about your referrals using the `get_referrals` method of the `CashPiggyAccount` class:
```python
referrals = account.get_referrals()
```
This method returns a `CashPiggyAccountReferrals` object containing information about your referrals.
### Getting Cashout History
You can retrieve your cashout history using the `get_cashout_history` method of the `CashPiggyAccount` class:
```python
cashout_history = account.get_cashout_history()
```
This method returns a list of `CashPiggyCashoutHistory` objects representing your cashout history.
### Logging
The package uses logging to track the execution flow and any errors encountered during the process. You can configure the logging level and output destination as needed.
## Conclusion
The CashPiggy-AM package provides a convenient way to interact with CashPiggy's services programmatically, allowing users to create accounts, claim points, cash out earnings, and retrieve account information easily.
---
This documentation provides an overview of the package, installation instructions, and usage examples for its main functionalities. Users can refer to this documentation to effectively utilize the `cashpiggy-am` package in their Python projects.
Raw data
{
"_id": null,
"home_page": "https://github.com/AdonisCodes/CashPiggy-am",
"name": "cashpiggy-am",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "package,automation,cashpiggy,mobile-app",
"author": "AdonisCodes",
"author_email": "business@simonferns.com",
"download_url": "https://files.pythonhosted.org/packages/7a/bd/73735cc1f2716a0bef8018e566c7f0dc87158baee273bc58aac234311069/cashpiggy-am-0.1.0.tar.gz",
"platform": null,
"description": "---\n\n# CashPiggy-AM PyPI Package Documentation\n\n## Overview\n\nCashPiggy-AM is a Python package designed to provide easy access to CashPiggy's services through a set of classes and methods. CashPiggy is a platform that allows users to earn rewards by participating in surveys and referrals.\n\n## Installation\n\nYou can install the CashPiggy-AM package via pip. Open your terminal and run the following command:\n\n```bash\npip install cashpiggy-am\n```\n\n## Usage\n\n### Importing the Package\n\nYou can import the CashPiggy-AM package in your Python script or interactive session using the following import statement:\n\n```python\nimport cashpiggy_am\n```\n\n### Creating an Account\n\nTo create a CashPiggy account, you can use the `register` method of the `CashPiggyAccount` class:\n\n```python\naccount = cashpiggy_am.CashPiggyAccount.register(\"your_email@example.com\")\n```\n\nThis method returns a `CashPiggyAccount` object representing the newly created account. If the registration fails, it returns `None`.\n\n### Claiming Points\n\nYou can claim points using the `claim_points` method of the `CashPiggyAccount` class:\n\n```python\nsuccess = account.claim_points(100)\n```\n\nThis method takes the number of points to claim as an argument and returns `True` if the claim is successful, otherwise `False`.\n\n### Cashout\n\nTo cash out your earnings, you can use the `cashout` method of the `CashPiggyAccount` class:\n\n```python\nsuccess = account.cashout(cashpiggy_am.CashPiggyCashoutMethod.PAYPAL_5, \"US\")\n```\n\nThis method takes the cashout method (`CashPiggyCashoutMethod` enum) and the country code as arguments and returns `True` if the cashout is successful, otherwise `False`.\n\n### Getting Referrals\n\nYou can retrieve information about your referrals using the `get_referrals` method of the `CashPiggyAccount` class:\n\n```python\nreferrals = account.get_referrals()\n```\n\nThis method returns a `CashPiggyAccountReferrals` object containing information about your referrals.\n\n### Getting Cashout History\n\nYou can retrieve your cashout history using the `get_cashout_history` method of the `CashPiggyAccount` class:\n\n```python\ncashout_history = account.get_cashout_history()\n```\n\nThis method returns a list of `CashPiggyCashoutHistory` objects representing your cashout history.\n\n### Logging\n\nThe package uses logging to track the execution flow and any errors encountered during the process. You can configure the logging level and output destination as needed.\n\n## Conclusion\n\nThe CashPiggy-AM package provides a convenient way to interact with CashPiggy's services programmatically, allowing users to create accounts, claim points, cash out earnings, and retrieve account information easily.\n\n---\n\nThis documentation provides an overview of the package, installation instructions, and usage examples for its main functionalities. Users can refer to this documentation to effectively utilize the `cashpiggy-am` package in their Python projects.\n",
"bugtrack_url": null,
"license": "",
"summary": "An API wrapper around the caspiggy mobile app.",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/AdonisCodes/CashPiggy-am/issues",
"Documentation": "https://github.com/AdonisCodes/CashPiggy-am",
"Homepage": "https://github.com/AdonisCodes/CashPiggy-am",
"Source Code": "https://github.com/AdonisCodes/CashPiggy-am"
},
"split_keywords": [
"package",
"automation",
"cashpiggy",
"mobile-app"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fdb90a905a4af0ce31fe9192e2e51986e1ddc3024678355f7024a65bad528703",
"md5": "29cad752267d22d152614a18bfe6d72d",
"sha256": "c9382d68e65d122949f486215daf6f228377adb6e666440fa9e0fb25273d7429"
},
"downloads": -1,
"filename": "cashpiggy_am-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "29cad752267d22d152614a18bfe6d72d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3658,
"upload_time": "2024-02-29T10:49:03",
"upload_time_iso_8601": "2024-02-29T10:49:03.343920Z",
"url": "https://files.pythonhosted.org/packages/fd/b9/0a905a4af0ce31fe9192e2e51986e1ddc3024678355f7024a65bad528703/cashpiggy_am-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7abd73735cc1f2716a0bef8018e566c7f0dc87158baee273bc58aac234311069",
"md5": "63fa32385e1b04b568b6eb2855074645",
"sha256": "0f4e002ef14ab77dde0a336a08e6e41d778e778be6b56b07c1096a81be2a4b68"
},
"downloads": -1,
"filename": "cashpiggy-am-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "63fa32385e1b04b568b6eb2855074645",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3776,
"upload_time": "2024-02-29T10:49:06",
"upload_time_iso_8601": "2024-02-29T10:49:06.554585Z",
"url": "https://files.pythonhosted.org/packages/7a/bd/73735cc1f2716a0bef8018e566c7f0dc87158baee273bc58aac234311069/cashpiggy-am-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-29 10:49:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AdonisCodes",
"github_project": "CashPiggy-am",
"github_not_found": true,
"lcname": "cashpiggy-am"
}