UNPKG

508 BJavaScriptView Raw
1
2var es = require('./lib/endpoints.json')
3
4var out = []
5out.push(['', 'API resource', 'Lib function name', 'HTTP method', ''].join('|'))
6out.push('|---|---|---|')
7Object.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
14Object.keys(es.authentication).forEach(function(e){
15 out.push(['', e, es.authentication[e], 'POST', ''].join('|'))
16})
17
18console.log(out.join('\n'))