Merge remote-tracking branch 'upstream/develop' into apidocs-comment-fixes

This commit is contained in:
Alys
2020-02-20 09:47:44 +10:00
218 changed files with 14756 additions and 11762 deletions
+9 -9
View File
@@ -45,7 +45,7 @@ function canNotEditTasks (group, user, assignedUserId) {
/**
* @apiDefine NotAuthorized
* @apiError (401) {NotAuthorized} There is no account that uses those credentials.
* @apiError (401) {NotAuthorized} NoAccount There is no account that uses those credentials.
*/
const api = {};
@@ -174,7 +174,7 @@ const requiredGroupFields = '_id leader tasksOrder name';
* underscores and dashes.
* @apiError (400) {BadRequest} Value-ValidationFailed `x` is not a valid enum value
* for path `(body param)`.
* @apiError (401) {NotAuthorized} There is no account that uses those credentials.
* @apiError (401) {NotAuthorized} NoAccount There is no account that uses those credentials.
*
* @apiErrorExample {json} Error-Response:
* {
@@ -301,7 +301,7 @@ api.createUserTasks = {
* and dashes.
* @apiError (400) {BadRequest} Value-ValidationFailed `x` is not a valid enum value
* for path `(body param)`.
* @apiError (401) {NotAuthorized} There is no account that uses those credentials.
* @apiError (401) {NotAuthorized} NoAccount There is no account that uses those credentials.
*/
api.createChallengeTasks = {
method: 'POST',
@@ -359,7 +359,7 @@ api.createChallengeTasks = {
*
* @apiSuccess {Array} data An array of tasks
*
* @apiSuccessExample
* @apiSuccessExample {json} Example return:
* {"success":true,"data":[{"_id":"8a9d461b-f5eb-4a16-97d3-c03380c422a3",
* "userId":"b0413351-405f-416f-8787-947ec1c85199","text":"15 minute break",
* "type":"reward","notes":"","tags":[],"value":10,"priority":1,"attribute":"str",
@@ -379,7 +379,7 @@ api.createChallengeTasks = {
*
* @apiError (BadRequest) Invalid_request_parameters Error returned if the
* type URL param was not correct.
* @apiError (401) {NotAuthorized} There is no account that uses those credentials.
* @apiError (401) {NotAuthorized} NoAccount There is no account that uses those credentials.
*/
api.getUserTasks = {
method: 'GET',
@@ -418,7 +418,7 @@ api.getUserTasks = {
*
* @apiSuccess {Array} data An array of tasks
*
* @apiSuccessExample
* @apiSuccessExample {json} Example return:
* {"success":true,"data":[{"_id":"5f12bfba-da30-4733-ad01-9c42f9817975",
* "text":"API Trial","type":"habit","notes":"","tags":[],"value":27.70767809690112,
* "priority":1.5,"attribute":"str","challenge":{"id":"f23c12f2-5830-4f15-9c36-e17fd729a812"},
@@ -484,7 +484,7 @@ api.getChallengeTasks = {
*
* @apiSuccess {Object} data The task object
*
* @apiSuccessExample {json} Example returned object
* @apiSuccessExample {json} Example returned object:
* {"success":true,"data":{"_id":"2b774d70-ec8b-41c1-8967-eb6b13d962ba",
* "userId":"b0413351-405f-416f-8787-947ec1c85199","text":"API Trial",
* "alias":"apiTrial","type":"habit","notes":"","tags":[],"value":11.996661122825959,
@@ -911,7 +911,7 @@ api.scoreTask = {
*
* @apiSuccess {Array} data The new tasks order for the specific type that the taskID belongs to.
*
* @apiSuccessExample {json}
* @apiSuccessExample {json} Example return:
* {"success":true,"data":["8d7e237a-b259-46ee-b431-33621256bb0b",
* "2b774d70-ec8b-41c1-8967-eb6b13d962ba","f03d4a2b-9c36-4f33-9b5f-bae0aed23a49"],
* "notifications":[]}
@@ -1362,7 +1362,7 @@ api.removeTagFromTask = {
* should be kept(keep-all) or
* removed(remove-all) after the unlink.
*
* @apiExample {curl}
* @apiExample {curl} Example call:
* curl -X "POST" https://habitica.com/api/v3/tasks/unlink-all/f23c12f2-5830-4f15-9c36-e17fd729a812?keep=remove-all
*
* @apiSuccess {Object} data An empty object