mirror of
https://github.com/KevinMidboe/moviedb.git
synced 2025-10-29 09:40:24 +00:00
19 lines
508 B
JavaScript
19 lines
508 B
JavaScript
|
|
var es = require('./lib/endpoints.json')
|
|
|
|
var out = []
|
|
out.push(['', 'API resource', 'Lib function name', 'HTTP method', ''].join('|'))
|
|
out.push('|---|---|---|')
|
|
Object.keys(es.methods).forEach(function(e){
|
|
var m = es.methods[e]
|
|
Object.keys(m).forEach(function(r){
|
|
out.push(['', e + r, m[r].resource, m[r].method.toUpperCase(), ''].join('|'))
|
|
})
|
|
})
|
|
|
|
Object.keys(es.authentication).forEach(function(e){
|
|
out.push(['', e, es.authentication[e], 'POST', ''].join('|'))
|
|
})
|
|
|
|
console.log(out.join('\n'))
|