
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
openflighthub-api-client-sdk
Advanced tools
This is a typescript sdk made to talk to the [OpenFlightHub Api](https://hub.openflighthub.org/api). **It must be run in the browser!**
This is a typescript sdk made to talk to the OpenFlightHub Api. It must be run in the browser!
npm i --save openflighthub-api-client-sdk
import {OpenFlightHubApi} from 'openflighthub-api-client-sdk'
const api = new OpenFlightHubApi({
restApiBaseUrl: 'https://hub.openflighthub.org/api',
liveWebsocketBaseUrl: 'wss://hub.openflighthub.org/api/live'
})
// Version
console.log('API Version', api.rest.API_VERSION)
console.log('Client SDK Version', api.VERSION)
// Login
api.rest.auth.login.post({
username: 'test@openflighthub.org',
password: '1234'
}).then(response => {
const myUserId = response.id
})
// Get information for a drone
const FAKE_DRONE_ID = 1
api.rest.drone.get({
droneId: FAKE_DRONE_ID
}).then(drone => {
console.log(drone.serial_number)
})
// Get last position of drone
api.rest.drone.lastPosition.get({
droneId: FAKE_DRONE_ID
}).then(lastPosition => {
console.log(lastPosition.latitude, lastPosition.latitude)
})
// Get live positions of drone via websocket
api.live.subscribeToDrone(FAKE_DRONE_ID, (event, filter, data)=>{
console.log('new position of drone', data.id, data.position.latitude, data.position.longitude)
})
// Live connection status
api.live.status.addListener('connected', () => {
console.log('api is connected')
})
api.live.status.addListener('disconnected', reason => {
console.log('api is disconnected')
})
see CHANGELOG.md
see dev/README.md
FAQs
This is a typescript sdk made to talk to the [OpenFlightHub Api](https://hub.openflighthub.org/api). **It must be run in the browser!**
The npm package openflighthub-api-client-sdk receives a total of 16 weekly downloads. As such, openflighthub-api-client-sdk popularity was classified as not popular.
We found that openflighthub-api-client-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.