2.0.3 • Published 7 years ago

osc-client v2.0.3

Weekly downloads
86
License
MIT
Repository
github
Last release
7 years ago

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);
});
2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

8 years ago

1.0.0

9 years ago

0.0.1

9 years ago