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

@bokub/linky

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bokub/linky

Easily retrieve your Linky power consumption

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Linky

Version Build Status Engines Coverage Code style

Easily retrieve your Linky power consumption

If you are looking for a command-line tool, check out linky-cli

Install

$ npm i @bokub/linky

Usage

const linky = require('@bokub/linky');

// Log in
linky.login('my-email@example.com', 'password').then(session => {

    // Retrieve your power consumption
    session.getDailyData().then(data => {
        console.log(data);
        // [
        //   { date: '2018-09-28 00:00:00', value: 2.944 },
        //   { date: '2018-09-29 00:00:00', value: 2.704 },
        //   { date: '2018-09-30 00:00:00', value: 3.477 },
        //   { date: '2018-10-01 00:00:00', value: null },
        //   { date: '2018-10-02 00:00:00', value: 4.063 },
        //   { date: '2018-10-03 00:00:00', value: 3.209 },
        //   { date: '2018-10-04 00:00:00', value: 4.355 },
        //   ...
        // ]
    });

    // Use a custom time period
    session.getDailyData({ start: '24/08/2018', end: '06/09/2018' }).then(data => {
        console.log(data);
    });
});

API

login(email, password)

Log into you customer area and retrieve a session that you can use to retrieve your power consumption

session.getHourlyData([options])

Retrieve power consumption with a step of 30 minutes

Default time period: Yesterday

session.getDailyData([options])

Retrieve power consumption with a step of 1 day

You cannot retrieve more than 31 days at once

Default time period: Last 31 days

session.getMonthlyData([options])

Retrieve power consumption with a step of 1 month

You cannot retrieve more than 12 months at once

Default time period: Last 12 months

session.getYearlyData([options])

Retrieve all your power consumption with a step of 1 year

You cannot use a custom time period

Keywords

FAQs

Package last updated on 05 Dec 2019

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