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

@adaptive-recognition/carmen-cloud-client

v2.1.1

Published

Node.js client for Carmen Cloud by Adaptive Recognition. Efficiently read license plates, recognize vehicle details, and process container, railway wagon, and US DOT codes.

Downloads

115

Readme

Carmen Cloud Client by Adaptive Recognition

JavaScript/TypeScript client for Carmen Cloud by Adaptive Recognition. This unified library provides you with access to the Vehicle API, Transportation & Cargo API and the Storage & Hook API.

Supported API Versions

  • Vehicle API: v1.4.1
  • Transportation & Cargo API: v1.0.1
  • Storage & Hook API: current latest
  • Descriptor API: current latest

🛠️ How to Install

npm install --save @adaptive-recognition/carmen-cloud-client

🚀 Usage

The four APIs available have separate client classes. For basic usage, see the examples below.

🚗 Vehicle API

import { VehicleAPIClient, Locations } from "@adaptive-recognition/carmen-cloud-client";

const client = new VehicleAPIClient({
    apiKey: "<YOUR_API_KEY>",
    services: { anpr: true, mmr: true },
    inputImageLocation: Locations.Europe.Hungary,
    cloudServiceRegion: "EU"
});

async function recognizeVehicle() {
    const response = await client.send("./car.jpg");
    console.log(response);
}

recognizeVehicle().catch(console.error);

🚚 Transportation & Cargo API

import { TransportAPIClient, CodeType } from "@adaptive-recognition/carmen-cloud-client";

const client = new TransportAPIClient({
    apiKey: "<YOUR_API_KEY>",
    type: CodeType.ISO,
    cloudServiceRegion: "EU"
});

async function recognize() {
    const response = await client.send("./container.jpg");
    console.log(response);
}

recognize().catch(console.error);

📦 Storage & Hook API

import { StorageAndHookAPIClient } from ".";

const client = new StorageAndHookAPIClient({
  apiKey: '<YOUR_API_KEY>',
  cloudServiceRegion: 'EU'
});

// List Events
const events = await client.getEvents('vehicle');
console.log('events:', events);

// Get Storage Status
const status = await client.getStorageStatus();
console.log('status:', status);

// Update Storage Status
const updatedStatus = await client.updateStorageStatus(
  { transport: true }
);
console.log('updatedStatus:', updatedStatus);

// Create Hook
const createdHook = await client.createHook({
  hookUrl: 'https://your-domain.com/your-hook-path',
  apis: ['vehicle', 'transport']
});
console.log('createdHook:', createdHook);

// List Hooks
const hooks = await client.getHooks();
console.log('hooks:', hooks);

// Get Hook
const hook = await client.getHook('https://your-domain.com/your-hook-path');
console.log('hook:', hook);

// Update Hook
const updatedHook = await client.updateHook(
  'https://your-domain.com/your-hook-path',
  { vehicle: true, transport: true }
);
console.log('updatedHook:', updatedHook);

// Delete Hook
await client.deleteHook('https://your-domain.com/your-hook-path');

✍️ Descriptor API

import { DescriptorAPIClient, DescriptorAPIOptions } from ".";

const options: DescriptorAPIOptions = {
  apiKey: "<YOUR_API_KEY>",
  cloudServiceRegion: 'EU'
};
const client = new DescriptorAPIClient(options);

const apis = await client.getApis({ detailed: true });
console.log('apis:', apis);

const dimensions = await client.getDimensions();
console.log('dimensions:', dimensions);

const freeCallCount = await client.getFreeCallCount('carmen');
console.log('freeCallCount:', freeCallCount);

const paidSubscriptionUsage = await client.getPaidSubscriptionUsage('carmen');
console.log('paidSubscriptionUsage:', paidSubscriptionUsage);

const paidSubscriptions = await client.getPaidSubscriptions();
console.log('paidSubscriptions:', paidSubscriptions);

const prices = await client.getPrices('carmen', 'HU');
console.log('prices:', prices);

const products = await client.getProducts();
console.log('products:', products);

const region = await client.getRegion();
console.log('region:', region);

const usagePlanSubscriptions = await client.getUsagePlanSubscriptions();
console.log('usagePlanSubscriptions:', usagePlanSubscriptions);

const usagePlanUsage = await client.getUsagePlanUsage();
console.log('usagePlanUsage:', usagePlanUsage);

const usagePlans = await client.getUsagePlans();
console.log('usagePlans:', usagePlans);

🔧 Development

For more information about developing and contributing to this project, see DEVELOPMENT.md.