Search
Search
Search
Search
Information
Information
Light
Dark
Open actions menu
Basic upload method
Bypass upload method
Tips!
If you encounter an error (by firewall) while uploading using both methods,
try changing extension of the file before uploading it and rename it right after.
This uploader supports multiple file upload.
Submit
~
var
www
podio-api-client
lib
modules
api
File Content:
Task.js
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Api_1 = __importDefault(require("./Api")); class Task extends Api_1.default { constructor(props) { super(props); } /** * Assigns the task to another user. This makes the user responsible for the task and its completion. * @see https://developers.podio.com/doc/tasks/assign-task-22412 * @param {number} task_id * @param {any} attributes * @returns {Promise<HttpResponse<string>>} */ assign(task_id, attributes = {}) { const requestObj = { method: 'post', url: `/task/${task_id}/assign`, data: attributes, }; return this._httpRequest(requestObj); } /** * Mark the given task as completed. * @see https://developers.podio.com/doc/tasks/complete-task-22432 * @param {number} task_id * @returns {Promise<HttpResponse<RecurringTaskIdType>>} */ complete(task_id) { const requestObj = { method: 'post', url: `/task/${task_id}/complete`, }; return this._httpRequest(requestObj); } /** * Creates a new personal label for the user. * @see https://developers.podio.com/doc/tasks/create-label-151265 * @param {any} attributes * @returns {Promise<HttpResponse<CreateLabelType>>} */ createLabel(attributes = {}) { const requestObj = { method: 'post', url: `/task/label/`, data: attributes, }; return this._httpRequest(requestObj); } /** * Creates a new task. * @see https://developers.podio.com/doc/tasks/create-task-22419 * @param {any} attributes * @returns {Promise<HttpResponse<TaskType>>} */ create(attributes = {}) { const requestObj = { method: 'post', url: `/task/`, data: attributes, }; return this._httpRequest(requestObj); } /** * Creates a new task with a reference to the given object. The valid types of objects are "item", "status", "app", "space" and "conversation". * @see https://developers.podio.com/doc/tasks/create-task-with-reference-22420 * @param {string} ref_type * @param {number} ref_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<TaskType>>} */ createFor(ref_type, ref_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'post', url: `/task/${ref_type}/${ref_id}/?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Deletes the label with the given id. This will remove the label from all tasks. * @see https://developers.podio.com/doc/tasks/delete-label-151302 * @param {number} label_id * @returns {Promise<HttpResponse<string>>} */ deleteLabel(label_id) { const requestObj = { method: 'delete', url: `/task/label/${label_id}`, }; return this._httpRequest(requestObj); } /** * Deletes the task with the given id. * @see https://developers.podio.com/doc/tasks/delete-task-77179 * @param {number} task_id * @returns {Promise<HttpResponse<string>>} */ delete(task_id) { const requestObj = { method: 'delete', url: `/task/${task_id}`, }; return this._httpRequest(requestObj); } /** * Returns the users task labels. * @see https://developers.podio.com/doc/tasks/get-labels-151534 * @returns {Promise<HttpResponse<LabelType[]>>} */ getAllLabels() { const requestObj = { method: 'get', url: `/task/label/`, }; return this._httpRequest(requestObj); } /** * Returns the task with the given id. * @see https://developers.podio.com/doc/tasks/get-task-22413 * @param {number} task_id * @returns {Promise<HttpResponse<TaskType>>} */ get(task_id) { const requestObj = { method: 'get', url: `/task/${task_id}`, }; return this._httpRequest(requestObj); } /** * Returns the total open tasks for the user on the reference. * @see https://developers.podio.com/doc/tasks/get-task-count-38316458 * @param {string} ref_type * @param {number} ref_id * @returns {Promise<HttpResponse<TaskCountType>>} */ countByRef(ref_type, ref_id) { const requestObj = { method: 'get', url: `/task/${ref_type}/${ref_id}/count`, }; return this._httpRequest(requestObj); } /** * Returns the task summary for the active user * @see https://developers.podio.com/doc/tasks/get-task-summary-1612017 * @param {any} attributes * @returns {Promise<HttpResponse<TaskSummaryType>>} */ getSummary(attributes = {}) { const requestObj = { method: 'get', url: `/task/summary`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the task summary for the organization for the active user * @see https://developers.podio.com/doc/tasks/get-task-summary-for-organization-1612063 * @param {number} org_id * @param {any} attributes * @returns {Promise<HttpResponse<TaskSummaryType>>} */ getSummaryForOrg(org_id, attributes = {}) { const requestObj = { method: 'get', url: `/task/org/${org_id}/summary`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the tasks summary for personal tasks and tasks on personal spaces and sub-orgs. * @see https://developers.podio.com/doc/tasks/get-task-summary-for-personal-1657217 * @param {any} attributes * @returns {Promise<HttpResponse<TaskSummaryType>>} */ getSummaryPersonal(attributes = {}) { const requestObj = { method: 'get', url: `/task/personal/summary`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the task summary for the given reference object. * @see https://developers.podio.com/doc/tasks/get-task-summary-for-reference-1657980 * @param {string} ref_type * @param {number} ref_id * @param {any} attributes * @returns */ getSummaryForReference(ref_type, ref_id, attributes = {}) { const requestObj = { method: 'get', url: `/task/${ref_type}/${ref_id}/summary`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the task summary for the given space for the active user * @see https://developers.podio.com/doc/tasks/get-task-summary-for-space-1612130 * @param {number} space_id * @param {any} attributes * @returns {Promise<HttpResponse<TaskSummaryType>> } */ getSummaryForSpace(space_id, attributes = {}) { const requestObj = { method: 'get', url: `/task/space/${space_id}/summary`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns the total number of tasks for the given time. The valid values for time are: "overdue", "due", "today" and "all" * @see https://developers.podio.com/doc/tasks/get-task-totals-by-time-5435062 * @param {string} time * @param {any} attributes * @returns */ totalByTime(time, attributes = {}) { const requestObj = { method: 'get', url: `/task/total/${time}`, params: attributes, }; return this._httpRequest(requestObj); } /** * Get the totals for the users active tasks. * @see https://developers.podio.com/doc/tasks/get-task-totals-v2-83590 * @param attributes * @returns */ total(attributes = {}) { const requestObj = { method: 'get', url: `/task/total/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Returns a list of all tasks matching all given filters and grouped by the specified group. * @see https://developers.podio.com/doc/tasks/get-tasks-77949 * @param {GetAllAttributes} attributes * @returns {Promise<HttpResponse<MiniTaskType[]>>} */ getAll(attributes) { const requestObj = { method: 'get', url: `/task/`, params: attributes, }; return this._httpRequest(requestObj); } /** * Mark the completed task as no longer being completed. * @see https://developers.podio.com/doc/tasks/incomplete-task-22433 * @param {number} task_id * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<string>>} */ incomplete(task_id, silent = false, hook = true) { const requestObj = { method: 'post', url: `/task/${task_id}/incomplete?silent=${silent}&hook=${hook}`, }; return this._httpRequest(requestObj); } /** * Ranks the task in comparison to one or two other tasks. * @see https://developers.podio.com/doc/tasks/rank-task-81015 * @param {number} task_id * @param {any} attributes * @returns {Promise<HttpResponse<string>>} */ rank(task_id, attributes = {}) { const requestObj = { method: 'post', url: `/task/${task_id}/rank`, data: attributes, }; return this._httpRequest(requestObj); } /** * Deletes the reference on the task * @see https://developers.podio.com/doc/tasks/remove-task-reference-6146114 * @param {number} task_id * @returns {Promise<HttpResponse<string>>} */ deleteRef(task_id) { const requestObj = { method: 'delete', url: `/task/${task_id}/ref`, }; return this._httpRequest(requestObj); } /** * Updates the label with the given id * @see https://developers.podio.com/doc/tasks/update-label-151289 * @param {number} label_id * @param {any} attributes * @returns {Promise<HttpResponse<string>>} */ updateLabel(label_id, attributes = {}) { const requestObj = { method: 'put', url: `/task/label/${label_id}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the task with the given attributes. Any attributes not specified will remain unchanged. * @see https://developers.podio.com/doc/tasks/update-task-10583674 * @param {number} task_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<TaskType>>} */ update(task_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'put', url: `/task/${task_id}?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the description of the task. * @see https://developers.podio.com/doc/tasks/update-task-description-76982 * @param {number} task_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<string>>} */ updateDescription(task_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'put', url: `/task/${task_id}/description?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the due on property on the task * @see https://developers.podio.com/doc/tasks/update-task-due-on-3442633 * @param {number} task_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<string>>} */ updateDueOn(task_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'put', url: `/task/${task_id}/due?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the task with new labels * @see https://developers.podio.com/doc/tasks/update-task-labels-151769 * @param {number} task_id * @param {any} attributes * @returns {Promise<HttpResponse<string>>} */ updateLabels(task_id, attributes = {}) { const requestObj = { method: 'put', url: `/task/${task_id}/label/`, data: attributes, }; return this._httpRequest(requestObj); } /** * Update the private flag on the given task. * @see https://developers.podio.com/doc/tasks/update-task-private-22434 * @param {number} task_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<string>>} */ updatePrivate(task_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'put', url: `/task/${task_id}/private?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Attached this task to an object. If the task is already attached to an object, it will be detached from that object and reattached on the new object. * @see https://developers.podio.com/doc/tasks/update-task-reference-170733 * @param {number} task_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<string>>} */ updateReference(task_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'put', url: `/task/${task_id}/ref?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } /** * Updates the text of the task. * @see https://developers.podio.com/doc/tasks/update-task-text-22428 * @param {number} task_id * @param {any} attributes * @param {boolean} silent * @param {boolean} hook * @returns {Promise<HttpResponse<string>>} */ updateText(task_id, attributes = {}, silent = false, hook = true) { const requestObj = { method: 'put', url: `/task/${task_id}/text?silent=${silent}&hook=${hook}`, data: attributes, }; return this._httpRequest(requestObj); } } exports.default = Task;
Edit
Download
Unzip
Chmod
Delete