You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
homepage/src/widgets/todoist/widget.js

36 lines
712 B

import credentialedProxyHandler from "utils/proxy/handlers/credentialed";
const widget = {
api: "https://api.todoist.com/rest/v2/{endpoint}",
proxyHandler: credentialedProxyHandler,
mappings: {
getAllActiveTasks: {
method: "GET",
endpoint: "tasks",
},
getAllProjects: {
method: "GET",
endpoint: "projects",
},
getTasksWithCustomFilter: {
method: "GET",
endpoint: "tasks",
params: ["filter"]
},
getTasksWithLabel: {
method: "GET",
endpoint: "tasks",
params: ["label"]
},
getTasksWithProject: {
method: "GET",
endpoint: "tasks",
params: ["project_id"]
},
},
};
export default widget;