SPS Templates, Skuid checkbox, Script for WildHealth
This commit is contained in:
@ -3,16 +3,18 @@ import pandas as pd
|
||||
|
||||
apiKey = "HWxj6VTNPwbc3WghFTPzr7SjE"
|
||||
# Wild Health
|
||||
groupid = "504c4771-223a-447f-9ec6-08e51bc9ca23"
|
||||
groupurl = f"https://api.northpass.com/v2/groups/{groupid}/memberships"
|
||||
|
||||
jan_groupid = "504c4771-223a-447f-9ec6-08e51bc9ca23"
|
||||
july_groupid = "a988c9b0-d9f7-400e-a859-48a0fb167da7"
|
||||
groupurl = f"https://api.northpass.com/v2/groups/{jan_groupid}/memberships"
|
||||
|
||||
|
||||
def getemailsfromGroup(apiKey, groupid, groupurl):
|
||||
def getemailsfromGroup(apiKey, jan_groupid, groupurl):
|
||||
x = 0
|
||||
emaillist = []
|
||||
while True:
|
||||
x += 1
|
||||
url = f"https://api.northpass.com/v2/groups/{groupid}/memberships?page={x}"
|
||||
url = f"https://api.northpass.com/v2/groups/{jan_groupid}/memberships?page={x}"
|
||||
headers = {"accept": "application/json", "X-Api-Key": apiKey}
|
||||
response = requests.get(url, headers=headers)
|
||||
jsonResponse = response.json()
|
||||
@ -30,4 +32,4 @@ def getemailsfromGroup(apiKey, groupid, groupurl):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
getemailsfromGroup(apiKey, groupid, groupurl)
|
||||
getemailsfromGroup(apiKey, jan_groupid, groupurl)
|
||||
|
||||
Reference in New Issue
Block a user