MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / deleteTask

Method deleteTask

js/botasaurus-desktop-api/src/index.ts:517–536  ·  view source on GitHub ↗
(taskId: number)

Source from the content-addressed store, hash-verified

515 }
516
517 async deleteTask(taskId: number): Promise<OkResponse> {
518 /**
519 * Deletes a specific task.
520 *
521 * @param taskId The ID of the task to delete.
522 * @return A success message.
523 */
524 const url = this._makeApiUrl(`tasks/${taskId}`);
525 try {
526 const response = await axios.delete(url);
527
528 this._writeJson("delete_task", response.data);
529 return response.data;
530 } catch (error) {
531 if (axios.isAxiosError(error)) {
532 raiseIfBadException(error.response as AxiosResponse);
533 }
534 throw error;
535 }
536 }
537
538 async deleteTasks({ taskIds }: { taskIds: number[] }): Promise<OkResponse> {
539 /**

Callers

nothing calls this directly

Calls 4

_makeApiUrlMethod · 0.95
_writeJsonMethod · 0.95
raiseIfBadExceptionFunction · 0.85
deleteMethod · 0.45

Tested by

no test coverage detected