Skip to content

jseward311/client-node-pinoccio

 
 

Repository files navigation

Build Status

pinoccio

Pinoccio Node.js, CLI and Browser api!

browser or server

var pinoccio = require('pinoccio'); // works in browserify and server side

// create an api instance with default options
var api = pinoccio(logintoken);// in the browser the token may be read from a pinoccio_id cookie,

api.rest({url:"/v1/troops"},function(error,data){
  if(error) return console.log('oh no. i got an error getting my troops!',error);
  console.log('troop data',data);
})

cli

pinoccio help rest
pinoccio rest get v1/troops

API DOCS

https://docs.pinocc.io/api.html

##INSTALL

as a node library

npm install --save pinoccio

for cli

npm install -g pinoccio

in the browser you can use the hosted version.

<script src="https://api.pinocc.io/pinoccio.js"></script>
<script>
 var api = pinoccioAPI();
 // use the api
</script>

or serve the browserified (compiled) file published with the module from your own web server.

./node_modules/pinoccio/pinoccio-api.js

About

Pinoccio Node.js module

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Shell 0.1%