Pipoline / cryptopay

Api wrapper for Crypto.com Pay Checkout
MIT License
4 stars 2 forks source link

Update documentation #5

Open pipozzz opened 4 years ago

pipozzz commented 4 years ago
zaransage commented 2 years ago

cryptopay

Python API wrapper for Crypto.com Pay Checkout

Travis (.com) Codecov PyPI - Downloads PyPI

Installation

Usage

The connection below makes an implicit assumption that you will be using a local enviornment variable to specify the secret key:

export CRYPTOPAY_SECRET_KEY="MY_SECRET_KEY_HERE"

The example above is the command you would set if you were using a Linux Bash terminal.

from pprint import pprint
from cryptopay import Client

client = Client()
response = client.get_payments()
payments = response.json()
pprint(payments)

As an alternative, you can specify the secret key upon instantiation:

from pprint import pprint
from cryptopay import Client

client = Client("MY_SECRET_KEY_HERE")
response = client.get_payments()
payments = response.json()
pprint(payments)

Full Initialization Options:

Below is a highlight of all the options possible to be passed to the 'Client' object upon instantiation:


(secret_key=None, api_endpoint_url='https://pay.crypto.com/api', timeout=30, ssl_verify=True, proxies=None):

Friendly attempt to resolve the 'update documentation' issue you have open. I am new to open source contributions so, sorry if I bumble a process or something. Best regards!