npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

blink-data

v0.0.6

Published

Interact with blink camera servers in javascript

Readme

blink-data

Interact with blink camera servers in javascript

This will allow you to interact with blink cameras. You can use it in node, electron, or a browser (with CORS security disabled.)

install

npm i blink-data

usage

basics

import { Blink } from 'blink-data'

async function run () {
  const blink = new Blink()
  await blink.login('[email protected]', 'mypassword')

  // get current user-info
  const user = await blink.user()
  console.log(user)

  // get list of current user's networks
  const networks = await blink.networks()
  console.log(networks)

  // get details about a network
  const network = await blink.network(networks[0].id)
  console.log(network)

  // get a list of videos
  const videos = await blink.videos()
  console.log(videos)

  // get details about a camera
  const camera = await blink.camera(networks[0].network_id, networks[0].cameras[0].id)
  console.log(camera)
}

run()

I haven't setup API-docs yet, but you can see usage examples iun the unit-test.

browser

You will need to disable CORS security for this to work directly from blink servers, in a browser:

Close all instances of Chrome browser (open taskmanager and kill any resilient Chrome process). Execute

Windows

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --disable-web-security --user-data-dir=<path to viewer>. 

MacOS

open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --disable-web-security --user-data-dir=<path to viewer>

You can also do this in your own electron app:

const win = new BrowserWindow({
  webPreferences: { webSecurity: false }
})

Alternatively, if you want to do it all in IPC-space, you can:

const Blink = require('electron').remote.require('blink-data')

And CORS-security should be disabled for just blink.

rehydrate

If you are using this on a webserver, or just want to login via a token (instead of email/password), you can rehydrate them to work with their session:

const blink = new Blink()
blink.hydrate (token, account, region)
blink.user().then(console.log)

You can get token, account, and region from the output of blink.login(), so store this, and send it via a cookie/session/header.

Here is a client-side example using localStorage:

// at login time
const blink = new Blink()
const { authtoken, account, region } = await blink.login(email, password)
localStorage.user = JSON.stringify({ token: authtoken.authtoken, id: account.id, region: Object.keys(region)[0] })

// later
const blink = new Blink()
const { token, id, region } = JSON.parse(localStorage.user)
blink.hydrate(token, id, region)
blink.user().then(console.log)

TODO

  • Still need to support programs
  • There are a lot of other API endpoints to wrap
  • need to use commandPolling to check for things finishing and resolve/reject when finished
  • need to work out video proxy for rtsps://. this should help.
  • Better cross-platform (browser vs node) binary support for images & videos

related

  • Here is my desktop-client, using electron.

credit

Big shout-out to MattTW's BlinkMonitorProtocol. This is totally generated from that. bling-viewer is also great, and helped work out some parts.