Get a Project Group by ID#
Let's assume we want to get a project group with the project group ID 6822056f27de221753d62ef0
.
This is what the pyticktick
code would look like:
import json
from pyticktick import Client
resp = client.get_batch_v2()
if resp.project_groups is None:
print("No project groups found.")
else:
for pg in resp.project_groups:
if pg.id == "6822056f27de221753d62ef0":
print(json.dumps(pg.model_dump(mode="json"), indent=4))
will return:
{
"etag": "y8vuqi2b",
"id": "6822056f27de221753d62ef0",
"name": "Project Group 2",
"sort_option": null,
"view_mode": null,
"deleted": 0,
"show_all": true,
"sort_order": -8658654068736,
"sort_type": "",
"team_id": null,
"timeline": null,
"user_id": 126406863
}