Small notes. Couldn't figure out hubspot API....
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user