New talkspace script. Added a bunch of templates as backup.

This commit is contained in:
Norm Rasmussen
2023-11-03 16:52:02 -04:00
parent 4d20bb39d2
commit 2912377102
23 changed files with 731 additions and 94 deletions

View File

@ -1,17 +1,17 @@
skuid = "shdX7ht5PZHoOBKOZqZsTMaCJ"
unknown = "SlpQlju219WnWogn94dQUT6Yt"
forcemanager = "3ia7mWFkdeALYQFYoB51yh6Ov"
talkspace_core = "2vfHw6ksqGfT1gUhPM8pXx2wW"
wildhealth_edportal = "HWxj6VTNPwbc3WghFTPzr7SjE"
normsandbox = "SlpQlju219WnWogn94dQUT6Yt"
walmartprod = "6hUfJdAartHTHhHc0WIRZYPWe"
recast = "9LISLpq7Ebqot3Xrggn5twKWZ"
mizuno = "stXNF84HWL8aCGeRjHEo2rJ1U"
mizuno_running = "XeRrtgm0BFYPjOjPekVwCdGkW"
sps = "VNDXh8K4tLYJ-Nvp78bo6w"
anthology = "8ALsk8jDOlynEwn8ScMBSnG87"
talkspace_1099 = "ga5FEVoqrJRZWePHtNnyV2Ep7"
doximity_internal = "vAnSR4CvxpII6buj3uT23MPBY"
terminus_employee = "M2er8m0DMQyCyP7zOg3Gbae9k"
bigideas = "mgGWRtmhebC9xulTXeSohVtop"
zenjob = "LIXqtHXEqcXHyN0EtezngnpzA"
SKUID = "shdX7ht5PZHoOBKOZqZsTMaCJ"
UNKNOWN = "SlpQlju219WnWogn94dQUT6Yt"
FORCEMANAGER = "3ia7mWFkdeALYQFYoB51yh6Ov"
TALKSPACE_CORE = "2vfHw6ksqGfT1gUhPM8pXx2wW"
WILDHEALTH_EDPORTAL = "HWxj6VTNPwbc3WghFTPzr7SjE"
NORMSANDBOX = "SlpQlju219WnWogn94dQUT6Yt"
WALMARTPROD = "6hUfJdAartHTHhHc0WIRZYPWe"
RECAST = "9LISLpq7Ebqot3Xrggn5twKWZ"
MIZUNO = "stXNF84HWL8aCGeRjHEo2rJ1U"
MIZUNO_RUNNING = "XeRrtgm0BFYPjOjPekVwCdGkW"
SPS = "VNDXh8K4tLYJ-Nvp78bo6w"
ANTHOLOGY = "8ALsk8jDOlynEwn8ScMBSnG87"
TALKSPACE_1099 = "ga5FEVoqrJRZWePHtNnyV2Ep7"
DOXIMITY_INTERNAL = "vAnSR4CvxpII6buj3uT23MPBY"
TERMINUS_EMPLOYEE = "M2er8m0DMQyCyP7zOg3Gbae9k"
BIGIDEAS = "mgGWRtmhebC9xulTXeSohVtop"
ZENJOB = "LIXqtHXEqcXHyN0EtezngnpzA"

View File

@ -0,0 +1,36 @@
import requests
import pandas as pd
import Apikeys
APIKEY = Apikeys.TALKSPACE_1099
HEADERS = {"accept": "application/json", "X-Api-Key": APIKEY}
DF = pd.DataFrame()
def find_no_ids():
"""
This function paginates to find all
"""
count = 0
user_list = []
while True:
count += 1
url = f"https://api.northpass.com/v2/properties/people?limit=100&page={count}"
response = requests.get(url, headers=HEADERS)
response = response.json()
nextlink = response["links"]
data = response["data"][0]["attributes"]["properties"]
if data["user_id"] is None:
user_tupe = (data["first_name"], data["last_name"], data["email"])
user_list.append(user_tupe)
if "next" not in nextlink:
break
pp = DF.from_dict(user_list)
pp.to_csv("~/Downloads/Talkspace_NoIDs_11.3.23.csv")
if __name__ == "__main__":
find_no_ids()