# vuforia-js

> Promise-based nodejs client for the Vuforia Web Services API

Latest version **0.1.4** (published 2022-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install vuforia-js
pnpm add vuforia-js
yarn add vuforia-js
bun add vuforia-js
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2022-09-16 |
| First published | 2022-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^12.22.0 \|\| ^14.17.0 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 50.7 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | loweoj |

## Links

- npm: https://www.npmjs.com/package/vuforia-js
- Repository: https://github.com/loweoj/vuforia-js
- Homepage: https://github.com/loweoj/vuforia-js#readme
- Issues: https://github.com/loweoj/vuforia-js/issues
- npm.io page: https://npm.io/package/vuforia-js

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.25.0

## Recent versions

- 0.1.4 (latest) — 2022-09-16
- 0.1.3 — 2022-09-16
- 0.1.2 — 2022-02-04
- 0.1.1 — 2022-02-04
- 0.1.0 — 2022-02-04

## README

# vuforia-js

Promise based client for the Vuforia Web Services API

## Features

- Implements all the target-based features of the Vuforia Web Service API
- 100% test coverage
- Fully typed

## Example

Add a target

```ts
import { Vuforia } from 'vuforia-js'

const vf = new Vuforia({
  serverAccessKey: 'your-access-key',
  serverSecretKey: 'your-secret-key';
})

vf.addTarget({
  name: 'targetName',
  width: 100,
  active_flag: false,
  image: 'base64-image-data',
  application_metadata: 'base64-string',
})
  .then(function (response) {
    // handle success
    console.log(response);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
```

## Methods Available:

```ts
vf.addTarget({});

vf.deleteTarget('target-id');

vf.updateTarget('target-id', {});

vf.retrieveTarget('target-id');

vf.findDuplicates('target-id');

vf.targetSummary('target-id');

vf.databaseSummary();
```

## Helpers:

A few helpers functions are provided to convert data to base64:

```ts
// encode a local image file to base64 for use with addTarget and updateTarget
Vuforia.utils.encodeFileBase64('/path-to-local-file/relative-to/process.cwd');

// encode text as base64 for use with application_metadata - e.g. stringified json:
Vuforia.utils.encodeTextBase64(JSON.stringify({ json: 'metadata' }));
```

---
_Source: https://npm.io/package/vuforia-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
