Talkspace, Todolist, and Walmart

This commit is contained in:
Norm Rasmussen
2022-11-30 17:19:16 -05:00
parent 8a9d86ff2d
commit ca2b56b6ed
5 changed files with 59 additions and 23 deletions

View File

@ -3,12 +3,14 @@ import requests
apiKey = "SlpQlju219WnWogn94dQUT6Yt"
url = "https://api.northpass.com/v1/media"
#function = sys.argv[1]
def putTest(apiKey, url):
payload = {
"data":
{
"type":"media",
"type":"media",
"file_name":"/Users/normrasmussen/Downloads/Shopping&Delivery 9 XP.mp4",
}
}
@ -20,7 +22,8 @@ def putTest(apiKey, url):
response = requests.put(url, json=payload, headers=headers)
print(response.text)
def getTest(apiKey,url):
def getTest(apiKey, url):
headers = {
"accept": "application/json",
"X-Api-Key": apiKey
@ -28,16 +31,18 @@ def getTest(apiKey,url):
response = requests.get(url, headers=headers)
print(response.text)
def postTest(apiKey, url):
headers = {
"accept": "application/json",
"content-type": "application/json",
"X-Api-Key": apiKey
"accept": "application/json",
"content-type": "application/json",
"X-Api-Key": apiKey
}
response = requests.post(url, headers=headers)
print(response.text)
if __name__ == "__main__":
getTest(apiKey, url)
#putTest(apiKey, url)
#postTest(apiKey, url)
# putTest(apiKey, url)
# postTest(apiKey, url):