🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

hologram-node

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hologram-node

Holograms API client library for node.js

latest
Source
npmnpm
Version
1.3.2
Version published
Maintainers
1
Created
Source

hologram-node:

Holograms API client library for node.js

Install:

 npm install hologram-node --save

Getting started:

var Hologram = require('hologram-node');

var HologramAPI = Hologram("Your API key from the dashboard", {
  orgid: "Your orgId from the dashboard"
});

Notes:

  • All endpoints return Promises. use .then((data) => {}).catch((error) => {})
  • All API methods are abstractions of the RAW endpoints you can utilize. Docs at https://hologram.io/docs/reference/cloud/http

Examples:


  var Hologram = require('hologram-node');

  var HologramAPI = Hologram("Your API key from the dashboard", {
    orgid: "Your orgId from the dashboard"
  });
  
  HologramAPI.Devices.getAll().then((devices) => {
    console.log(devices);
  });
  
  HologramAPI.Devices.getOne("123").then((devices) => {
    console.log(device);
  });
  
  HologramAPI.Account.me().then((accountInfo) => {
    console.log(accountInfo);
  });

API:

HologramAPI.Account.me()

Gets current user information.

view docs

HologramAPI.Account.getBalance()

Retreive the current amount of credit you have on your account.

view docs

HologramAPI.Account.getBalanceHistory()

Retreive a history of transactions (credits and charges).

view docs

HologramAPI.Account.getBillingInfo()

Retreive the truncated version of your selected payment method.

HologramAPI.Account.getOrders()

Retreive the orders you have placed.

HologramAPI.Account.addBalance(amountToAdd)

Charge the user's configured billing source and add that amount to your account balance.

Required:

  • amountToAdd [number]

view docs

HologramAPI.Activate.getPlans()

The Data Plans endpoints return pricing and descriptions for the different data plans that Hologram offers. When changing the data plan for a cellular link via API, you must refer to the plan by its ID, which you can determine from these endpoints.

view docs

HologramAPI.Activate.getPlan(planId)

Required:

  • planId [string]

view docs

HologramAPI.Activate.preview(sims, plan, zone, useAccountBalance)

Preview the price and validity of an activation

Required:

  • sims [array]
  • plan [number]
  • zone [string]
  • useAccountBalance [boolean]

view docs

HologramAPI.Activate.activate(sims, plan, zone, useAccountBalance)

Activate the selected sims. Charges your configured billing method.

Required:

  • sims [array]
  • plan [number]
  • zone [string]
  • useAccountBalance [boolean]

view docs

HologramAPI.Device.getOne(deviceid)

Get one of your devices.

Required:

  • deviceid [string]

view docs

HologramAPI.Device.getAll([options])

Options:

  • limit [string]
  • startafter [string]

view docs

HologramAPI.Device.getRouterCreds(deviceid)

Required:

  • deviceid [string]

HologramAPI.Device.genRouterCreds(deviceid)

Required:

  • deviceid [string]

HologramAPI.Device.linkTag(tagid, deviceids)

Required:

  • tagid [string]
  • deviceids [array]

view docs

HologramAPI.Device.unlinkTag(tagid, deviceids)

Required:

  • tagid [string]
  • deviceids [array]

view docs

HologramAPI.Device.changeName(deviceid, name)

Required:

  • deviceid [string]
  • name [string]

HologramAPI.Device.sendSMS(deviceid, message, [options])

Required:

  • deviceid [string]
  • message [string]

Options:

  • fromNumber [string]

view docs

HologramAPI.Device.sendData(deviceids, data, port, protocol)

Send a TCP or UDP message to one or more devices on the Hologram network. See the guide for details.

Required:

  • deviceids [array]
  • data [string]
  • port [string]
  • protocol [string]

view docs

HologramAPI.Device.sendDataViaWebhook(deviceid, webhookguid, data)

This endpoint does not require authentication with your API key, as the webhook GUID serves as an authentication token. In order to generate a webhook URL, please visit the cloud configuration page for your device.

Required:

  • deviceid [string]
  • webhookguid [string]
  • data [string]

view docs

HologramAPI.Device.getPhoneNumberCost(deviceid, country, [options])

Required:

  • deviceid [string]
  • country [string]

Options:

  • areacode [string]

HologramAPI.Device.addPhoneNumber(deviceid, country, [options])

Required:

  • deviceid [string]
  • country [string]

Options:

  • areacode [string]

HologramAPI.Device.removePhoneNumber(deviceid)

Required:

  • deviceid [string]

HologramAPI.Device.setTunnelable(deviceid, tunnelable)

Required:

  • deviceid [boolean]
  • tunnelable [boolean]

HologramAPI.Link.getAll()

view docs

HologramAPI.Link.getOne(linkId)

Required:

  • linkId [string]

view docs

HologramAPI.Link.getUsage(linkid)

Required:

  • linkid [string]

HologramAPI.Link.pause(linkid)

Required:

  • linkid [string]

view docs

HologramAPI.Link.resume(linkid)

Required:

  • linkid [string]

view docs

HologramAPI.Link.setOverageLimit(linkId, limit)

Required:

  • linkId [string]
  • limit [string]

view docs

HologramAPI.Link.getStatusHistory(linkId)

Required:

  • linkId [string]

HologramAPI.Link.changePlanPreview(linkid, planid, zone)

Preview costs and information of changing a links plan .

Required:

  • linkid [string]
  • planid [number]
  • zone [string]

view docs

HologramAPI.Link.changePlan(linkid, planid, zone)

Change the plan of a selected cellular link. Charges your user balance.

Required:

  • linkid [string]
  • planid [number]
  • zone [string]

view docs

HologramAPI.Log.getAll([options])

Options:

  • deviceid [string]

HologramAPI.Log.getForDevice(deviceid)

Required:

  • deviceid [string]

HologramAPI.Org.getAll()

List all organizations that you are a member of. This includes the special "personal" organization tied to your user.

view docs

HologramAPI.Org.getOne(orgid)

Required:

  • orgid [string]

view docs

HologramAPI.Org.getPending()

HologramAPI.Report.billing()

HologramAPI.Report.devices()

HologramAPI.Tag.getAll()

view docs

HologramAPI.Tag.create(name)

Required:

  • name [string]

view docs

HologramAPI.Tag.update(tagId, name)

Required:

  • tagId [string]
  • name [string]

HologramAPI.Tag.remove(tagId)

Required:

  • tagId [string]

view docs

HologramAPI.Webhook.get(deviceid)

Required:

  • deviceid [string]

HologramAPI.Webhook.create(deviceid, port, protocol)

Required:

  • deviceid [string]
  • port [string]
  • protocol [string]

HologramAPI.Webhook.update(deviceid, port, protocol)

Required:

  • deviceid [string]
  • port [string]
  • protocol [string]

HologramAPI.Webhook.regenerate(deviceid)

Required:

  • deviceid [string]

HologramAPI.Webhook.remove(deviceid)

Required:

  • deviceid [string]

Keywords

hologram

FAQs

Package last updated on 23 Feb 2017

Did you know?

Socket

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.

Install

Related posts