1.0.11 • Published 4 years ago

bluedot-nodejs-sdk v1.0.11

Weekly downloads
25
License
ISC
Repository
github
Last release
4 years ago

bluedot-nodejs-sdk

npm version Node.js Package

GetStarted

const Bluedot = require('bluedot-nodejs-sdk');

const bluedot = new Bluedot({ email, password });

const projects = await bluedot.api.getProjects();

const zones = await bluedot.api.getZones({ projectId: PROJECT_ID, limit: 1000 });

V1

For V1 please use the official guide:
https://github.com/Bluedot-Innovation/PublicAPI-Client-Node

API Documentation for Bluedot V2

credentials

createTokenRequest

Triggers a password reset token
https://config-docs.bluedot.io/#operation/createTokenRequest

// POST: /password/token-request
const response = await bluedot.api.createTokenRequest(body);

resetPassword

Uses password reset token to change password
https://config-docs.bluedot.io/#operation/resetPassword

// POST: /password/token
const response = await bluedot.api.resetPassword(body);

createNewPassword

Uses the temporary password to change a newly created user's password
https://config-docs.bluedot.io/#operation/createNewPassword

// POST: /password/new
const response = await bluedot.api.createNewPassword(body);

tags

getTags

Gets a list of all tags being used on zones by projectId
https://config-docs.bluedot.io/#operation/getTags

// GET: /tags
const response = await bluedot.api.getTags({ projectId });

sessions

createSession

Authenticates a user
https://config-docs.bluedot.io/#operation/createSession

// POST: /sessions
const response = await bluedot.api.createSession(body);

deleteSession

Logs a user out
https://config-docs.bluedot.io/#operation/deleteSession

// DELETE: /sessions
const response = await bluedot.api.deleteSession(body);

refreshSession

Refreshes a session
https://config-docs.bluedot.io/#operation/refreshSession

// PUT: /sessions
const response = await bluedot.api.refreshSession(body);

users

addUser

Adds a user
https://config-docs.bluedot.io/#operation/addUser

// POST: /users
const response = await bluedot.api.addUser(body);

searchUsers

Gets all users
https://config-docs.bluedot.io/#operation/searchUsers

// GET: /users
const response = await bluedot.api.searchUsers(query);

replaceUser

Updates a complete user
https://config-docs.bluedot.io/#operation/replaceUser

// PUT: /users/{userId}
const response = await bluedot.api.replaceUser(userId, body);

getUserById

Finds user by userId
https://config-docs.bluedot.io/#operation/getUserById

// GET: /users/{userId}
const response = await bluedot.api.getUserById(userId);

deleteUser

Deletes a user
https://config-docs.bluedot.io/#operation/deleteUser

// DELETE: /users/{userId}
const response = await bluedot.api.deleteUser(userId);

updateUser

Updates a user
https://config-docs.bluedot.io/#operation/updateUser

// PATCH: /users/{userId}
const response = await bluedot.api.updateUser(userId, body);

projects

addProject

Adds a project
https://config-docs.bluedot.io/#operation/addProject

// POST: /projects
const response = await bluedot.api.addProject(body);

getProjects

Gets all projects by accountId
https://config-docs.bluedot.io/#operation/getProjects

// GET: /projects
const response = await bluedot.api.getProjects(query);

replaceProject

Updates a complete project
https://config-docs.bluedot.io/#operation/replaceProject

// PUT: /projects/{projectId}
const response = await bluedot.api.replaceProject(projectId, body);

getProjectById

Finds project by ID
https://config-docs.bluedot.io/#operation/getProjectById

// GET: /projects/{projectId}
const response = await bluedot.api.getProjectById(projectId);

deleteProject

Deletes a project
https://config-docs.bluedot.io/#operation/deleteProject

// DELETE: /projects/{projectId}
const response = await bluedot.api.deleteProject(projectId);

updateProject

Updates an project
https://config-docs.bluedot.io/#operation/updateProject

// PATCH: /projects/{projectId}
const response = await bluedot.api.updateProject(projectId, body);

zones

addZone

Adds a zone to the project
https://config-docs.bluedot.io/#operation/addZone

// POST: /zones
const response = await bluedot.api.addZone(body);

getZones

Gets all zones by project Id
https://config-docs.bluedot.io/#operation/getZones

// GET: /zones
const response = await bluedot.api.getZones({ projectId });

replaceZone

Replaces a zone
https://config-docs.bluedot.io/#operation/replaceZone

// PUT: /zones/{zoneId}
const response = await bluedot.api.replaceZone(zoneId, body);

getZoneById

Finds a zone by zoneId
https://config-docs.bluedot.io/#operation/getZoneById

// GET: /zones/{zoneId}
const response = await bluedot.api.getZoneById(zoneId);

deleteZone

Deletes a zone
https://config-docs.bluedot.io/#operation/deleteZone

// DELETE: /zones/{zoneId}
const response = await bluedot.api.deleteZone(zoneId);

updateZone

Updates a zone
https://config-docs.bluedot.io/#operation/updateZone

// PATCH: /zones/{zoneId}
const response = await bluedot.api.updateZone(zoneId, body);

getZoneClusters

Gets zone clusters by project Id
https://config-docs.bluedot.io/#operation/getZoneClusters

// GET: /zones/clusters
const response = await bluedot.api.getZoneClusters({ projectId, northeast, southwest });

getZonesCount

Gets zones count per project Id
https://config-docs.bluedot.io/#operation/getZonesCount

// GET: /zones/count
const response = await bluedot.api.getZonesCount({ projectId });

beacons

addBeacon

Adds a beacon
https://config-docs.bluedot.io/#operation/addBeacon

// POST: /beacons
const response = await bluedot.api.addBeacon(body);

getBeacons

Gets all beacons by account
https://config-docs.bluedot.io/#operation/getBeacons

// GET: /beacons
const response = await bluedot.api.getBeacons(query);

getBeaconById

Finds a beacon by beaconId
https://config-docs.bluedot.io/#operation/getBeaconById

// GET: /beacons/{beaconId}
const response = await bluedot.api.getBeaconById(beaconId);

deleteBeacon

Deletes a beacon
https://config-docs.bluedot.io/#operation/deleteBeacon

// DELETE: /beacons/{beaconId}
const response = await bluedot.api.deleteBeacon(beaconId);

replaceBeacon

Updates a complete beacon
https://config-docs.bluedot.io/#operation/replaceBeacon

// PUT: /beacons/{beaconId}
const response = await bluedot.api.replaceBeacon(beaconId, body);

updateBeacon

Updates a beacon
https://config-docs.bluedot.io/#operation/updateBeacon

// PATCH: /beacons/{beaconId}
const response = await bluedot.api.updateBeacon(beaconId, body);
        
1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago