projectmanager-sdk
Version:
Software development kit for the ProjectManager.com API. for TypeScript
60 lines • 1.73 kB
JavaScript
/**
* ProjectManager API for TypeScript
*
* (c) ProjectManager.com, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author ProjectManager.com <support@projectmanager.com>
* @copyright ProjectManager.com, Inc.
* @link https://github.com/projectmgr/projectmanager-sdk-typescript
*/
export class NptTodosClient {
client;
/**
* Internal constructor for this client library
*/
constructor(client) {
this.client = client;
}
/**
* Get todos for a npt
*
* @param nptId the id of the npt
*/
getNptTodos(nptId) {
const url = `/api/data/non-project-tasks/${nptId}/todos`;
return this.client.request("get", url, null, null);
}
/**
* Creates a new todo and associates it with the npt
*
* @param nptId the id of the npt
* @param body The todo to create
*/
createNptTodo(nptId, body) {
const url = `/api/data/non-project-tasks/${nptId}/todos`;
return this.client.request("post", url, null, body);
}
/**
* Update a Todo
*
* @param todoId the id of the todo
* @param body the fields to update
*/
updateANptTodo(todoId, body) {
const url = `/api/data/non-project-tasks/todos/${todoId}`;
return this.client.request("put", url, null, body);
}
/**
* Remove Npt Todo
*
* @param todoId the id of the todo to remove
*/
removeNptTodo(todoId) {
const url = `/api/data/non-project-tasks/todos/${todoId}`;
return this.client.request("delete", url, null, null);
}
}
//# sourceMappingURL=NptTodosClient.js.map