0.1.1 • Published 10 years ago
i4countries v0.1.1
i4countries
Interface to a slim country dataset
An experiment serving these purposes:
- provide a CLI
- provide an "API" (HTTP server)
- enacting proper HTTP usage
- creating/using some vendor media-types (targeting a future media-type registration)
Install
npm install i4countries
Usage
CLI
i4countries name,lang:RO
NodeJS
i4countries = require 'i4countries'
i4countries.search {keys: ['name', 'lang'], which: 'RO'}, (err, res) ->
throw err if err?
if res.headers['Content-Type'] is 'application/vnd.hyperrest.countries-v1+json'
console.log res.body.items
consoel.log res.body.links
HTTP API
"TODO"