Upload 1.5.0 version

Upload docs
This commit is contained in:
Teleport
2023-05-08 21:43:58 +03:00
parent 852a407ceb
commit 6b771f8925
22 changed files with 676 additions and 367 deletions

View File

@@ -0,0 +1,37 @@
import pyspw
from pyspw.Parameters import Transaction
# Init library
api = pyspw.SpApi(card_id='card_id',
card_token='card_token')
# Constructing transaction
transaction = Transaction(
receiver='00001', # Card number of receiver
amount=24, # Amount of diamond ore which you want to send
comment='Buy diamond pickaxe' # Comment on transaction
)
# Send transaction
api.send_transaction(transaction)
# Send more than one transaction
salary = Transaction(
receiver='00002',
amount=100,
comment='Salary for the January'
)
# You can get information from Transaction class
tax = Transaction(
receiver='00001',
amount=round(salary.amount * 0.2), # take 20% from salary amount
comment=f'Tax from `{salary.comment}`'
)
# Send transactions
api.send_transactions([tax, salary], delay=0.8)