Skip to main content

An API wrapper around the caspiggy mobile app.

Project description


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:

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:

import cashpiggy_am

Creating an Account

To create a CashPiggy account, you can use the register method of the CashPiggyAccount class:

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:

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:

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:

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cashpiggy-0.1.0.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

cashpiggy-0.1.0-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page