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 🙏

© 2024 – Pkg Stats / Ryan Hefner

doxie-node

v1.6.0

Published

A Node.js API wrapper for Doxie go Wi-fi, Doxie Q, and Doxie Go SE

Downloads

11

Readme

doxie-node

CI GitHub license npm Coverage Status

Node.js library for Doxie go Wi-fi, Doxie Q, and Doxie Go SE

This is a Node js wrapper library/SDK for the API provided from the Doxie series of Wi-Fi document scanners.

Documentation

See Doxie's offical API documentation

installation

yarn add doxie-node

or

npm install doxie-node --save

Usage / Initialize

This requires knowing your Doxie's IP address on your network. All methods return a promise.

import doxieNode from 'doxie-node';
const doxie = new doxieNode({ doxieURL: 'http://192.168.1.3' });

Available options

doxie-node can take the following options:

  • username optional - defaults:doxie
  • password optional
  • token optional - base64 encoded username and password token (ie. Basic [token]) if username and password provided, this token is created for you.
  • doxieURL required
  • doxiePort optional - default:8080

Methods

hello

Used to check the status of your Doxie. If calling on a Doxie go SE or Doxie Q the return will include the firmware and connectedToExternalPower.

return doxie.hello().then(response);

returns

{
  model: 'DX250',
  name: 'Doxie_042D6A',
  firmwareWiFi: '1.29',
  hasPassword: false,
  MAC: '00:11:E5:04:2D:6A',
  mode: 'AP'
}

scanner_status (Only for Doxie Go Wi-Fi)

This method was deprecated for Doxie go SE, Doxie Q

returns

{
 "firmware": "0.26",
 "connectedToExternalPower": true
}

restart

returns 204 No Content and then restarts the scanner's Wi-Fi system. The scanner's status light blinks blue during the restart.

return doxie.restart().then(response);

list_all_scans

returns an array of all scans currently in the scanner’s memory. After scanning a document, the scan will available via the API several second later

return doxie.list_all_scans().then(response);

returns

[
  {
    name: '/DOXIE/JPEG/IMG_0001.JPG',
    size: 241220,
    modified: '2010-05-01 00:10:06'
  },
  {
    name: '/DOXIE/JPEG/IMG_0002.JPG',
    size: 265085,
    modified: '2010-05-01 00:09:26'
  },
  {
    name: '/DOXIE/JPEG/IMG_0003.JPG',
    size: 273522,
    modified: '2010-05-01 00:09:44'
  }
];

most_recent_scan

returns the path to the last scan if available. Monitoring this value for changes provides a simple way to detect new scans without having to fetch the entire list of scans.

return doxie.most_recent_scan().then(response);

returns

{
 "path":"/DOXIE/JPEG/IMG_0003.JPG"
}

get_scan

returns the scan at the specified path or 404 Not Found This method also will retry (default: 3) when a 404 is not found assuming the image is not ready.

params

  • scanPath required - String (ie. '/DOXIE/JPEG/IMG_0001.JPG')
  • retries optional - default: 3 - Number of retires to attempt when image is not ready
return doxie.get_scan('/DOXIE/JPEG/IMG_0001.JPG').then(response);

get_thumbnail

Thumbnails are constrained to fit within 240x240 pixels. Thumbnails for new scans are not generated until after the scan has been made available in get_scan() and most_recent_scan(). This function will return 404 Not Found if the thumbnail has not yet been generated. This method also will retry (default: 3) when a 404 is not found assuming the image is not ready.

params

  • scanPath required - String (ie. '/DOXIE/JPEG/IMG_0001.JPG')
  • retries optional - default: 3 - Number of retires to attempt when image is not ready
return doxie.get_thumbnail('/DOXIE/JPEG/IMG_0001.JPG').then(response);

returns on success the stream of the thumbnail

200

returns on failure

404 Not Found

delete_scan

deletes the scan at the specified path

return doxie.delete_scan('/DOXIE/JPEG/IMG_0001.JPG').then(response);

returns on success

204 No Content

when deleteing multiple scans use delete_mutiple_scans for the best performance.

delete_multiple_scans

deletes multiple scans in a single operation. This is much faster than deleting each scan individually. Multiple scans are referenced using a JSON array of paths

const scans = [
  '/DOXIE/JPEG/IMG_0001.JPG',
  '/DOXIE/JPEG/IMG_0002.JPG',
  '/DOXIE/JPEG/IMG_0003.JPG'
];
return doxie.delete_multiple_scans(scans).then(response);

returns on success

204 No Content

Development

  • yarn install
  • yarn test to run tests

deployment

  • npm version [minor, patch, major]
  • git push origin master --tag Auto publishes on tag commit to master. or
  • git push --follow-tags

This library is released under the MIT License