7837-Update API Docs (#7839)

* Updated API Docs for api-v3

* Updated API Docs for top-level

* Updates relating to @crookedneighbor comments

* Updated type and field of 'to' param.
This commit is contained in:
Ryan Castner
2016-07-27 19:48:03 -04:00
committed by Blade Barringer
parent 795ea8ba80
commit 7c579bf850
17 changed files with 190 additions and 190 deletions

View File

@@ -359,8 +359,8 @@ api.pusherAuth = {
* @apiName UpdateUsername * @apiName UpdateUsername
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} password Body parameter - The current user password * @apiParam {String} password Body parameter - The current user password
* @apiParam {string} username Body parameter - The new username * @apiParam {String} username Body parameter - The new username
* @apiSuccess {String} data.username The new username * @apiSuccess {String} data.username The new username
**/ **/
@@ -407,9 +407,9 @@ api.updateUsername = {
* @apiName UpdatePassword * @apiName UpdatePassword
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} password Body parameter - The old password * @apiParam {String} password Body parameter - The old password
* @apiParam {string} newPassword Body parameter - The new password * @apiParam {String} newPassword Body parameter - The new password
* @apiParam {string} confirmPassword Body parameter - New password confirmation * @apiParam {String} confirmPassword Body parameter - New password confirmation
* *
* @apiSuccess {Object} data An empty object * @apiSuccess {Object} data An empty object
**/ **/
@@ -458,9 +458,9 @@ api.updatePassword = {
* @apiName ResetPassword * @apiName ResetPassword
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} email Body parameter - The email address of the user * @apiParam {String} email Body parameter - The email address of the user
* *
* @apiSuccess {string} message The localized success message * @apiSuccess {String} message The localized success message
**/ **/
api.resetPassword = { api.resetPassword = {
method: 'POST', method: 'POST',
@@ -513,10 +513,10 @@ api.resetPassword = {
* @apiName UpdateEmail * @apiName UpdateEmail
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} Body parameter - newEmail The new email address. * @apiParam {String} Body parameter - newEmail The new email address.
* @apiParam {string} Body parameter - password The user password. * @apiParam {String} Body parameter - password The user password.
* *
* @apiSuccess {string} data.email The updated email address * @apiSuccess {String} data.email The updated email address
*/ */
api.updateEmail = { api.updateEmail = {
method: 'PUT', method: 'PUT',

View File

@@ -26,7 +26,7 @@ let api = {};
* @apiName CreateChallenge * @apiName CreateChallenge
* @apiGroup Challenge * @apiGroup Challenge
* *
* @apiSuccess {object} data The newly created challenge * @apiSuccess {Object} data The newly created challenge
*/ */
api.createChallenge = { api.createChallenge = {
method: 'POST', method: 'POST',
@@ -117,7 +117,7 @@ api.createChallenge = {
* @apiGroup Challenge * @apiGroup Challenge
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* *
* @apiSuccess {object} data The challenge the user joined * @apiSuccess {Object} data The challenge the user joined
*/ */
api.joinChallenge = { api.joinChallenge = {
method: 'POST', method: 'POST',
@@ -164,7 +164,7 @@ api.joinChallenge = {
* @apiGroup Challenge * @apiGroup Challenge
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.leaveChallenge = { api.leaveChallenge = {
method: 'POST', method: 'POST',
@@ -246,7 +246,7 @@ api.getUserChallenges = {
* @apiName GetGroupChallenges * @apiName GetGroupChallenges
* @apiGroup Challenge * @apiGroup Challenge
* *
* @apiParam {groupId} groupId The group _id * @apiParam {UUID} groupId The group _id
* *
* @apiSuccess {Array} data An array of challenges sorted with official challenges first, followed by the challenges in order from newest to oldest * @apiSuccess {Array} data An array of challenges sorted with official challenges first, followed by the challenges in order from newest to oldest
*/ */
@@ -291,7 +291,7 @@ api.getGroupChallenges = {
* *
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* *
* @apiSuccess {object} data The challenge object * @apiSuccess {Object} data The challenge object
*/ */
api.getChallenge = { api.getChallenge = {
method: 'GET', method: 'GET',
@@ -334,7 +334,7 @@ api.getChallenge = {
* *
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* *
* @apiSuccess {string} challenge A csv file * @apiSuccess {String} challenge A csv file
*/ */
api.exportChallengeCsv = { api.exportChallengeCsv = {
method: 'GET', method: 'GET',
@@ -407,7 +407,7 @@ api.exportChallengeCsv = {
* *
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* *
* @apiSuccess {object} data The updated challenge * @apiSuccess {Object} data The updated challenge
*/ */
api.updateChallenge = { api.updateChallenge = {
method: 'PUT', method: 'PUT',
@@ -453,7 +453,7 @@ api.updateChallenge = {
* *
* @apiParam {UUID} challengeId The _id for the challenge to delete * @apiParam {UUID} challengeId The _id for the challenge to delete
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.deleteChallenge = { api.deleteChallenge = {
method: 'DELETE', method: 'DELETE',
@@ -486,7 +486,7 @@ api.deleteChallenge = {
* @apiParam {UUID} challengeId The _id for the challenge to close with a winner * @apiParam {UUID} challengeId The _id for the challenge to close with a winner
* @apiParam {UUID} winnerId The _id of the winning user * @apiParam {UUID} winnerId The _id of the winning user
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.selectChallengeWinner = { api.selectChallengeWinner = {
method: 'POST', method: 'POST',

View File

@@ -24,7 +24,7 @@ let api = {};
* @apiName GetChat * @apiName GetChat
* @apiGroup Chat * @apiGroup Chat
* *
* @apiParam {string} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {String} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* *
* @apiSuccess {Array} data An array of chat messages * @apiSuccess {Array} data An array of chat messages
*/ */
@@ -54,7 +54,7 @@ api.getChat = {
* @apiGroup Chat * @apiGroup Chat
* *
* @apiParam {UUID} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {UUID} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* @apiParam {string} message Body parameter - message The message to post * @apiParam {String} message Body parameter - message The message to post
* @apiParam {UUID} previousMsg Query parameter - The previous chat message which will force a return of the full group chat * @apiParam {UUID} previousMsg Query parameter - The previous chat message which will force a return of the full group chat
* *
* @apiSuccess data An array of chat messages if a new message was posted after previousMsg, otherwise the posted message * @apiSuccess data An array of chat messages if a new message was posted after previousMsg, otherwise the posted message
@@ -166,7 +166,7 @@ api.likeChat = {
* @apiParam {UUID} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {UUID} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* @apiParam {UUID} chatId The chat message id * @apiParam {UUID} chatId The chat message id
* *
* @apiSuccess {object} data The flagged chat message * @apiSuccess {Object} data The flagged chat message
*/ */
api.flagChat = { api.flagChat = {
method: 'POST', method: 'POST',
@@ -362,7 +362,7 @@ api.seenChat = {
* @apiName DeleteChat * @apiName DeleteChat
* @apiGroup Chat * @apiGroup Chat
* *
* @apiParam {string} previousMsg Query parameter - The last message fetched by the client so that the whole chat will be returned only if new messages have been posted in the meantime * @apiParam {String} previousMsg Query parameter - The last message fetched by the client so that the whole chat will be returned only if new messages have been posted in the meantime
* @apiParam {UUID} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {UUID} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* @apiParam {UUID} chatId The chat message id * @apiParam {UUID} chatId The chat message id
* *

View File

@@ -67,7 +67,7 @@ async function saveContentToDisk (language, content) {
* @apiName ContentGet * @apiName ContentGet
* @apiGroup Content * @apiGroup Content
* *
* @apiParam {string} language Query parameter, the language code used for the items' strings. Defaulting to english * @apiParam {String} language Query parameter, the language code used for the items' strings. Defaulting to english
* *
* @apiSuccess {Object} data All the content available on Habitica * @apiSuccess {Object} data All the content available on Habitica
*/ */

View File

@@ -17,7 +17,7 @@ let api = {};
* @apiName GetCoupons * @apiName GetCoupons
* @apiGroup Coupon * @apiGroup Coupon
* *
* @apiSuccess {string} Coupons in CSV format * @apiSuccess {String} Coupons in CSV format
*/ */
api.getCoupons = { api.getCoupons = {
method: 'GET', method: 'GET',
@@ -46,10 +46,10 @@ api.getCoupons = {
* @apiName GenerateCoupons * @apiName GenerateCoupons
* @apiGroup Coupon * @apiGroup Coupon
* *
* @apiParam {string} event The event for which the coupon should be generated * @apiParam {String} event The event for which the coupon should be generated
* @apiParam {number} count Query parameter to specify the number of coupon codes to generate * @apiParam {Number} count Query parameter to specify the number of coupon codes to generate
* *
* @apiSuccess {array} data Generated coupons * @apiSuccess {Array} data Generated coupons
*/ */
api.generateCoupons = { api.generateCoupons = {
method: 'POST', method: 'POST',
@@ -73,9 +73,9 @@ api.generateCoupons = {
* @apiName EnterCouponCode * @apiName EnterCouponCode
* @apiGroup Coupon * @apiGroup Coupon
* *
* @apiParam {string} code The coupon code to apply * @apiParam {String} code The coupon code to apply
* *
* @apiSuccess {object} data User object * @apiSuccess {Object} data User object
*/ */
api.enterCouponCode = { api.enterCouponCode = {
method: 'POST', method: 'POST',
@@ -100,7 +100,7 @@ api.enterCouponCode = {
* @apiName ValidateCoupon * @apiName ValidateCoupon
* @apiGroup Coupon * @apiGroup Coupon
* *
* @apiSuccess {boolean} data.valid True or false * @apiSuccess {Boolean} data.valid True or false
*/ */
api.validateCoupon = { api.validateCoupon = {
method: 'POST', method: 'POST',

View File

@@ -76,7 +76,7 @@ api.createGroup = {
* @apiName GetGroups * @apiName GetGroups
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} type The type of groups to retrieve. Must be a query string representing a list of values like 'tavern,party'. Possible values are party, guilds, privateGuilds, publicGuilds, tavern * @apiParam {String} type The type of groups to retrieve. Must be a query string representing a list of values like 'tavern,party'. Possible values are party, guilds, privateGuilds, publicGuilds, tavern
* *
* @apiSuccess {Array} data An array of the requested groups * @apiSuccess {Array} data An array of the requested groups
*/ */
@@ -107,7 +107,7 @@ api.getGroups = {
* @apiName GetGroup * @apiName GetGroup
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {String} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* *
* @apiSuccess {Object} data The group object * @apiSuccess {Object} data The group object
*/ */
@@ -142,7 +142,7 @@ api.getGroup = {
* @apiName UpdateGroup * @apiName UpdateGroup
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {String} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* *
* @apiSuccess {Object} data The updated group * @apiSuccess {Object} data The updated group
*/ */
@@ -328,8 +328,8 @@ api.rejectGroupInvite = {
* @apiName LeaveGroup * @apiName LeaveGroup
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {String} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* @apiParam {string="remove-all","keep-all"} keep Query parameter - Whether to keep or not challenges' tasks. Defaults to keep-all * @apiParam {String="remove-all","keep-all"} keep Query parameter - Whether to keep or not challenges' tasks. Defaults to keep-all
* *
* @apiSuccess {Object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
@@ -384,9 +384,9 @@ function _sendMessageToRemoved (group, removedUser, message) {
* @apiName RemoveGroupMember * @apiName RemoveGroupMember
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {String} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* @apiParam {UUID} memberId The _id of the member to remove * @apiParam {UUID} memberId The _id of the member to remove
* @apiParam {string} message Query parameter - The message to send to the removed members * @apiParam {String} message Query parameter - The message to send to the removed members
* *
* @apiSuccess {Object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
@@ -606,13 +606,13 @@ async function _inviteByEmail (invite, group, inviter, req, res) {
* @apiName InviteToGroup * @apiName InviteToGroup
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted) * @apiParam {String} groupId The group _id ('party' for the user party and 'habitrpg' for tavern are accepted)
* *
* @apiParam {array} emails Body parameter - An array of emails addresses to invite (optional) * @apiParam {Array} emails Body parameter - An array of emails addresses to invite (optional)
* @apiParam {array} uuids Body parameter - An array of uuids to invite (optional) * @apiParam {Array} uuids Body parameter - An array of uuids to invite (optional)
* @apiParam {string} inviter Body parameter - The inviters' name (optional) * @apiParam {String} inviter Body parameter - The inviters' name (optional)
* *
* @apiSuccess {array} data The invites * @apiSuccess {Array} data The invites
*/ */
api.inviteToGroup = { api.inviteToGroup = {
method: 'POST', method: 'POST',

View File

@@ -28,7 +28,7 @@ let api = {};
* *
* @apiParam {UUID} memberId The member's id * @apiParam {UUID} memberId The member's id
* *
* @apiSuccess {object} data The member object * @apiSuccess {Object} data The member object
*/ */
api.getMember = { api.getMember = {
method: 'GET', method: 'GET',
@@ -194,7 +194,7 @@ api.getInvitesForGroup = {
* *
* @apiParam {UUID} challengeId The challenge id * @apiParam {UUID} challengeId The challenge id
* @apiParam {UUID} lastId Query parameter to specify the last member returned in a previous request to this route and get the next batch of results * @apiParam {UUID} lastId Query parameter to specify the last member returned in a previous request to this route and get the next batch of results
* @apiParam {string} includeAllMembers BETA Query parameter - If 'true' all challenge members are returned * @apiParam {String} includeAllMembers BETA Query parameter - If 'true' all challenge members are returned
* @apiSuccess {array} data An array of members, sorted by _id * @apiSuccess {array} data An array of members, sorted by _id
*/ */
@@ -214,7 +214,7 @@ api.getMembersForChallenge = {
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* @apiParam {UUID} member The member _id * @apiParam {UUID} member The member _id
* *
* @apiSuccess {object} data Return an object with member _id, profile.name and a tasks object with the challenge tasks for the member * @apiSuccess {Object} data Return an object with member _id, profile.name and a tasks object with the challenge tasks for the member
*/ */
api.getChallengeMemberProgress = { api.getChallengeMemberProgress = {
method: 'GET', method: 'GET',

View File

@@ -12,9 +12,9 @@ let allModels = ['user', 'tag', 'challenge', 'group'].concat(tasksModels);
* @apiName GetUserModelPaths * @apiName GetUserModelPaths
* @apiGroup Meta * @apiGroup Meta
* *
* @apiParam {string="user","group","challenge","tag","habit","daily","todo","reward"} model The name of the model * @apiParam {String="user","group","challenge","tag","habit","daily","todo","reward"} model The name of the model
* *
* @apiSuccess {object} data A key-value object made of fieldPath: fieldType (like {'field.nested': Boolean}) * @apiSuccess {Object} data A key-value object made of fieldPath: fieldType (like {'field.nested': Boolean})
*/ */
api.getModelPaths = { api.getModelPaths = {
method: 'GET', method: 'GET',

View File

@@ -13,11 +13,11 @@ let api = {};
* @apiName UserAddPushDevice * @apiName UserAddPushDevice
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} regId The id of the push device * @apiParam {String} regId The id of the push device
* @apiParam {string} type The type of push device * @apiParam {String} type The type of push device
* *
* @apiSuccess {Object} data List of push devices * @apiSuccess {Object} data List of push devices
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.addPushDevice = { api.addPushDevice = {
method: 'POST', method: 'POST',
@@ -58,10 +58,10 @@ api.addPushDevice = {
* @apiName UserRemovePushDevice * @apiName UserRemovePushDevice
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} regId The id of the push device * @apiParam {String} regId The id of the push device
* *
* @apiSuccess {Object} data List of push devices * @apiSuccess {Object} data List of push devices
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.removePushDevice = { api.removePushDevice = {
method: 'DELETE', method: 'DELETE',

View File

@@ -34,8 +34,8 @@ let api = {};
* @apiName InviteToQuest * @apiName InviteToQuest
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* @apiParam {string} questKey * @apiParam {String} questKey
* *
* @apiSuccess {Object} data Quest object * @apiSuccess {Object} data Quest object
*/ */
@@ -145,7 +145,7 @@ api.inviteToQuest = {
* @apiName AcceptQuest * @apiName AcceptQuest
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* *
* @apiSuccess {Object} data Quest Object * @apiSuccess {Object} data Quest Object
*/ */
@@ -202,7 +202,7 @@ api.acceptQuest = {
* @apiName RejectQuest * @apiName RejectQuest
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* *
* @apiSuccess {Object} data Quest Object * @apiSuccess {Object} data Quest Object
*/ */
@@ -261,7 +261,7 @@ api.rejectQuest = {
* @apiName ForceQuestStart * @apiName ForceQuestStart
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* *
* @apiSuccess {Object} data Quest Object * @apiSuccess {Object} data Quest Object
*/ */
@@ -313,7 +313,7 @@ api.forceStart = {
* @apiName CancelQuest * @apiName CancelQuest
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* *
* @apiSuccess {Object} data Quest Object * @apiSuccess {Object} data Quest Object
*/ */
@@ -362,7 +362,7 @@ api.cancelQuest = {
* @apiName AbortQuest * @apiName AbortQuest
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* *
* @apiSuccess {Object} data Quest Object * @apiSuccess {Object} data Quest Object
*/ */
@@ -415,7 +415,7 @@ api.abortQuest = {
* @apiName LeaveQuest * @apiName LeaveQuest
* @apiGroup Group * @apiGroup Group
* *
* @apiParam {string} groupId The group _id (or 'party') * @apiParam {String} groupId The group _id (or 'party')
* *
* @apiSuccess {Object} data Quest Object * @apiSuccess {Object} data Quest Object
*/ */

View File

@@ -6,7 +6,7 @@ let api = {};
* @apiName GetStatus * @apiName GetStatus
* @apiGroup Status * @apiGroup Status
* *
* @apiSuccess {status} data.status 'up' if everything is ok * @apiSuccess {String} data.status 'up' if everything is ok
*/ */
api.getStatus = { api.getStatus = {
method: 'GET', method: 'GET',

View File

@@ -59,7 +59,7 @@ api.getTags = {
* *
* @apiParam {UUID} tagId The tag _id * @apiParam {UUID} tagId The tag _id
* *
* @apiSuccess {object} data The tag object * @apiSuccess {Object} data The tag object
*/ */
api.getTag = { api.getTag = {
method: 'GET', method: 'GET',
@@ -87,7 +87,7 @@ api.getTag = {
* *
* @apiParam {UUID} tagId The tag _id * @apiParam {UUID} tagId The tag _id
* *
* @apiSuccess {object} data The updated tag * @apiSuccess {Object} data The updated tag
*/ */
api.updateTag = { api.updateTag = {
method: 'PUT', method: 'PUT',
@@ -119,10 +119,10 @@ api.updateTag = {
* @apiName ReorderTags * @apiName ReorderTags
* @apiGroup Tag * @apiGroup Tag
* *
* @apiParam {tagId} UUID Id of the tag to move * @apiParam {UUID} tagId Id of the tag to move
* @apiParam {to} number Position the tag is moving to * @apiParam {Number} to Position the tag is moving to
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.reorderTags = { api.reorderTags = {
method: 'POST', method: 'POST',
@@ -156,7 +156,7 @@ api.reorderTags = {
* *
* @apiParam {UUID} tagId The tag _id * @apiParam {UUID} tagId The tag _id
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.deleteTag = { api.deleteTag = {
method: 'DELETE', method: 'DELETE',

View File

@@ -259,9 +259,9 @@ api.getChallengeTasks = {
* @apiName GetTask * @apiName GetTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* *
* @apiSuccess {object} data The task object * @apiSuccess {Object} data The task object
*/ */
api.getTask = { api.getTask = {
method: 'GET', method: 'GET',
@@ -293,9 +293,9 @@ api.getTask = {
* @apiName UpdateTask * @apiName UpdateTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.updateTask = { api.updateTask = {
method: 'PUT', method: 'PUT',
@@ -379,12 +379,12 @@ function _generateWebhookTaskData (task, direction, delta, stats, user) {
* @apiName ScoreTask * @apiName ScoreTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {string="up","down"} direction The direction for scoring the task * @apiParam {String="up","down"} direction The direction for scoring the task
* *
* @apiSuccess {object} data._tmp If an item was dropped it'll be returned in te _tmp object * @apiSuccess {Object} data._tmp If an item was dropped it'll be returned in te _tmp object
* @apiSuccess {number} data.delta * @apiSuccess {Number} data.delta The delta
* @apiSuccess {object} data The user stats * @apiSuccess {Object} data The user stats
*/ */
api.scoreTask = { api.scoreTask = {
method: 'POST', method: 'POST',
@@ -462,10 +462,10 @@ api.scoreTask = {
* @apiName MoveTask * @apiName MoveTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {Number} position Query parameter - Where to move the task (-1 means push to bottom). First position is 0 * @apiParam {Number} position Query parameter - Where to move the task (-1 means push to bottom). First position is 0
* *
* @apiSuccess {array} data The new tasks order (user.tasksOrder.{task.type}s) * @apiSuccess {Array} data The new tasks order (user.tasksOrder.{task.type}s)
*/ */
api.moveTask = { api.moveTask = {
method: 'POST', method: 'POST',
@@ -515,9 +515,9 @@ api.moveTask = {
* @apiName AddChecklistItem * @apiName AddChecklistItem
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.addChecklistItem = { api.addChecklistItem = {
method: 'POST', method: 'POST',
@@ -563,10 +563,10 @@ api.addChecklistItem = {
* @apiName ScoreChecklistItem * @apiName ScoreChecklistItem
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {UUID} itemId The checklist item _id * @apiParam {UUID} itemId The checklist item _id
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.scoreCheckListItem = { api.scoreCheckListItem = {
method: 'POST', method: 'POST',
@@ -603,10 +603,10 @@ api.scoreCheckListItem = {
* @apiName UpdateChecklistItem * @apiName UpdateChecklistItem
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {UUID} itemId The checklist item _id * @apiParam {UUID} itemId The checklist item _id
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.updateChecklistItem = { api.updateChecklistItem = {
method: 'PUT', method: 'PUT',
@@ -655,10 +655,10 @@ api.updateChecklistItem = {
* @apiName RemoveChecklistItem * @apiName RemoveChecklistItem
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {UUID} itemId The checklist item _id * @apiParam {UUID} itemId The checklist item _id
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.removeChecklistItem = { api.removeChecklistItem = {
method: 'DELETE', method: 'DELETE',
@@ -705,10 +705,10 @@ api.removeChecklistItem = {
* @apiName AddTagToTask * @apiName AddTagToTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {UUID} tagId The tag id * @apiParam {UUID} tagId The tag id
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.addTagToTask = { api.addTagToTask = {
method: 'POST', method: 'POST',
@@ -746,10 +746,10 @@ api.addTagToTask = {
* @apiName RemoveTagFromTask * @apiName RemoveTagFromTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {UUID} tagId The tag id * @apiParam {UUID} tagId The tag id
* *
* @apiSuccess {object} data The updated task * @apiSuccess {Object} data The updated task
*/ */
api.removeTagFromTask = { api.removeTagFromTask = {
method: 'DELETE', method: 'DELETE',
@@ -784,9 +784,9 @@ api.removeTagFromTask = {
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {UUID} challengeId The challenge _id * @apiParam {UUID} challengeId The challenge _id
* @apiParam {string} keep Query parameter - keep-all or remove-all * @apiParam {String} keep Query parameter - keep-all or remove-all
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.unlinkAllTasks = { api.unlinkAllTasks = {
method: 'POST', method: 'POST',
@@ -845,10 +845,10 @@ api.unlinkAllTasks = {
* @apiName UnlinkOneTask * @apiName UnlinkOneTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* @apiParam {string} keep Query parameter - keep or remove * @apiParam {String} keep Query parameter - keep or remove
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.unlinkOneTask = { api.unlinkOneTask = {
method: 'POST', method: 'POST',
@@ -893,7 +893,7 @@ api.unlinkOneTask = {
* @apiName ClearCompletedTodos * @apiName ClearCompletedTodos
* @apiGroup Task * @apiGroup Task
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.clearCompletedTodos = { api.clearCompletedTodos = {
method: 'POST', method: 'POST',
@@ -924,9 +924,9 @@ api.clearCompletedTodos = {
* @apiName DeleteTask * @apiName DeleteTask
* @apiGroup Task * @apiGroup Task
* *
* @apiParam {string} taskId The task _id or alias * @apiParam {String} taskId The task _id or alias
* *
* @apiSuccess {object} data An empty object * @apiSuccess {Object} data An empty object
*/ */
api.deleteTask = { api.deleteTask = {
method: 'DELETE', method: 'DELETE',

View File

@@ -149,7 +149,7 @@ let checkPreferencePurchase = (user, path, item) => {
* @apiName UserUpdate * @apiName UserUpdate
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {object} data The updated user object * @apiSuccess {Object} data The updated user object
*/ */
api.updateUser = { api.updateUser = {
method: 'PUT', method: 'PUT',
@@ -183,7 +183,7 @@ api.updateUser = {
* @apiName UserDelete * @apiName UserDelete
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} password The user's password (unless it's a Facebook account) * @apiParam {String} password The user's password (unless it's a Facebook account)
* *
* @apiSuccess {Object} data An empty Object * @apiSuccess {Object} data An empty Object
*/ */
@@ -309,7 +309,7 @@ const partyMembersFields = 'profile.name stats achievements items.special';
* @apiName UserCast * @apiName UserCast
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} spellId The skill to cast * @apiParam {String} spellId The skill to cast
* @apiParam {UUID} targetId Optional query parameter, the id of the target when casting a skill on a party member or a task * @apiParam {UUID} targetId Optional query parameter, the id of the target when casting a skill on a party member or a task
* *
* @apiSuccess data Will return the modified targets. For party members only the necessary fields will be populated. The user is always returned. * @apiSuccess data Will return the modified targets. For party members only the necessary fields will be populated. The user is always returned.
@@ -485,7 +485,7 @@ api.sleep = {
* @apiName UserAllocate * @apiName UserAllocate
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} stat Query parameter - Defaults to 'str', mast be one of be of str, con, int or per * @apiParam {String} stat Query parameter - Defaults to 'str', mast be one of be of str, con, int or per
* *
* @apiSuccess {Object} data user.stats * @apiSuccess {Object} data user.stats
*/ */
@@ -529,7 +529,7 @@ api.allocateNow = {
* @apiName UserBuy * @apiName UserBuy
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} key The item to buy * @apiParam {String} key The item to buy
*/ */
api.buy = { api.buy = {
method: 'POST', method: 'POST',
@@ -549,13 +549,13 @@ api.buy = {
* @apiName UserBuyGear * @apiName UserBuyGear
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} key The item to buy * @apiParam {String} key The item to buy
* *
* @apiSuccess {object} data.items user.items * @apiSuccess {Object} data.items user.items
* @apiSuccess {object} data.flags user.flags * @apiSuccess {Object} data.flags user.flags
* @apiSuccess {object} data.achievements user.achievements * @apiSuccess {Object} data.achievements user.achievements
* @apiSuccess {object} data.stats user.stats * @apiSuccess {Object} data.stats user.stats
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.buyGear = { api.buyGear = {
method: 'POST', method: 'POST',
@@ -575,10 +575,10 @@ api.buyGear = {
* @apiName UserBuyArmoire * @apiName UserBuyArmoire
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {object} data.items user.items * @apiSuccess {Object} data.items user.items
* @apiSuccess {object} data.flags user.flags * @apiSuccess {Object} data.flags user.flags
* @apiSuccess {object} data.armoire Extra item given by the armoire * @apiSuccess {Object} data.armoire Extra item given by the armoire
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.buyArmoire = { api.buyArmoire = {
method: 'POST', method: 'POST',
@@ -599,7 +599,7 @@ api.buyArmoire = {
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {Object} data user.stats * @apiSuccess {Object} data user.stats
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.buyHealthPotion = { api.buyHealthPotion = {
method: 'POST', method: 'POST',
@@ -619,11 +619,11 @@ api.buyHealthPotion = {
* @apiName UserBuyMysterySet * @apiName UserBuyMysterySet
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} key The mystery set to buy * @apiParam {String} key The mystery set to buy
* *
* @apiSuccess {Object} data.items user.items * @apiSuccess {Object} data.items user.items
* @apiSuccess {Object} data.purchasedPlanConsecutive user.purchased.plan.consecutive * @apiSuccess {Object} data.purchasedPlanConsecutive user.purchased.plan.consecutive
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.buyMysterySet = { api.buyMysterySet = {
method: 'POST', method: 'POST',
@@ -643,10 +643,10 @@ api.buyMysterySet = {
* @apiName UserBuyQuest * @apiName UserBuyQuest
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} key The quest scroll to buy * @apiParam {String} key The quest scroll to buy
* *
* @apiSuccess {Object} data `user.items.quests` * @apiSuccess {Object} data `user.items.quests`
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.buyQuest = { api.buyQuest = {
method: 'POST', method: 'POST',
@@ -667,11 +667,11 @@ api.buyQuest = {
* @apiName UserBuySpecialSpell * @apiName UserBuySpecialSpell
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} key The special item to buy. Must be one of the keys from "content.special", such as birthday, snowball, salt. * @apiParam {String} key The special item to buy. Must be one of the keys from "content.special", such as birthday, snowball, salt.
* *
* @apiSuccess {Object} data.stats user.stats * @apiSuccess {Object} data.stats user.stats
* @apiSuccess {Object} data.items user.items * @apiSuccess {Object} data.items user.items
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.buySpecialSpell = { api.buySpecialSpell = {
method: 'POST', method: 'POST',
@@ -691,11 +691,11 @@ api.buySpecialSpell = {
* @apiName UserHatch * @apiName UserHatch
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} egg The egg to use * @apiParam {String} egg The egg to use
* @apiParam {string} hatchingPotion The hatching potion to use * @apiParam {String} hatchingPotion The hatching potion to use
* *
* @apiSuccess {Object} data user.items * @apiSuccess {Object} data user.items
* @apiSuccess {string} message * @apiSuccess {String} message
*/ */
api.hatch = { api.hatch = {
method: 'POST', method: 'POST',
@@ -715,11 +715,11 @@ api.hatch = {
* @apiName UserEquip * @apiName UserEquip
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} type The type of item to equip (mount, pet, costume or equipped) * @apiParam {String} type The type of item to equip (mount, pet, costume or equipped)
* @apiParam {string} key The item to equip * @apiParam {String} key The item to equip
* *
* @apiSuccess {Object} data user.items * @apiSuccess {Object} data user.items
* @apiSuccess {string} message Optional success message * @apiSuccess {String} message Optional success message
*/ */
api.equip = { api.equip = {
method: 'POST', method: 'POST',
@@ -739,11 +739,11 @@ api.equip = {
* @apiName UserFeed * @apiName UserFeed
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} pet * @apiParam {String} pet
* @apiParam {string} food * @apiParam {String} food
* *
* @apiSuccess {number} data The pet value * @apiSuccess {Number} data The pet value
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.feed = { api.feed = {
method: 'POST', method: 'POST',
@@ -764,12 +764,12 @@ api.feed = {
* @apiName UserChangeClass * @apiName UserChangeClass
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} class Query parameter - ?class={warrior|rogue|wizard|healer} * @apiParam {String} class Query parameter - ?class={warrior|rogue|wizard|healer}
* *
* @apiSuccess {object} data.flags user.flags * @apiSuccess {Object} data.flags user.flags
* @apiSuccess {object} data.stats user.stats * @apiSuccess {Object} data.stats user.stats
* @apiSuccess {object} data.preferences user.preferences * @apiSuccess {Object} data.preferences user.preferences
* @apiSuccess {object} data.items user.items * @apiSuccess {Object} data.items user.items
*/ */
api.changeClass = { api.changeClass = {
method: 'POST', method: 'POST',
@@ -789,9 +789,9 @@ api.changeClass = {
* @apiName UserDisableClasses * @apiName UserDisableClasses
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {object} data.flags user.flags * @apiSuccess {Object} data.flags user.flags
* @apiSuccess {object} data.stats user.stats * @apiSuccess {Object} data.stats user.stats
* @apiSuccess {object} data.preferences user.preferences * @apiSuccess {Object} data.preferences user.preferences
*/ */
api.disableClasses = { api.disableClasses = {
method: 'POST', method: 'POST',
@@ -811,12 +811,12 @@ api.disableClasses = {
* @apiName UserPurchase * @apiName UserPurchase
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} type Type of item to purchase. Must be one of: gems, eggs, hatchingPotions, food, quests, or gear * @apiParam {String} type Type of item to purchase. Must be one of: gems, eggs, hatchingPotions, food, quests, or gear
* @apiParam {string} key Item's key (use "gem" for purchasing gems) * @apiParam {String} key Item's key (use "gem" for purchasing gems)
* *
* @apiSuccess {object} data.items user.items * @apiSuccess {Object} data.items user.items
* @apiSuccess {number} data.balance user.balance * @apiSuccess {Number} data.balance user.balance
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.purchase = { api.purchase = {
method: 'POST', method: 'POST',
@@ -836,12 +836,12 @@ api.purchase = {
* @apiName UserPurchaseHourglass * @apiName UserPurchaseHourglass
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} type The type of item to purchase (pets or mounts) * @apiParam {String} type The type of item to purchase (pets or mounts)
* @apiParam {string} key Ex: {MantisShrimp-Base}. The key for the mount/pet * @apiParam {String} key Ex: {MantisShrimp-Base}. The key for the mount/pet
* *
* @apiSuccess {object} data.items user.items * @apiSuccess {Object} data.items user.items
* @apiSuccess {object} data.purchasedPlanConsecutive user.purchased.plan.consecutive * @apiSuccess {Object} data.purchasedPlanConsecutive user.purchased.plan.consecutive
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userPurchaseHourglass = { api.userPurchaseHourglass = {
method: 'POST', method: 'POST',
@@ -861,11 +861,11 @@ api.userPurchaseHourglass = {
* @apiName UserReadCard * @apiName UserReadCard
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} cardType Type of card to read * @apiParam {String} cardType Type of card to read
* *
* @apiSuccess {object} data.specialItems user.items.special * @apiSuccess {Object} data.specialItems user.items.special
* @apiSuccess {boolean} data.cardReceived user.flags.cardReceived * @apiSuccess {Boolean} data.cardReceived user.flags.cardReceived
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.readCard = { api.readCard = {
method: 'POST', method: 'POST',
@@ -886,7 +886,7 @@ api.readCard = {
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {Object} data The item obtained * @apiSuccess {Object} data The item obtained
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userOpenMysteryItem = { api.userOpenMysteryItem = {
method: 'POST', method: 'POST',
@@ -906,8 +906,8 @@ api.userOpenMysteryItem = {
* @apiName UserAddWebhook * @apiName UserAddWebhook
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} url Body parameter - The webhook's URL * @apiParam {String} url Body parameter - The webhook's URL
* @apiParam {boolean} enabled Body parameter - If the webhook should be enabled * @apiParam {Boolean} enabled Body parameter - If the webhook should be enabled
* *
* @apiSuccess {Object} data The created webhook * @apiSuccess {Object} data The created webhook
*/ */
@@ -930,8 +930,8 @@ api.addWebhook = {
* @apiGroup User * @apiGroup User
* *
* @apiParam {UUID} id The id of the webhook to update * @apiParam {UUID} id The id of the webhook to update
* @apiParam {string} url Body parameter - The webhook's URL * @apiParam {String} url Body parameter - The webhook's URL
* @apiParam {boolean} enabled Body parameter - If the webhook should be enabled * @apiParam {Boolean} enabled Body parameter - If the webhook should be enabled
* *
* @apiSuccess {Object} data The updated webhook * @apiSuccess {Object} data The updated webhook
*/ */
@@ -976,7 +976,7 @@ api.deleteWebhook = {
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {Object} data.items `user.items.pets` * @apiSuccess {Object} data.items `user.items.pets`
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userReleasePets = { api.userReleasePets = {
method: 'POST', method: 'POST',
@@ -998,8 +998,8 @@ api.userReleasePets = {
* @apiSuccess {Object} data.achievements * @apiSuccess {Object} data.achievements
* @apiSuccess {Object} data.items * @apiSuccess {Object} data.items
* @apiSuccess {number} data.balance * @apiSuccess {Number} data.balance
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userReleaseBoth = { api.userReleaseBoth = {
method: 'POST', method: 'POST',
@@ -1020,7 +1020,7 @@ api.userReleaseBoth = {
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {Object} data user.items.mounts * @apiSuccess {Object} data user.items.mounts
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userReleaseMounts = { api.userReleaseMounts = {
method: 'POST', method: 'POST',
@@ -1040,12 +1040,12 @@ api.userReleaseMounts = {
* @apiName UserSell * @apiName UserSell
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} type The type of item to sell. Must be one of: eggs, hatchingPotions, or food * @apiParam {String} type The type of item to sell. Must be one of: eggs, hatchingPotions, or food
* @apiParam {string} key The key of the item * @apiParam {String} key The key of the item
* *
* @apiSuccess {Object} data.stats * @apiSuccess {Object} data.stats
* @apiSuccess {Object} data.items * @apiSuccess {Object} data.items
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userSell = { api.userSell = {
method: 'POST', method: 'POST',
@@ -1065,12 +1065,12 @@ api.userSell = {
* @apiName UserUnlock * @apiName UserUnlock
* @apiGroup User * @apiGroup User
* *
* @apiParam {string} path Query parameter. The path to unlock * @apiParam {String} path Query parameter. The path to unlock
* *
* @apiSuccess {Object} data.purchased * @apiSuccess {Object} data.purchased
* @apiSuccess {Object} data.items * @apiSuccess {Object} data.items
* @apiSuccess {Object} data.preferences * @apiSuccess {Object} data.preferences
* @apiSuccess {string} message * @apiSuccess {String} message
*/ */
api.userUnlock = { api.userUnlock = {
method: 'POST', method: 'POST',
@@ -1091,7 +1091,7 @@ api.userUnlock = {
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {Object} data user.items * @apiSuccess {Object} data user.items
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userRevive = { api.userRevive = {
method: 'POST', method: 'POST',
@@ -1112,8 +1112,8 @@ api.userRevive = {
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {Object} data.user * @apiSuccess {Object} data.user
* @apiSuccess {array} data.tasks User's modified tasks (no rewards) * @apiSuccess {Array} data.tasks User's modified tasks (no rewards)
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userRebirth = { api.userRebirth = {
method: 'POST', method: 'POST',
@@ -1151,7 +1151,7 @@ api.userRebirth = {
* *
* @apiParam {UUID} uuid The uuid of the user to block / unblock * @apiParam {UUID} uuid The uuid of the user to block / unblock
* *
* @apiSuccess {array} data user.inbox.blocks * @apiSuccess {Array} data user.inbox.blocks
**/ **/
api.blockUser = { api.blockUser = {
method: 'POST', method: 'POST',
@@ -1173,7 +1173,7 @@ api.blockUser = {
* *
* @apiParam {UUID} id The id of the message to delete * @apiParam {UUID} id The id of the message to delete
* *
* @apiSuccess {object} data user.inbox.messages * @apiSuccess {Object} data user.inbox.messages
**/ **/
api.deleteMessage = { api.deleteMessage = {
method: 'DELETE', method: 'DELETE',
@@ -1193,7 +1193,7 @@ api.deleteMessage = {
* @apiName clearMessages * @apiName clearMessages
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {object} data user.inbox.messages * @apiSuccess {Object} data user.inbox.messages
**/ **/
api.clearMessages = { api.clearMessages = {
method: 'DELETE', method: 'DELETE',
@@ -1213,7 +1213,7 @@ api.clearMessages = {
* @apiName markPmsRead * @apiName markPmsRead
* @apiGroup User * @apiGroup User
* *
* @apiSuccess {object} data user.inbox.messages * @apiSuccess {Object} data user.inbox.messages
**/ **/
api.markPmsRead = { api.markPmsRead = {
method: 'POST', method: 'POST',
@@ -1271,7 +1271,7 @@ api.userReroll = {
* *
* @apiSuccess {Object} data.user * @apiSuccess {Object} data.user
* @apiSuccess {Object} data.tasksToRemove IDs of removed tasks * @apiSuccess {Object} data.tasksToRemove IDs of removed tasks
* @apiSuccess {string} message Success message * @apiSuccess {String} message Success message
*/ */
api.userReset = { api.userReset = {
method: 'POST', method: 'POST',

View File

@@ -25,12 +25,12 @@ let api = {};
/** /**
* @api {get} /export/history.csv Export user tasks history in CSV format * @api {get} /export/history.csv Export user tasks history in CSV format
* @apiDescription History is only available for habits and dailys so todos and rewards won't be included. NOTE: Part of the private API that may change at any time. * @apiDescription History is only available for habits and dailies so todos and rewards won't be included. NOTE: Part of the private API that may change at any time.
* @apiVersion 3.0.0 * @apiVersion 3.0.0
* @apiName ExportUserHistory * @apiName ExportUserHistory
* @apiGroup DataExport * @apiGroup DataExport
* *
* @apiSuccess {string} A cvs file * @apiSuccess {String} A csv file
*/ */
api.exportUserHistory = { api.exportUserHistory = {
method: 'GET', method: 'GET',
@@ -98,7 +98,7 @@ async function _getUserDataForExport (user) {
* @apiGroup DataExport * @apiGroup DataExport
* @apiDescription NOTE: Part of the private API that may change at any time. * @apiDescription NOTE: Part of the private API that may change at any time.
* *
* @apiSuccess {string} A json file * @apiSuccess {String} A json file
*/ */
api.exportUserDataJson = { api.exportUserDataJson = {
method: 'GET', method: 'GET',
@@ -124,7 +124,7 @@ api.exportUserDataJson = {
* @apiGroup DataExport * @apiGroup DataExport
* @apiDescription NOTE: Part of the private API that may change at any time. * @apiDescription NOTE: Part of the private API that may change at any time.
* *
* @apiSuccess {string} A xml file * @apiSuccess {String} A xml file
*/ */
api.exportUserDataXml = { api.exportUserDataXml = {
method: 'GET', method: 'GET',
@@ -148,7 +148,7 @@ api.exportUserDataXml = {
* @apiGroup DataExport * @apiGroup DataExport
* @apiDescription NOTE: Part of the private API that may change at any time. * @apiDescription NOTE: Part of the private API that may change at any time.
* *
* @apiSuccess {string} An html page * @apiSuccess {String} An html page
*/ */
api.exportUserAvatarHtml = { api.exportUserAvatarHtml = {
method: 'GET', method: 'GET',
@@ -181,7 +181,7 @@ api.exportUserAvatarHtml = {
* @apiGroup DataExport * @apiGroup DataExport
* @apiDescription NOTE: Part of the private API that may change at any time. * @apiDescription NOTE: Part of the private API that may change at any time.
* *
* @apiSuccess {string} A png file * @apiSuccess {String} A png file
*/ */
api.exportUserAvatarPng = { api.exportUserAvatarPng = {
method: 'GET', method: 'GET',

View File

@@ -46,7 +46,7 @@ api.verifyAccessToken = {
* @apiName AmazonCreateOrderReferenceId * @apiName AmazonCreateOrderReferenceId
* @apiGroup Payments * @apiGroup Payments
* *
* @apiSuccess {string} data.orderReferenceId The order reference id. * @apiSuccess {String} data.orderReferenceId The order reference id.
**/ **/
api.createOrderReferenceId = { api.createOrderReferenceId = {
method: 'POST', method: 'POST',
@@ -76,7 +76,7 @@ api.createOrderReferenceId = {
* @apiName AmazonCheckout * @apiName AmazonCheckout
* @apiGroup Payments * @apiGroup Payments
* *
* @apiSuccess {object} data Empty object * @apiSuccess {Object} data Empty object
**/ **/
api.checkout = { api.checkout = {
method: 'POST', method: 'POST',
@@ -153,7 +153,7 @@ api.checkout = {
* @apiName AmazonSubscribe * @apiName AmazonSubscribe
* @apiGroup Payments * @apiGroup Payments
* *
* @apiSuccess {object} data Empty object * @apiSuccess {Object} data Empty object
**/ **/
api.subscribe = { api.subscribe = {
method: 'POST', method: 'POST',

View File

@@ -25,11 +25,11 @@ let api = {};
* @apiName StripeCheckout * @apiName StripeCheckout
* @apiGroup Payments * @apiGroup Payments
* *
* @apiParam {string} id Body parameter - The token * @apiParam {String} id Body parameter - The token
* @apiParam {string} email Body parameter - the customer email * @apiParam {String} email Body parameter - the customer email
* @apiParam {string} gift Query parameter - stringified json object, gift * @apiParam {String} gift Query parameter - stringified json object, gift
* @apiParam {string} sub Query parameter - subscription, possible values are: basic_earned, basic_3mo, basic_6mo, google_6mo, basic_12mo * @apiParam {String} sub Query parameter - subscription, possible values are: basic_earned, basic_3mo, basic_6mo, google_6mo, basic_12mo
* @apiParam {string} coupon Query parameter - coupon for the matching subscription, required only for certain subscriptions * @apiParam {String} coupon Query parameter - coupon for the matching subscription, required only for certain subscriptions
* *
* @apiSuccess {Object} data Empty object * @apiSuccess {Object} data Empty object
**/ **/
@@ -115,7 +115,7 @@ api.checkout = {
* @apiName StripeSubscribeEdit * @apiName StripeSubscribeEdit
* @apiGroup Payments * @apiGroup Payments
* *
* @apiParam {string} id Body parameter - The token * @apiParam {String} id Body parameter - The token
* *
* @apiSuccess {Object} data Empty object * @apiSuccess {Object} data Empty object
**/ **/