Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ambient-weather-api

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

ambient-weather-api

Ambient Weather API

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by20.69%
Maintainers
1
Weekly downloads
 
Created
Source

Ambient Weather API

A simple wrapper for the forthcoming AmbientWeather.net API

  • API Docs
  • check out the examples

Installation

npm install ambient-weather-api

Getting Started

const api = new AmbientWeatherApi({
  apiKey: 'Put your AW apiKey here',
  applicationKey: 'Put your AW applicationKey here'
})

REST Methods

  • userDevices() - list the user's devices
    • @return - Promise containing array of device objects
  • deviceData(macAddress, options) - fetch data for a specific device
    • macAddress - (required)
    • options - limit, endDate see docs
    • @return - Promise containing array of data objects

Realtime Methods

  • connect - connect to the realtime API
  • disconnect - disconnect from the realtime API
  • subscribe - apiKeys - (required) can be a string of a single apiKey or an array of multiple apiKeys. Will listen for data on all the devices for all of the user's apiKeyss. See Event: subscribed & Event: data
  • unsubscribe - apiKeys - (required) can be a string of a single apiKey or an array of multiple apiKeys. Will stop listening for data on all of the user's apiKeys devices. See Event: subscribed
  • Event: subscribed - emitted when successfully subscribed to one or more apiKeys using the subscribe method. This event is also emitted after sucessfully unsubscribing. It will list all the currently subscribed devices
    • data.devices - array of device objects currently subscribed to
  • Event: data - emitted on new data for a subscribed device
    • data - the weather data point
    • data.device - the device that data point is for

Keywords

FAQs

Package last updated on 23 Feb 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc