Created
July 30, 2016 00:36
-
-
Save cponeill/0031f7add4f911664aa03190514ac495 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import json | |
from two1.wallet import Wallet | |
from two1.bitrequests import BitTransferRequests | |
# set up bitrequest client for BitTransfer requests | |
wallet = Wallet() | |
requests = BitTransferRequests(wallet) | |
# server address | |
server_url = 'http://localhost:5000/' | |
def buy_fortune(): | |
url = server_url+'buy?payout_address={0}' | |
response = requests.get(url=url.format(wallet.get_payout_address())) | |
print(response.text) | |
if __name__ == '__main__': | |
buy_fortune() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment