UNPKG

projectmanager-sdk

Version:

Software development kit for the ProjectManager.com API. for TypeScript

59 lines 1.58 kB
/** * 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 NptClient { client; /** * Internal constructor for this client library */ constructor(client) { this.client = client; } /** * Gets a Npt * * @param nptId the id of the npt */ getNpt(nptId) { const url = `/api/data/non-project-tasks/${nptId}`; return this.client.request("get", url, null, null); } /** * Update a Npt * * @param nptId the id of the npt * @param body the fields to update */ updateNpt(nptId, body) { const url = `/api/data/non-project-tasks/${nptId}`; return this.client.request("put", url, null, body); } /** * Remove Npt * * @param nptId the id of the npt to remove */ removeNpt(nptId) { const url = `/api/data/non-project-tasks/${nptId}`; return this.client.request("delete", url, null, null); } /** * Creates a new Npt * * @param body The data used to create the Npt */ createNpt(body) { const url = `/api/data/non-project-tasks`; return this.client.request("post", url, null, body); } } //# sourceMappingURL=NptClient.js.map