osc-client

2.0.3 • Public • Published

osc-client

Build Status

Wrapper for making requests to Open Spherical Camera API

Install with NPM

npm install osc-client --save

Connect and take a picture.

var OscClientClass = require('osc-client').OscClient;

var domain = '127.0.0.1';
var port = '8000';
var client = new OscClientClass(domain, port);
var sessionId;

client.startSession().then(function(res){
  sessionId = res.body.results.sessionId;
  return client.takePicture(sessionId);
})
.then(function (res) {
  var pictureUri = res.body.results.fileUri;
  return client.getImage(pictureUri);
})
.then(function(res){
  var imgData = res.body; //<Buffer ff d8 ff ...>
  return client.closeSession(sessionId);
});

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.31
2.0.20
2.0.10
2.0.00
1.1.00
1.0.00
0.0.10

Package Sidebar

Install

npm i osc-client

Weekly Downloads

1

Version

2.0.3

License

MIT

Last publish

Collaborators

  • aerialx
  • bublcam
  • turbobeast