TypeScript API wrapper for Targetprocess
npm install targetprocess-rest-api
import{Targetprocess}from"targetprocess-rest-api";// initialise the APIconstapi=newTargetprocess("subdomain","yourusername","yourpassword");// get a user storyconstuserStory=awaitgetUserStory(123);// get a taskconsttask=awaitgetTask(456);// get a bugconstbug=awaitgetBug(789);// add a time entry to an entityconsttime=awaitaddTime(456,0.75,4.25,newDate('2018-09-01'),"Integration testing");// get a custom value for a projectconstvalue=awaitgetCustomValueForProject(123,"Some Custom Value");getUserStory, getTask, getBug and addTime can all throw an error with the following format:
{
statusCode: number;
message: string;}Made with 💖 by NewOrbit in Oxfordshire, and licensed under the MIT Licence