Small notes. Couldn't figure out hubspot API....

This commit is contained in:
Norm Rasmussen
2023-07-31 17:10:06 -04:00
parent af7edafd35
commit 86678363f9
5 changed files with 46 additions and 16 deletions

View File

@ -18,14 +18,17 @@ def get_groups(apiKey):
nextlink = data["links"]
for response in data["data"]:
group_id = response["id"]
group_name = response["attributes"]["name"]
# print(group_name)
groups_dict = {
"id": group_id,
"name": group_name,
}
groups.append(groups_dict)
created_at = response["attributes"]["created_at"]
if created_at.startswith("2023"):
group_id = response["id"]
group_name = response["attributes"]["name"]
# print(group_name)
groups_dict = {
"id": group_id,
"name": group_name,
"created_at": created_at,
}
groups.append(groups_dict)
if "next" not in nextlink:
break