0.1.1 • Published 10 years ago
i4ratsit-se v0.1.1
i4ratsit-se
Interface for Ratsit AB's www.ratsit.se
DISCLAIMER This is an unofficial 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 i4ratsit-se
Usage
CLI
i4ratsit-se anonymous --where Stockholm
NodeJS
i4ratsitSe = require 'i4ratsit-se'
i4ratsitSe.search {who: 'anonymous', where: 'Stockholm'}, (err, res) ->
throw err if err?
if res.headers['Content-Type'] is 'application/vnd.hyperrest.persons-v1+json'
console.log res.body.items
consoel.log res.body.links
HTTP API
"TODO"
Ratsit, WAT?
- application/json + ISO-8859-1 = ♥. NOT! Ref: https://tools.ietf.org/html/rfc4627
- nested JSON stringification
- PNG filename
- HTML tags