Changes?
This commit is contained in:
@ -38,7 +38,7 @@ def getfromEmail(emails, baseUrlemail, apiKey, data):
|
|||||||
print("Another Error!")
|
print("Another Error!")
|
||||||
|
|
||||||
data["uuid"] = data["email"].map(email_ids)
|
data["uuid"] = data["email"].map(email_ids)
|
||||||
data.dropna(how='any', inplace=True)
|
data.dropna(how="any", inplace=True)
|
||||||
assignProps(data, apiKey)
|
assignProps(data, apiKey)
|
||||||
errorstoCsv(errors)
|
errorstoCsv(errors)
|
||||||
|
|
||||||
@ -46,9 +46,9 @@ def getfromEmail(emails, baseUrlemail, apiKey, data):
|
|||||||
def errorstoCsv(errors):
|
def errorstoCsv(errors):
|
||||||
errorcsv = pd.DataFrame(errors)
|
errorcsv = pd.DataFrame(errors)
|
||||||
errorcsv.to_csv(
|
errorcsv.to_csv(
|
||||||
path_or_buf="/Users/normrasmussen/Downloads/Emails_Not_Northpass.csv",
|
path_or_buf="/Users/normrasmussen/Downloads/Emails_Not_Northpass.csv",
|
||||||
index=False
|
index=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def assignProps(data, apiKey):
|
def assignProps(data, apiKey):
|
||||||
@ -59,14 +59,16 @@ def assignProps(data, apiKey):
|
|||||||
uuid = row[4]
|
uuid = row[4]
|
||||||
url = "https://api.northpass.com/v2/properties/people/bulk"
|
url = "https://api.northpass.com/v2/properties/people/bulk"
|
||||||
payload = {
|
payload = {
|
||||||
"data": [{
|
"data": [
|
||||||
|
{
|
||||||
"type": "person_properties",
|
"type": "person_properties",
|
||||||
"attributes": {"properties": {
|
"attributes": {
|
||||||
"user_id": ts_id,
|
"properties": {"user_id": ts_id, "role_type": ts_role}
|
||||||
"role_type": ts_role
|
},
|
||||||
}},
|
|
||||||
"id": uuid,
|
"id": uuid,
|
||||||
}]}
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
headers = {
|
headers = {
|
||||||
"accept": "application/json",
|
"accept": "application/json",
|
||||||
"content-type": "application/json",
|
"content-type": "application/json",
|
||||||
|
|||||||
1
Scripts/GoogleScripts/Harri_Get_Props/test.py
Normal file
1
Scripts/GoogleScripts/Harri_Get_Props/test.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
Reference in New Issue
Block a user