Last active
March 11, 2019 03:51
-
-
Save jrbail01/2f9e6c8ac4ccca555b1a3b2aea4c089b 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
import requests | |
import json | |
ACCESS_KEY = "PLACE YOUR INITIAL STATE ACCESS KEY HERE" | |
BUCKET_KEY = "reqtest1" | |
BUCKET_NAME = "Python Test" | |
def createBucket(bucketKey, bucketName): | |
url = 'https://groker.init.st/api/buckets' | |
headers = { | |
'Content-Type': 'application/json', | |
'X-IS-AccessKey': ACCESS_KEY, | |
'Accept-Version': '~0' | |
} | |
data = { | |
'bucketKey': bucketKey, | |
'bucketName': bucketName | |
} | |
r = requests.post(url=url, headers=headers, data=json.dumps(data)) | |
return r | |
r = createBucket(BUCKET_KEY, BUCKET_NAME) | |
print r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment