Project Group#
pyticktick.models.v2.parameters.project_group
#
Parameters for creating and updating project groups via the V2 API.
Unofficial API
These models are part of the unofficial TickTick API. They were created by reverse engineering the API. They may be incomplete or inaccurate.
Classes:
Name | Description |
---|---|
CreateProjectGroupV2 |
Model for creating a project group via the V2 API. |
PostBatchProjectGroupV2 |
Model for batch project group operations via the V2 API. |
UpdateProjectGroupV2 |
Model for updating a project group via the V2 API. |
CreateProjectGroupV2
pydantic-model
#
Bases: BaseModelV2
Model for creating a project group via the V2 API.
This model is used to create a project group via the V2 API. This is not currently
documented or supported in the official API docs. This is used in the
PostBatchProjectGroupV2
model.
Show JSON schema:
{
"additionalProperties": false,
"description": "Model for creating a project group via the V2 API.\n\nThis model is used to create a project group via the V2 API. This is not currently\ndocumented or supported in the official API docs. This is used in the\n`PostBatchProjectGroupV2` model.",
"properties": {
"name": {
"description": "Name of the project group to create",
"title": "Name",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the project group to create",
"title": "Id"
},
"list_type": {
"const": "group",
"default": "group",
"description": "Fixed value 'group'",
"title": "List Type",
"type": "string"
}
},
"required": [
"name"
],
"title": "CreateProjectGroupV2",
"type": "object"
}
Fields:
Validators:
empty_str_to_none
pydantic-validator
#
empty_str_to_none(v: Any) -> Any
Convert empty strings to None.
TickTick API responses sometimes conflates None
and empty strings for
optional fields. This validator ensures that empty strings are converted to
None
, which then allows for more consistent handling of the data within the
library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v
|
Any
|
The value to validate. |
required |
Returns:
Name | Type | Description |
---|---|---|
Any |
Any
|
The input value if it is not an empty string, otherwise |
Source code in src/pyticktick/models/v2/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
PostBatchProjectGroupV2
pydantic-model
#
Bases: BaseModelV2
Model for batch project group operations via the V2 API.
This model is used to batch create, update, and delete project groups in bulk
against the V2 API endpoint POST /batch/projectGroup
.
Show JSON schema:
{
"$defs": {
"CreateProjectGroupV2": {
"additionalProperties": false,
"description": "Model for creating a project group via the V2 API.\n\nThis model is used to create a project group via the V2 API. This is not currently\ndocumented or supported in the official API docs. This is used in the\n`PostBatchProjectGroupV2` model.",
"properties": {
"name": {
"description": "Name of the project group to create",
"title": "Name",
"type": "string"
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "ID of the project group to create",
"title": "Id"
},
"list_type": {
"const": "group",
"default": "group",
"description": "Fixed value 'group'",
"title": "List Type",
"type": "string"
}
},
"required": [
"name"
],
"title": "CreateProjectGroupV2",
"type": "object"
},
"UpdateProjectGroupV2": {
"additionalProperties": false,
"description": "Model for updating a project group via the V2 API.\n\nThis model is used to update a project group via the V2 API. This is not currently\ndocumented or supported in the official API docs. This is used in the\n`PostBatchProjectGroupV2` model.",
"properties": {
"name": {
"description": "Name of the project group to update",
"title": "Name",
"type": "string"
},
"id": {
"description": "ID of the project group to update",
"title": "Id",
"type": "string"
},
"list_type": {
"const": "group",
"default": "group",
"description": "Fixed value 'group'",
"title": "List Type",
"type": "string"
}
},
"required": [
"name",
"id"
],
"title": "UpdateProjectGroupV2",
"type": "object"
}
},
"additionalProperties": false,
"description": "Model for batch project group operations via the V2 API.\n\nThis model is used to batch create, update, and delete project groups in bulk\nagainst the V2 API endpoint `POST /batch/projectGroup`.",
"properties": {
"add": {
"default": [],
"description": "List of project groups to add",
"items": {
"$ref": "#/$defs/CreateProjectGroupV2"
},
"title": "Add",
"type": "array"
},
"delete": {
"default": [],
"description": "List of project group IDs to delete",
"items": {
"type": "string"
},
"title": "Delete",
"type": "array"
},
"update": {
"default": [],
"description": "List of project groups to update",
"items": {
"$ref": "#/$defs/UpdateProjectGroupV2"
},
"title": "Update",
"type": "array"
}
},
"title": "PostBatchProjectGroupV2",
"type": "object"
}
Fields:
-
add
(list[CreateProjectGroupV2]
) -
delete
(list[ObjectId]
) -
update
(list[UpdateProjectGroupV2]
)
Validators:
empty_str_to_none
pydantic-validator
#
empty_str_to_none(v: Any) -> Any
Convert empty strings to None.
TickTick API responses sometimes conflates None
and empty strings for
optional fields. This validator ensures that empty strings are converted to
None
, which then allows for more consistent handling of the data within the
library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v
|
Any
|
The value to validate. |
required |
Returns:
Name | Type | Description |
---|---|---|
Any |
Any
|
The input value if it is not an empty string, otherwise |
Source code in src/pyticktick/models/v2/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
UpdateProjectGroupV2
pydantic-model
#
Bases: BaseModelV2
Model for updating a project group via the V2 API.
This model is used to update a project group via the V2 API. This is not currently
documented or supported in the official API docs. This is used in the
PostBatchProjectGroupV2
model.
Show JSON schema:
{
"additionalProperties": false,
"description": "Model for updating a project group via the V2 API.\n\nThis model is used to update a project group via the V2 API. This is not currently\ndocumented or supported in the official API docs. This is used in the\n`PostBatchProjectGroupV2` model.",
"properties": {
"name": {
"description": "Name of the project group to update",
"title": "Name",
"type": "string"
},
"id": {
"description": "ID of the project group to update",
"title": "Id",
"type": "string"
},
"list_type": {
"const": "group",
"default": "group",
"description": "Fixed value 'group'",
"title": "List Type",
"type": "string"
}
},
"required": [
"name",
"id"
],
"title": "UpdateProjectGroupV2",
"type": "object"
}
Fields:
Validators:
empty_str_to_none
pydantic-validator
#
empty_str_to_none(v: Any) -> Any
Convert empty strings to None.
TickTick API responses sometimes conflates None
and empty strings for
optional fields. This validator ensures that empty strings are converted to
None
, which then allows for more consistent handling of the data within the
library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
v
|
Any
|
The value to validate. |
required |
Returns:
Name | Type | Description |
---|---|---|
Any |
Any
|
The input value if it is not an empty string, otherwise |
Source code in src/pyticktick/models/v2/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|