-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.hbs
153 lines (142 loc) · 4.73 KB
/
index.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!--
/**
* This file is part of wfApi.
*
* wfApi is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* wfApi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with wfApi. If not, see <http://www.gnu.org/licenses/>.
*/
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="Description" content="A Warframe JSON data API. Help, API url list and general information.">
<title>Snekw's Warframe JSON data api.</title>
<style>
table {
width: 700px;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 10px;
}
p {
max-width: 800px;
}
</style>
</head>
</html>
<body>
<h1>Snekw's Warframe JSON api.</h1>
<p>
This is API contains methods to get the Warframe data that is available from <a
href="https://warframe.fandom.com/">Warframe Wiki</a>.<br>
To use the data you can make a GET request to this site with url that is listed in Table 1.
</p>
<label for="apiTable">Table 1. Api urls.</label>
<table id="apiTable">
<tr>
<th>URL</th>
<th>Module</th>
<th>Meta</th>
</tr>
{{#each apiUrls}}
<tr>
<td><a href="{{this.url}}">{{this.url}}</a></td>
<td><a href="https://warframe.fandom.com/wiki/{{this.module}}">{{this.module}}</a></td>
<td><a href="{{this.url}}/meta">{{this.url}}/meta</a></td>
</tr>
{{/each}}
</table>
<h2>Route return data</h2>
<p>
All of the routes return data that is formatted like the JSON below.
</p>
<pre><code>
{
"data": {
"Augments": [{}, {}],
"IgnoreInCount": ["", ""],
"Stances": [{}, {}],
"Weapons": [{}, {}]
},
"meta":{
"hash": "i8SU5J2zdHWysebbdgHMStR8GgbcPgl9zTDi++ehwCo=",
"lastRefresh": 1526392841985,
"nRefresh": 1,
"license": "CC BY-SA"
}
}
</code></pre>
<p>
The "data" object contains all of the data that is contained in the actual Lua module that is retrieved from
Wikia.
</p>
<h2>The */meta route</h2>
<p>
All of the API url's have /meta sub-route. This route can be used to get metadata information of the data that is
currently cached on the server. The returned data is same as the normal route but the "data" object is dropped
to achieve smaller response size.
</p>
<p>Example of the /meta route return data.</p>
<pre><code>
{
"meta":{
"hash": "i8SU5J2zdHWysebbdgHMStR8GgbcPgl9zTDi++ehwCo=",
"lastRefresh": 1526392841985,
"nRefresh": 1,
"license": "CC BY-SA"
}
}
</code></pre>
<p>
This route can be used as a pre-update check to save bandwidth. For example the `/weapons-data` route returns at the time
of writing this 281 KB of data and the `/weapons-data/meta` returns only 297 B of data. Response latency is almost same
for both of the routes as they do almost same things server side.
</p>
<h2>Headers</h2>
<p>
The server tells it version using a X-Api-Version header. The version is a short version of the latest commit hash.
</p>
<h2>Statistics</h2>
<p>
By using this service you allow the service to collect really basic statistics of the use of the service.
Below you can see all of the statistics the server collects.
</p>
<label for="statsTable">Table 2. Collected statistics.</label>
<table id="statsTable">
<tr>
<th>Name</th>
<th>Value</th>
</tr>
{{#each stats}}
<tr>
<td>{{this.name}}</td>
<td>{{this.value}}</td>
</tr>
{{/each}}
</table>
<h2>Source</h1>
<p>Source can be found from GitHub: <a href="https://github.com/Snekw/Wf">https://github.com/Snekw/Wf</a></p>
<h2>Licensing</h1>
<p>
The source code for this API is licensed under <a href="https://www.gnu.org/licenses/gpl-3.0.txt">GPL-3.0</a>.
All of the data under routes that end in -wiki are licensed
under <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA</a>.<br><br>
This project in no way affiliated with either Warframe Wiki or Digital Extremes.
</p>
</body>