All URIs are relative to https://ticktick.com
Method | HTTP request | Description |
---|---|---|
complete_specify_task | POST /open/v1/project/{projectId}/task/{taskId}/complete | Complete a task by project ID and task ID |
create_single_task | POST /open/v1/task | Create a task to TickTick |
delete_specify_task | DELETE /open/v1/project/{projectId}/task/{taskId} | Delete a task by project ID and task ID |
get_all_projects | GET /open/v1/project | Get the list of projects |
get_project_by_id | GET /open/v1/project/{projectId} | Get a project by ID |
get_project_with_data_by_id | GET /open/v1/project/{projectId}/data | Get project with data by ID |
complete_specify_task(project_id, task_id)
Complete a task by project ID and task ID
import time
import os
import custom_components.ticktick_todo.pyticktick.openapi_client
from custom_components.ticktick_todo.pyticktick.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ticktick.com
# See configuration.py for a list of all supported configuration parameters.
configuration = custom_components.ticktick_todo.pyticktick.openapi_client.Configuration(
host = "https://ticktick.com"
)
# Enter a context with an instance of the API client
async with custom_components.ticktick_todo.pyticktick.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = custom_components.ticktick_todo.pyticktick.openapi_client.DefaultApi(api_client)
project_id = 'project_id_example' # str | The ID of project which task in
task_id = 'task_id_example' # str | The ID of task
try:
# Complete a task by project ID and task ID
await api_instance.complete_specify_task(project_id, task_id)
except Exception as e:
print("Exception when calling DefaultApi->complete_specify_task: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of project which task in | |
task_id | str | The ID of task |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Task create_single_task(task=task)
Create a task to TickTick
import time
import os
import custom_components.ticktick_todo.pyticktick.openapi_client
from custom_components.ticktick_todo.pyticktick.openapi_client.models.task import Task
from custom_components.ticktick_todo.pyticktick.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ticktick.com
# See configuration.py for a list of all supported configuration parameters.
configuration = custom_components.ticktick_todo.pyticktick.openapi_client.Configuration(
host = "https://ticktick.com"
)
# Enter a context with an instance of the API client
async with custom_components.ticktick_todo.pyticktick.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = custom_components.ticktick_todo.pyticktick.openapi_client.DefaultApi(api_client)
task = {"title":"new task title"} # Task | New task info (optional)
try:
# Create a task to TickTick
api_response = await api_instance.create_single_task(task=task)
print("The response of DefaultApi->create_single_task:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->create_single_task: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
task | Task | New task info | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_specify_task(project_id, task_id)
Delete a task by project ID and task ID
import time
import os
import custom_components.ticktick_todo.pyticktick.openapi_client
from custom_components.ticktick_todo.pyticktick.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ticktick.com
# See configuration.py for a list of all supported configuration parameters.
configuration = custom_components.ticktick_todo.pyticktick.openapi_client.Configuration(
host = "https://ticktick.com"
)
# Enter a context with an instance of the API client
async with custom_components.ticktick_todo.pyticktick.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = custom_components.ticktick_todo.pyticktick.openapi_client.DefaultApi(api_client)
project_id = 'project_id_example' # str | The ID of project which task in
task_id = 'task_id_example' # str | The ID of task
try:
# Delete a task by project ID and task ID
await api_instance.delete_specify_task(project_id, task_id)
except Exception as e:
print("Exception when calling DefaultApi->delete_specify_task: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of project which task in | |
task_id | str | The ID of task |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[Project] get_all_projects()
Get the list of projects
import time
import os
import custom_components.ticktick_todo.pyticktick.openapi_client
from custom_components.ticktick_todo.pyticktick.openapi_client.models.project import Project
from custom_components.ticktick_todo.pyticktick.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ticktick.com
# See configuration.py for a list of all supported configuration parameters.
configuration = custom_components.ticktick_todo.pyticktick.openapi_client.Configuration(
host = "https://ticktick.com"
)
# Enter a context with an instance of the API client
async with custom_components.ticktick_todo.pyticktick.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = custom_components.ticktick_todo.pyticktick.openapi_client.DefaultApi(api_client)
try:
# Get the list of projects
api_response = await api_instance.get_all_projects()
print("The response of DefaultApi->get_all_projects:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_all_projects: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project get_project_by_id(project_id)
Get a project by ID
import time
import os
import custom_components.ticktick_todo.pyticktick.openapi_client
from custom_components.ticktick_todo.pyticktick.openapi_client.models.project import Project
from custom_components.ticktick_todo.pyticktick.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ticktick.com
# See configuration.py for a list of all supported configuration parameters.
configuration = custom_components.ticktick_todo.pyticktick.openapi_client.Configuration(
host = "https://ticktick.com"
)
# Enter a context with an instance of the API client
async with custom_components.ticktick_todo.pyticktick.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = custom_components.ticktick_todo.pyticktick.openapi_client.DefaultApi(api_client)
project_id = 'project_id_example' # str | The ID of project.
try:
# Get a project by ID
api_response = await api_instance.get_project_by_id(project_id)
print("The response of DefaultApi->get_project_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_project_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of project. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProjectData get_project_with_data_by_id(project_id)
Get project with data by ID
import time
import os
import custom_components.ticktick_todo.pyticktick.openapi_client
from custom_components.ticktick_todo.pyticktick.openapi_client.models.project_data import ProjectData
from custom_components.ticktick_todo.pyticktick.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://ticktick.com
# See configuration.py for a list of all supported configuration parameters.
configuration = custom_components.ticktick_todo.pyticktick.openapi_client.Configuration(
host = "https://ticktick.com"
)
# Enter a context with an instance of the API client
async with custom_components.ticktick_todo.pyticktick.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = custom_components.ticktick_todo.pyticktick.openapi_client.DefaultApi(api_client)
project_id = 'project_id_example' # str | The ID of project.
try:
# Get project with data by ID
api_response = await api_instance.get_project_with_data_by_id(project_id)
print("The response of DefaultApi->get_project_with_data_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_project_with_data_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of project. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]