Walmart Notes, offloading keys to ignore file
This commit is contained in:
5
Scripts/API_Tests/Apikeys.py
Normal file
5
Scripts/API_Tests/Apikeys.py
Normal file
@ -0,0 +1,5 @@
|
||||
skuid = "18Zl2NAzWTE09FHbNEBngNOJO"
|
||||
unknown = "SlpQlju219WnWogn94dQUT6Yt"
|
||||
forcemanager = "3ia7mWFkdeALYQFYoB51yh6Ov"
|
||||
talkspace_core = "2vfHw6ksqGfT1gUhPM8pXx2wW"
|
||||
wildhealth = "HWxj6VTNPwbc3WghFTPzr7SjE"
|
||||
BIN
Scripts/API_Tests/__pycache__/Apikeys.cpython-311.pyc
Normal file
BIN
Scripts/API_Tests/__pycache__/Apikeys.cpython-311.pyc
Normal file
Binary file not shown.
@ -1,8 +1,9 @@
|
||||
import requests
|
||||
import pandas as pd
|
||||
import Apikeys
|
||||
|
||||
csv = "/Users/normrasmussen/Downloads/ts_id_roles.csv"
|
||||
apiKey = "18Zl2NAzWTE09FHbNEBngNOJO"
|
||||
apiKey = Apikeys.skuid
|
||||
baseUrlemail = "https://api.northpass.com/v2/people?filter[email][eq]="
|
||||
|
||||
|
||||
|
||||
@ -1,22 +1,14 @@
|
||||
import requests
|
||||
import Apikeys
|
||||
|
||||
# apiKey = "SlpQlju219WnWogn94dQUT6Yt"
|
||||
|
||||
# apiKey = "3ia7mWFkdeALYQFYoB51yh6Ov"
|
||||
# ForceManager
|
||||
|
||||
# apiKey = "2vfHw6ksqGfT1gUhPM8pXx2wW"
|
||||
# Talkspace Core
|
||||
|
||||
apiKey = "HWxj6VTNPwbc3WghFTPzr7SjE"
|
||||
# Wild Health
|
||||
|
||||
# url ="https://api.northpass.com/v2/groups/e6ef3e5f-b5a2-4b10-868b-8c165d76d263/learning_paths"
|
||||
# "https://api.northpass.com/v1/media"
|
||||
url = "https://api.northpass.com/v1/media"
|
||||
# function = sys.argv[1]
|
||||
apiKey = Apikeys.talkspace_core
|
||||
|
||||
# Get Group Memberships:
|
||||
url = "https://api.northpass.com/v2/groups/504c4771-223a-447f-9ec6-08e51bc9ca23/memberships"
|
||||
# url = "https://api.northpass.com/v2/groups/504c4771-223a-447f-9ec6-08e51bc9ca23/memberships"
|
||||
|
||||
|
||||
def putTest(apiKey, url):
|
||||
@ -37,11 +29,14 @@ def putTest(apiKey, url):
|
||||
|
||||
|
||||
def getTest(apiKey, url):
|
||||
print(url)
|
||||
print(apiKey)
|
||||
headers = {"accept": "application/json", "X-Api-Key": apiKey}
|
||||
response = requests.get(url, headers=headers)
|
||||
# print(response.text)
|
||||
jsonResponse = response.json()
|
||||
print(jsonResponse["included"][1]["attributes"]["email"])
|
||||
print(jsonResponse)
|
||||
# print(jsonResponse["included"][1]["attributes"]["email"])
|
||||
# print(jsonResponse["data"][1]["attributes"])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user