1
0

Priorites for tasks (#31)

This commit is contained in:
konrad
2018-12-02 00:49:30 +00:00
committed by Gitea
parent f2f881f505
commit cc6b35e314
11 changed files with 323 additions and 84 deletions

View File

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2018-12-01 03:02:40.853807498 +0100 CET m=+0.099265725
// 2018-12-02 01:35:21.999635022 +0100 CET m=+0.131973644
package docs
@ -91,7 +91,7 @@ var doc = `{
"ApiKeyAuth": []
}
],
"description": "Returns a team by its ID.",
"description": "Returns a list by its ID.",
"consumes": [
"application/json"
],
@ -99,13 +99,13 @@ var doc = `{
"application/json"
],
"tags": [
"team"
"list"
],
"summary": "Gets one team",
"summary": "Gets one list",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
@ -113,14 +113,14 @@ var doc = `{
],
"responses": {
"200": {
"description": "The team",
"description": "The list",
"schema": {
"type": "object",
"$ref": "#/definitions/models.Team"
"$ref": "#/definitions/models.List"
}
},
"403": {
"description": "The user does not have access to the team",
"description": "The user does not have access to the list",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
@ -2155,6 +2155,65 @@ 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": {
"get": {
"security": [
@ -2880,6 +2939,9 @@ var doc = `{
"parentTaskID": {
"type": "integer"
},
"priority": {
"type": "integer"
},
"reminderDates": {
"type": "array",
"items": {

View File

@ -78,7 +78,7 @@
"ApiKeyAuth": []
}
],
"description": "Returns a team by its ID.",
"description": "Returns a list by its ID.",
"consumes": [
"application/json"
],
@ -86,13 +86,13 @@
"application/json"
],
"tags": [
"team"
"list"
],
"summary": "Gets one team",
"summary": "Gets one list",
"parameters": [
{
"type": "integer",
"description": "Team ID",
"description": "List ID",
"name": "id",
"in": "path",
"required": true
@ -100,14 +100,14 @@
],
"responses": {
"200": {
"description": "The team",
"description": "The list",
"schema": {
"type": "object",
"$ref": "#/definitions/models.Team"
"$ref": "#/definitions/models.List"
}
},
"403": {
"description": "The user does not have access to the team",
"description": "The user does not have access to the list",
"schema": {
"type": "object",
"$ref": "#/definitions/code.vikunja.io/web.HTTPError"
@ -2142,6 +2142,65 @@
}
}
},
"/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": {
"get": {
"security": [
@ -2867,6 +2926,9 @@
"parentTaskID": {
"type": "integer"
},
"priority": {
"type": "integer"
},
"reminderDates": {
"type": "array",
"items": {

View File

@ -55,6 +55,8 @@ definitions:
type: integer
parentTaskID:
type: integer
priority:
type: integer
reminderDates:
items:
type: integer
@ -390,9 +392,9 @@ paths:
get:
consumes:
- application/json
description: Returns a team by its ID.
description: Returns a list by its ID.
parameters:
- description: Team ID
- description: List ID
in: path
name: id
required: true
@ -401,12 +403,12 @@ paths:
- application/json
responses:
"200":
description: The team
description: The list
schema:
$ref: '#/definitions/models.Team'
$ref: '#/definitions/models.List'
type: object
"403":
description: The user does not have access to the team
description: The user does not have access to the list
schema:
$ref: '#/definitions/code.vikunja.io/web.HTTPError'
type: object
@ -417,9 +419,9 @@ paths:
type: object
security:
- ApiKeyAuth: []
summary: Gets one team
summary: Gets one list
tags:
- team
- list
post:
consumes:
- application/json
@ -1726,6 +1728,46 @@ paths:
summary: Update a task
tags:
- task
/tasks/{sortby}:
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
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
tags:
- task
/tasks/caldav:
get:
description: Returns a calDAV-parsable format with all tasks as calendar events.