Updated swagger docs
This commit is contained in:
parent
067bb695b1
commit
36eb580c8a
4 changed files with 394 additions and 179 deletions
209
docs/docs.go
209
docs/docs.go
|
@ -1,6 +1,6 @@
|
||||||
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||||
// This file was generated by swaggo/swag at
|
// This file was generated by swaggo/swag at
|
||||||
// 2018-12-22 16:18:46.44967995 +0100 CET m=+0.133725013
|
// 2018-12-25 21:44:18.815676554 +0100 CET m=+0.161606284
|
||||||
|
|
||||||
package docs
|
package docs
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ var doc = `{
|
||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Returns a team by its ID.",
|
"description": "Returns a list by its ID.",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -99,13 +99,13 @@ var doc = `{
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"team"
|
"list"
|
||||||
],
|
],
|
||||||
"summary": "Gets one team",
|
"summary": "Gets one list",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "Team ID",
|
"description": "List ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
|
@ -113,14 +113,14 @@ var doc = `{
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "The team",
|
"description": "The list",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/models.Team"
|
"$ref": "#/definitions/models.List"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "The user does not have access to the team",
|
"description": "The user does not have access to the list",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
"$ref": "#/definitions/code.vikunja.io.web.HTTPError"
|
||||||
|
@ -1949,7 +1949,7 @@ var doc = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/tasks": {
|
"/tasks/all": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
|
@ -2001,6 +2001,138 @@ var doc = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/tasks/all/{sortby}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Returns all tasks on any list the user has access to.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"task"
|
||||||
|
],
|
||||||
|
"summary": "Get tasks sorted",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||||
|
"name": "p",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Search tasks by task text.",
|
||||||
|
"name": "s",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
||||||
|
"name": "sortby",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The tasks",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.List"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal error",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/models.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tasks/all/{sortby}/{startdate}/{enddate}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Returns all tasks on any list the user has access to.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"task"
|
||||||
|
],
|
||||||
|
"summary": "Get tasks sorted and within a date range",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||||
|
"name": "p",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Search tasks by task text.",
|
||||||
|
"name": "s",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
||||||
|
"name": "sortby",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The start date parameter. Expects a unix timestamp.",
|
||||||
|
"name": "startdate",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The end date parameter. Expects a unix timestamp.",
|
||||||
|
"name": "enddate",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The tasks",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.List"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal error",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/models.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/tasks/caldav": {
|
"/tasks/caldav": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -2155,65 +2287,6 @@ var doc = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/tasks/{sortby}": {
|
|
||||||
"get": {
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"ApiKeyAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Returns all tasks on any list the user has access to.",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"task"
|
|
||||||
],
|
|
||||||
"summary": "Get tasks sorted",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
|
||||||
"name": "p",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "Search tasks by task text.",
|
|
||||||
"name": "s",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
|
||||||
"name": "sortby",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The tasks",
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/models.List"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal error",
|
|
||||||
"schema": {
|
|
||||||
"type": "object",
|
|
||||||
"$ref": "#/definitions/models.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/teams": {
|
"/teams": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
"ApiKeyAuth": []
|
"ApiKeyAuth": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Returns a team by its ID.",
|
"description": "Returns a list by its ID.",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
|
@ -86,13 +86,13 @@
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
"team"
|
"list"
|
||||||
],
|
],
|
||||||
"summary": "Gets one team",
|
"summary": "Gets one list",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "Team ID",
|
"description": "List ID",
|
||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
|
@ -100,14 +100,14 @@
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "The team",
|
"description": "The list",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/models.Team"
|
"$ref": "#/definitions/models.List"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"403": {
|
"403": {
|
||||||
"description": "The user does not have access to the team",
|
"description": "The user does not have access to the list",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
|
||||||
|
@ -1936,7 +1936,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/tasks": {
|
"/tasks/all": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
|
@ -1988,6 +1988,138 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/tasks/all/{sortby}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Returns all tasks on any list the user has access to.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"task"
|
||||||
|
],
|
||||||
|
"summary": "Get tasks sorted",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||||
|
"name": "p",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Search tasks by task text.",
|
||||||
|
"name": "s",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
||||||
|
"name": "sortby",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The tasks",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.List"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal error",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/models.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/tasks/all/{sortby}/{startdate}/{enddate}": {
|
||||||
|
"get": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Returns all tasks on any list the user has access to.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"task"
|
||||||
|
],
|
||||||
|
"summary": "Get tasks sorted and within a date range",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
||||||
|
"name": "p",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "Search tasks by task text.",
|
||||||
|
"name": "s",
|
||||||
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
||||||
|
"name": "sortby",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The start date parameter. Expects a unix timestamp.",
|
||||||
|
"name": "startdate",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"description": "The end date parameter. Expects a unix timestamp.",
|
||||||
|
"name": "enddate",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "The tasks",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.List"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal error",
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"$ref": "#/definitions/models.Message"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/tasks/caldav": {
|
"/tasks/caldav": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -2142,65 +2274,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/tasks/{sortby}": {
|
|
||||||
"get": {
|
|
||||||
"security": [
|
|
||||||
{
|
|
||||||
"ApiKeyAuth": []
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Returns all tasks on any list the user has access to.",
|
|
||||||
"consumes": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"produces": [
|
|
||||||
"application/json"
|
|
||||||
],
|
|
||||||
"tags": [
|
|
||||||
"task"
|
|
||||||
],
|
|
||||||
"summary": "Get tasks sorted",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"description": "The page number. Used for pagination. If not provided, the first page of results is returned.",
|
|
||||||
"name": "p",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "Search tasks by task text.",
|
|
||||||
"name": "s",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.",
|
|
||||||
"name": "sortby",
|
|
||||||
"in": "path",
|
|
||||||
"required": true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "The tasks",
|
|
||||||
"schema": {
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/definitions/models.List"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"500": {
|
|
||||||
"description": "Internal error",
|
|
||||||
"schema": {
|
|
||||||
"type": "object",
|
|
||||||
"$ref": "#/definitions/models.Message"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/teams": {
|
"/teams": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
|
|
@ -396,9 +396,9 @@ paths:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: Returns a team by its ID.
|
description: Returns a list by its ID.
|
||||||
parameters:
|
parameters:
|
||||||
- description: Team ID
|
- description: List ID
|
||||||
in: path
|
in: path
|
||||||
name: id
|
name: id
|
||||||
required: true
|
required: true
|
||||||
|
@ -407,12 +407,12 @@ paths:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: The team
|
description: The list
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Team'
|
$ref: '#/definitions/models.List'
|
||||||
type: object
|
type: object
|
||||||
"403":
|
"403":
|
||||||
description: The user does not have access to the team
|
description: The user does not have access to the list
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
|
||||||
type: object
|
type: object
|
||||||
|
@ -423,9 +423,9 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
security:
|
security:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: Gets one team
|
summary: Gets one list
|
||||||
tags:
|
tags:
|
||||||
- team
|
- list
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
@ -1616,40 +1616,6 @@ paths:
|
||||||
summary: Register
|
summary: Register
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
/tasks:
|
|
||||||
get:
|
|
||||||
consumes:
|
|
||||||
- application/json
|
|
||||||
description: Returns all tasks on any list the user has access to.
|
|
||||||
parameters:
|
|
||||||
- description: The page number. Used for pagination. If not provided, the first
|
|
||||||
page of results is returned.
|
|
||||||
in: query
|
|
||||||
name: p
|
|
||||||
type: integer
|
|
||||||
- description: Search tasks by task text.
|
|
||||||
in: query
|
|
||||||
name: s
|
|
||||||
type: string
|
|
||||||
produces:
|
|
||||||
- application/json
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: The tasks
|
|
||||||
schema:
|
|
||||||
items:
|
|
||||||
$ref: '#/definitions/models.List'
|
|
||||||
type: array
|
|
||||||
"500":
|
|
||||||
description: Internal error
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.Message'
|
|
||||||
type: object
|
|
||||||
security:
|
|
||||||
- ApiKeyAuth: []
|
|
||||||
summary: Get tasks
|
|
||||||
tags:
|
|
||||||
- task
|
|
||||||
/tasks/{id}:
|
/tasks/{id}:
|
||||||
delete:
|
delete:
|
||||||
description: Deletes a task from a list. This does not mean "mark it done".
|
description: Deletes a task from a list. This does not mean "mark it done".
|
||||||
|
@ -1732,7 +1698,41 @@ paths:
|
||||||
summary: Update a task
|
summary: Update a task
|
||||||
tags:
|
tags:
|
||||||
- task
|
- task
|
||||||
/tasks/{sortby}:
|
/tasks/all:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Returns all tasks on any list the user has access to.
|
||||||
|
parameters:
|
||||||
|
- description: The page number. Used for pagination. If not provided, the first
|
||||||
|
page of results is returned.
|
||||||
|
in: query
|
||||||
|
name: p
|
||||||
|
type: integer
|
||||||
|
- description: Search tasks by task text.
|
||||||
|
in: query
|
||||||
|
name: s
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The tasks
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/models.List'
|
||||||
|
type: array
|
||||||
|
"500":
|
||||||
|
description: Internal error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Message'
|
||||||
|
type: object
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get tasks
|
||||||
|
tags:
|
||||||
|
- task
|
||||||
|
/tasks/all/{sortby}:
|
||||||
get:
|
get:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
|
@ -1772,6 +1772,56 @@ paths:
|
||||||
summary: Get tasks sorted
|
summary: Get tasks sorted
|
||||||
tags:
|
tags:
|
||||||
- task
|
- task
|
||||||
|
/tasks/all/{sortby}/{startdate}/{enddate}:
|
||||||
|
get:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Returns all tasks on any list the user has access to.
|
||||||
|
parameters:
|
||||||
|
- description: The page number. Used for pagination. If not provided, the first
|
||||||
|
page of results is returned.
|
||||||
|
in: query
|
||||||
|
name: p
|
||||||
|
type: integer
|
||||||
|
- description: Search tasks by task text.
|
||||||
|
in: query
|
||||||
|
name: s
|
||||||
|
type: string
|
||||||
|
- description: The sorting parameter. Possible values to sort by are priority,
|
||||||
|
prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc.
|
||||||
|
in: path
|
||||||
|
name: sortby
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- description: The start date parameter. Expects a unix timestamp.
|
||||||
|
in: path
|
||||||
|
name: startdate
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
- description: The end date parameter. Expects a unix timestamp.
|
||||||
|
in: path
|
||||||
|
name: enddate
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: The tasks
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/models.List'
|
||||||
|
type: array
|
||||||
|
"500":
|
||||||
|
description: Internal error
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Message'
|
||||||
|
type: object
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Get tasks sorted and within a date range
|
||||||
|
tags:
|
||||||
|
- task
|
||||||
/tasks/caldav:
|
/tasks/caldav:
|
||||||
get:
|
get:
|
||||||
description: Returns a calDAV-parsable format with all tasks as calendar events.
|
description: Returns a calDAV-parsable format with all tasks as calendar events.
|
||||||
|
|
|
@ -35,11 +35,30 @@ const (
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Success 200 {array} models.List "The tasks"
|
// @Success 200 {array} models.List "The tasks"
|
||||||
// @Failure 500 {object} models.Message "Internal error"
|
// @Failure 500 {object} models.Message "Internal error"
|
||||||
// @Router /tasks/{sortby} [get]
|
// @Router /tasks/all/{sortby} [get]
|
||||||
func dummy() {
|
func dummy() {
|
||||||
// Dummy function for swaggo to pick up the docs comment
|
// Dummy function for swaggo to pick up the docs comment
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReadAllWithPriorityAndDateRange gets all tasks for a user, sorted
|
||||||
|
// @Summary Get tasks sorted and within a date range
|
||||||
|
// @Description Returns all tasks on any list the user has access to.
|
||||||
|
// @tags task
|
||||||
|
// @Accept json
|
||||||
|
// @Produce json
|
||||||
|
// @Param p query int false "The page number. Used for pagination. If not provided, the first page of results is returned."
|
||||||
|
// @Param s query string false "Search tasks by task text."
|
||||||
|
// @Param sortby path string true "The sorting parameter. Possible values to sort by are priority, prioritydesc, priorityasc, dueadate, dueadatedesc, dueadateasc."
|
||||||
|
// @Param startdate path string true "The start date parameter. Expects a unix timestamp."
|
||||||
|
// @Param enddate path string true "The end date parameter. Expects a unix timestamp."
|
||||||
|
// @Security ApiKeyAuth
|
||||||
|
// @Success 200 {array} models.List "The tasks"
|
||||||
|
// @Failure 500 {object} models.Message "Internal error"
|
||||||
|
// @Router /tasks/all/{sortby}/{startdate}/{enddate} [get]
|
||||||
|
func dummy2() {
|
||||||
|
// Dummy function for swaggo to pick up the docs comment
|
||||||
|
}
|
||||||
|
|
||||||
// ReadAll gets all tasks for a user
|
// ReadAll gets all tasks for a user
|
||||||
// @Summary Get tasks
|
// @Summary Get tasks
|
||||||
// @Description Returns all tasks on any list the user has access to.
|
// @Description Returns all tasks on any list the user has access to.
|
||||||
|
@ -51,7 +70,7 @@ func dummy() {
|
||||||
// @Security ApiKeyAuth
|
// @Security ApiKeyAuth
|
||||||
// @Success 200 {array} models.List "The tasks"
|
// @Success 200 {array} models.List "The tasks"
|
||||||
// @Failure 500 {object} models.Message "Internal error"
|
// @Failure 500 {object} models.Message "Internal error"
|
||||||
// @Router /tasks [get]
|
// @Router /tasks/all [get]
|
||||||
func (lt *ListTask) ReadAll(search string, a web.Auth, page int) (interface{}, error) {
|
func (lt *ListTask) ReadAll(search string, a web.Auth, page int) (interface{}, error) {
|
||||||
u, err := getUserWithError(a)
|
u, err := getUserWithError(a)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue