Theta client for javascript.
- Node.js
- React Native
$ npm install @goroya.io/theta-api-client --save
const {ThetaHttpClient} = require('@goroya.io/theta-api-client');
(async () => {
this.thetaClient = new ThetaHttpClient({
hostname: '192.168.1.1',
axiosConfig: {},
auth: { user: 'THETAYLxxxxxxxx', pass: 'xxxxxxxx' }
});
await this.thetaClient
.cameraTakePicture({
timeout: 3000
})
.catch(e => {
console.error('error:', e);
});
})();
import { ThetaHttpClient } from '@goroya.io/theta-api-client';
this.thetaClient = new ThetaHttpClient({
hostname: '192.168.1.1',
axiosConfig: {},
auth: { user: 'THETAYLxxxxxxxx', pass: 'xxxxxxxx' }
});
(async () => {
const ret = await thetaClient.cameraTakePicture();
})();
Please check following codes.
https://github.com/goroya/theta-api-client.js/tree/master/example/node/take-picture-example
Please check following codes.
https://github.com/goroya/theta-api-client.js/tree/master/example/react-native/theta-example
Please visit following url.
And Scan QR code using Expo App.
https://expo.io/@goroya/theta-example
https://goroya.github.io/theta-api-client.js/classes/thetahttpclient.html