Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #5

Open
pipozzz opened this issue Oct 15, 2020 · 1 comment
Open

Update documentation #5

pipozzz opened this issue Oct 15, 2020 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@pipozzz
Copy link
Member

pipozzz commented Oct 15, 2020

  • describe how to set secret_key for API (env, directly in constructor)

  • put examples for all actions (create payment, refund payment etc.)

@pipozzz pipozzz added the documentation Improvements or additions to documentation label Oct 15, 2020
@zaransage
Copy link

cryptopay

Python API wrapper for Crypto.com Pay Checkout

Travis (.com) Codecov PyPI - Downloads PyPI

Installation

  • From pypi:
    pip3 install cryptopay
  • From GitHub:
    Clone our repository and python3 setup.py install

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants