WARFRAME's developers use a public API called Public Export (formerly known as Mobile Export) to feed internal data to their services. The wiki can make use of this API to seed and validate data stored within the Module namespace as well as sourcing in-game image assets to upload to the wiki. This article will mainly serve as a guide for editors and developers to convert the JSON export data to usable Lua tables on the wiki.
- Last updated: Fri, 05 Aug 2022 19:02:55 +0000 (UTC) by User:Cephalon Scientia
Key Replacements[]
Export data will have keys in the form of camelCasing while the wiki's Lua tables will use PascalCasing. Most of the databases on this wiki will have /doc
subpages that document key mappings between Lua tables and export data so a simple find and replace operation should suffice in mapping export data keys to their wiki Lua table equivalent. RegEx could also be used for this step.
Linting and Prettifying[]
Export data will be stripped of unnecessary whitespace to save data, but the Lua tables on this wiki are formatted and linted so that editors have an easier time updating and manipulating these databases without third-party tools. One way to lint this data is to use RegEx substitutions to add newlines and tabs:
"(.+)":([A-z"\/0-9 ]+), -- Finding JSON key-value pairs \n\t$1 = $2, -- Substitute matches with added whitespace and Lua table syntax
Other JSON linting tools include:
- https://www.sunjw.us/jstool/npp/ and https://www.sunjw.us/jstool/vsc/ - JSTool for Notepad++ and Visual Studio Code
- https://www.prettifier.net/json/
Other Lua linting tools include:
Mapping Exports To Modules[]
Export Name | Module Name |
---|---|
ExportCustoms |
Module:Cosmetics/data, Module:Sigils/data |
ExportDrones |
N/A |
ExportFlavour |
Module:Decorations/data |
ExportFusionBundles |
N/A |
ExportGear |
Module:Resources/data |
ExportKeys |
N/A |
ExportRecipes |
Module:Blueprints/data |
ExportRegions |
Module:Missions/data |
ExportRelicArcane |
Module:Void/data & Module:Arcane/data |
ExportResources |
Module:Resources/data |
ExportSentinels |
Module:Companions/data |
ExportSortieRewards |
N/A |
ExportUpgrades |
Module:Mods/data & Module:Focus/data |
ExportWarframes |
Module:Warframes/data |
ExportWeapons |
Module:Weapons/data |
Automation[]