From b600eceb497b1ea49fd75164798f08101ea569c1 Mon Sep 17 00:00:00 2001 From: MathWhiz Date: Tue, 4 Oct 2016 10:24:50 -0400 Subject: [PATCH] /v3/content documentation closes #8098 --- website/server/controllers/api-v3/content.js | 32 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/website/server/controllers/api-v3/content.js b/website/server/controllers/api-v3/content.js index 6a76207ab5..08c2b6050a 100644 --- a/website/server/controllers/api-v3/content.js +++ b/website/server/controllers/api-v3/content.js @@ -66,9 +66,37 @@ async function saveContentToDisk (language, content) { * @apiName ContentGet * @apiGroup Content * - * @apiParam {String} language Query parameter, the language code used for the items' strings. Defaulting to english + * @apiParam {String="bg","cs","da","de","en","en@pirate","en_GB","es","es_419","fr","he","hu","id","it","ja","nl","pl","pt","pt_BR","ro","ru","sk","sr","sv","uk","zh","zh_TW"} [language=en] Query parameter, the language code used for the items' strings. If the authenticated user makes the request, the content will return with the user's configured language. + * + * @apiSuccess {Object} data Various data about the content of Habitica. The content route + * contains many keys, but the data listed below are the recomended data to use. + * @apiSuccess {Object} data.mystery The mystery sets awarded to paying subscribers. + * @apiSuccess {Object} data.gear The gear that can be equipped. + * @apiSuccess {Object} data.gear.tree Detailed information about the gear, organized by type. + * @apiSuccess {Object} data.gear.flat The full key of each equipment. + * @apiSuccess {Object} data.spells The skills organized by class. Includes cards and visual buffs. + * @apiSuccess {Object} data.potion Data about the health potion. + * @apiSuccess {Object} data.armoire Data about the armoire. + * @apiSuccess {Array} data.classes The available classes. + * @apiSuccess {Object} data.eggs All available eggs. + * @apiSuccess {Object} data.timeTravelStable The animals available in the Time Traveler's stable, separated + * into pets and mounts. + * @apiSuccess {Object} data.hatchingPotions All the hatching potions. + * @apiSuccess {Object} data.petInfo All the pets with extra info. + * @apiSuccess {Object} data.mountInfo All the mounts with extra info. + * @apiSuccess {Object} data.food All the food. + * @apiSuccess {Array} data.userCanOwnQuestCategories The types of quests that a user can own. + * @apiSuccess {Object} data.quests Data about the quests. + * @apiSuccess {Object} data.appearances Data about the apperance properties. + * @apiSuccess {Object} data.appearances.hair Data about available hair options. + * @apiSuccess {Object} data.appearances.shirt Data about available shirt options. + * @apiSuccess {Object} data.appearances.size Data about available body size options. + * @apiSuccess {Object} data.appearances.skin Data about available skin options. + * @apiSuccess {Object} data.appearances.chair Data about available chair options. + * @apiSuccess {Object} data.appearances.background Data about available background options. + * @apiSuccess {Object} data.backgrounds Data about the background sets. + * @apiSuccess {Object} data.subscriptionBlocks Data about the various subscirption blocks. * - * @apiSuccess {Object} data All the content available on Habitica */ api.getContent = { method: 'GET',