Skip to content

Instantly share code, notes, and snippets.

@cponeill
Created July 30, 2016 00:36
Show Gist options
  • Save cponeill/0031f7add4f911664aa03190514ac495 to your computer and use it in GitHub Desktop.
Save cponeill/0031f7add4f911664aa03190514ac495 to your computer and use it in GitHub Desktop.
#!/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