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

@biso_gmbh/capacitor-plugin-rest-information-from-image

v2.0.5

Published

Gets image based information from a REST api that can be configured. The information returned has to be in json format

Readme

capacitor-plugin-rest-information-from-image

Gets image based information from a REST api that can be configured. The information returned has to be in json format, and it only does POST calls. The image will be sent as part of the body as a base64 string, the key is configurable. Also part of the body is the image type, currently hardcoded as jpeg, whose key can also be configured.

[!IMPORTANT]
Version 2.x.x and upwards are Capacitor 6 versions. For Capacitor 5 use version 1.x.x

Install

npm install capacitor-plugin-rest-information-from-image
npx cap sync

Publish

To publish to npm use

npm publish --access public

If this is the first time you publish anything (or you were logged out) use

npm adduser  

and log in via browser.

API

scan(...)

scan(scanCall: IScanCall) => Promise<object>

| Param | Type | | -------------- | ----------------------------------------------- | | scanCall | IScanCall |

Returns: Promise<object>


Interfaces

IScanCall

The configuration object for the plugin. IRequest is mandatory because it configures needed things like the url, settings can be left empty, which will use the default settings.

| Prop | Type | Description | | -------------- | ----------------------------------------------- | ------------------------------------------------------------------- | | request | IRequest | request configuration | | settings | ISettings | scanner settings, can be left empty which will use default settings |

IRequest

Data used for the http request. Url, headers and body are required, though both header and body can be an empty object. base64Key and imageTypeKey configure how the image and the image type will be named when they are added to the body.

| Prop | Type | Description | | ------------------ | --------------------------------------------------------------- | ------------------------------------------------------------- | | url | string | the url the image will be posted to | | headers | Record<string, string> | the headers to include, can be an empty object | | body | Record<string, any> | the body to include, can be an empty object | | base64Key | string | the key under which the base64 data of the image will be sent | | imageTypeKey | string | the key under which the image filetype will be sent |

ISettings

All settings that can be passed to the plugin.

| Prop | Type | Description | | ------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | beepOnSuccess | boolean | when true the device will beep on image capture | | vibrateOnSuccess | boolean | when true the device will vibrate on image capture | | detectorSize | number | between '0' and '1', determines the percentage of the screen will be covered | | detectorAspectRatio | string | aspect ratio of the detector in format 2:1 | | drawFocusRect | boolean | when true the detection area will be outlined | | focusRectColor | string | color of the detection area outline as hex code (supports alpha) | | focusRectBorderRadius | number | corner radius of the detection area | | focusRectBorderThickness | number | border thickness of the detection area outline | | drawFocusLine | boolean | when true a line will mark the center of the detection area | | focusLineColor | string | color of the focus line as hex code (supports alpha) | | focusLineThickness | number | thickness of the focus line | | drawFocusBackground | boolean | when true the area outside the detector will be filled | | focusBackgroundColor | string | color to fill the background with as hex code (supports alpha) | | loadingCircleColor | string | the color of the loading spinner as hex (supports alpha) | | loadingCircleSize | number | the size of the loading spinner | | imageWidth | number | image width in px, if width and height are not valid, closest valid size will be used | | imageHeight | number | image height in px, if width and height are not valid, closest valid size will be used | | imageCompression | number | image compression, value between '0' and '1', '1' is uncompressed | | saveImage | boolean | when true the image will be saved to the device | | imageName | string | prefix of the image name, will be extended with the current date and time | | androidImageLocation | string | the folder inside the external storage to save the image to on android. needs to be in a folder an app is allowed to work in (eg. Documents/ or Download/). On iOS the folder can't be changed and manually and defaults to 'Documents/<AppName>' |

Type Aliases

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }