1 |
|
2 | var es = require('../lib/endpoints.json')
|
3 |
|
4 | var out = []
|
5 | out.push(['', 'API resource', 'Lib function name', 'HTTP method', ''].join('|'))
|
6 | out.push('|---|---|---|')
|
7 | Object.keys(es.methods).forEach(function(e){
|
8 | var m = es.methods[e]
|
9 | Object.keys(m).forEach(function(r){
|
10 | out.push(['', e + r, m[r].resource, m[r].method.toUpperCase(), ''].join('|'))
|
11 | })
|
12 | })
|
13 |
|
14 | Object.keys(es.authentication).forEach(function(e){
|
15 | out.push(['', e, es.authentication[e], 'POST', ''].join('|'))
|
16 | })
|
17 |
|
18 | console.log(out.join('\n'))
|