All files can be found in user-task/examples folder.
If you are using Webstorm then "run configuration" are available by default and are stored in .idea/runConfigurations.
User task samples aim to give third-party developers a clue about possible ways of:
- Creating a job
- Updating a job
- Listing assigned jobs
- Listing current team jobs
- Delete a job
- Creating a task
- Creating a task with new mission
- Creating a task with new corridor mission
- Updating a task
- Listing assigned tasks
- Listing current team tasks
- Listing current company tasks
- Delete a task
- Clone the repository and install Node packages locally.
git clone https://github.com/unleashlive/samples.git
cd 'javascript'
npm install- Gather and update all the informations for setting up config environment. The information includes:
cd 'javascript/config'Update the user.js file with your username and password
export let USER_NAME = "test@user-name.com";
export let PASSWORD = "test-pass";-
"test@user-name.com": The same login email that is used to login into cloud.unleashlive.com
-
"test-pass": Password for the above login email.
create-job.js Basic example how to create empty job.
cd 'javascript/user-task/examples/'create-task.js Basic example how to create empty task. The task can be assigned to the job on it's creation level by
passing jobId in request payload.
cd 'javascript/user-task/examples/'Any create task endpoint supports additional context fields: mission, geojson.
create-task-mission.js allows user to upload the flight missions for your mission planner.
cd 'javascript/user-task/examples/'Specify the path of the mission file that you want to upload in the following line:
const body = JSON.parse(fs.readFileSync('<path of mission files>').toString());The test mission files are located in javascript/mission/assets.
To create a mission associated with a task use /task/mission POST request.
For more details about mission files format go to
create-task-corridor-mission.js allows user to upload the flight missions for your mission planner.
cd 'javascript/user-task/examples/'Specify the path of the mission file that you want to upload in the following line:
const body = JSON.parse(fs.readFileSync('<path of mission files>').toString());The test mission files are located in javascript/mission/assets.
To create a mission associated with a task use /task/mission POST request.
For more details about mission files format go to
get-task.js Basic example how to read task object.
cd 'javascript/user-task/examples/'get-job.js Basic example how to read job object.
cd 'javascript/user-task/examples/'list-assigned-jobs.js Basic example how to list jobs assigned to a user.
cd 'javascript/user-task/examples/'list-assigned-task.js Basic example how to list tasks assigned to a user.
cd 'javascript/user-task/examples/'list-company-task.js Basic example how to list tasks user's company.
cd 'javascript/user-task/examples/'list-team-task.js Basic example how to list tasks user's team.
cd 'javascript/user-task/examples/'list-company-jobs.js Basic example how to list tasks user's team.
cd 'javascript/user-task/examples/'delete-job.js Basic example how to delete job. Job can't contain any assigned task in order to be deleted
cd 'javascript/user-task/examples/'delete-task.js Basic example how to delete task.
cd 'javascript/user-task/examples/'update-job.js Basic example how to update job.
cd 'javascript/user-task/examples/'update-task.js Basic example how to update task.
cd 'javascript/user-task/examples/'For further support please email us at support@unleashlive.com