Started the reorganization of Scripts for github. Some notes changes.

This commit is contained in:
Norm Rasmussen
2023-05-04 16:07:06 -04:00
parent 6a674ca24b
commit 18a266746b
209 changed files with 121 additions and 12181 deletions

View File

@ -4,8 +4,8 @@ from pathlib import Path
import Apikeys
import os
basefile = "/Users/normrasmussen/Downloads/mizuno-monthly-completions.csv"
api_key = Apikeys.mizuno
basefile = "/Users/normrasmussen/Downloads/Recast-learners.csv"
api_key = Apikeys.recast
uuid_url = "https://api.northpass.com/v2/people?filter[email][eq]="
prop_url = "https://api.northpass.com/v2/properties/people/"
headers = {
@ -30,16 +30,12 @@ def load_file(basefile):
response = requests.get(url, headers=headers)
if response.status_code == 200:
response = response.json()
print(response)
uuid = response["data"][0]["id"]
print(uuid)
url2 = prop_url + f"{uuid}"
response = requests.get(url2, headers=headers)
data = response.json()
pgaid = data["data"]["attributes"]["properties"]["account_number"]
row_dict["pgaid"] = pgaid
elif response.status_code == 404:
row_dict["pgaid"] = "User Not Found"
dict_list.append(row_dict)
print("No errors! Passing along the dictionary!")
except KeyError as e: