Zenjob notes. Webhook testing and python scripts.
This commit is contained in:
@ -48,7 +48,8 @@ def getfromEmail(BASEURLEMAIL, APIKEY):
|
||||
# print(response)
|
||||
email = response["data"]
|
||||
# print("Learner ID:" )
|
||||
pp.pprint(email)
|
||||
#pp.pprint(email)
|
||||
print(email)
|
||||
|
||||
|
||||
def getfromUuid(BASEURL, APIKEY):
|
||||
|
||||
29
Scripts/API_Tests/workato_for_test.py
Normal file
29
Scripts/API_Tests/workato_for_test.py
Normal file
@ -0,0 +1,29 @@
|
||||
import json
|
||||
import pprint
|
||||
import requests
|
||||
import Apikeys
|
||||
|
||||
BASEURLEMAIL = "https://api.northpass.com/v2/people?filter[email][cont]="
|
||||
APIKEY = Apikeys.DATASNIPPER
|
||||
|
||||
def getfromEmail(BASEURLEMAIL, APIKEY):
|
||||
email = "datasnipper.com"
|
||||
url = BASEURLEMAIL + f"{email}"
|
||||
headers = {
|
||||
"accept": "*/*",
|
||||
"x-api-key": APIKEY,
|
||||
"content-type": "application/json",
|
||||
}
|
||||
response = requests.get(url, headers=headers)
|
||||
if response.status_code == 200:
|
||||
print("200 Error!")
|
||||
else:
|
||||
print("Another Error!")
|
||||
# response = response.json()
|
||||
email = str(response.text)
|
||||
input_json = json.loads(email)
|
||||
for item in input_json["data"]:
|
||||
print(item["id"])
|
||||
|
||||
if __name__ == "__main__":
|
||||
getfromEmail(BASEURLEMAIL, APIKEY)
|
||||
Reference in New Issue
Block a user