Skip to content

Commit

Permalink
feat(rest): add get task detail method
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Mar 24, 2024
1 parent 7116d79 commit 52d292c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "1.3.7",
"version": "1.3.8",
"packageManager": "pnpm@8.6.1",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-gopeed-ext/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-gopeed-ext",
"version": "1.3.7",
"version": "1.3.8",
"keywords": [
"gopeed"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/create-gopeed-ext/templates/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"gopeed": "^1.3.7",
"gopeed": "^1.3.8",
"gopeed-polyfill-webpack-plugin": "^1.0.2",
"prettier": "^3.0.3",
"webpack": "^5.75.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/gopeed-rest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gopeed/rest",
"version": "1.3.7",
"version": "1.3.8",
"description": "",
"main": "dist/index.js",
"exports": {
Expand Down
9 changes: 9 additions & 0 deletions packages/gopeed-rest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ class Client {
});
}

/**
* Get task info
* @param id - Task id
* @returns
*/
public async getTask(id: string): Promise<Task> {
return this.doRequest<Task>('GET', `/api/v1/tasks/${id}`);
}

/**
* Get task list
* @param statuses - Filter by task status
Expand Down
2 changes: 1 addition & 1 deletion packages/gopeed-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gopeed/types",
"version": "1.3.7",
"version": "1.3.8",
"description": "",
"main": "dist/index.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gopeed/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gopeed",
"version": "1.3.7",
"version": "1.3.8",
"description": "",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit 52d292c

Please sign in to comment.