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

biocv-api-js

v1.2.3

Published

A programming Interface to integrate the services of the BioCV System.

Downloads

7

Readme

LiSA NodeJS API

LiSA NodeJS API

Overview

LiSA Access Module provides a streamlined way to interact with the BioCV System for specific data retrieval and management tasks. It's designed for ease of use and quick integration with existing projects. The complete API is built on a single animal approach.

Features

  • Initialization: Set up LiSA access with custom tokens.
  • Data Retrieval: Fetch eartags associated with a given user.
  • Real-time Updates: Subscribe to real-time updates of eartags.

Installation

To install the LiSA Firestore Access Module, follow these steps:

  1. Ensure you have Node.js installed on your system.
  2. Clone the repository or download the module.
  3. Navigate to the module directory and run npm install to install dependencies.

Usage of the main API

Import the module and use the provided functions to interact with Firestore:

const lisa = require("biocv-api-js");

// Initialize with a custom token
await lisa.init("your_custom_token");

// Retrieve all eartags for the logged-in user
const eartags: Eartag[] = await lisa.getEartags();
console.log("Retrieved eartags:", eartags);

// Get details of a specific eartag by ID
const eartagDetails: Eartag | null = await lisa.getEartag("eartag_id");
console.log("Eartag details:", eartagDetails);

// Subscribe to real-time updates of eartags
lisa.subEartags((updatedEartags: Eartag[]) => {
	console.log("Real-time update received. Updated eartags:", updatedEartags);
});

API Reference

Classes

This section prvides you with a structered overview of all used classes, used in the API.

Eartag

The Eartag class represents an eartag with various properties related to its status and metrics.

| Variable | Type | Description | | --------------------- | ------- | -------------------------------------------------- | | ID | string | The unique identifier for the eartag. | | MAC | string | The MAC address of the eartag. | | Active | boolean | Indicates whether the eartag is active. | | CurrentActivity | string | The current activity status. | | CurrentTemperature | number | The current temperature reading from the eartag. | | DailyActivity | string | The daily activity level. | | Group | string | The group or category to which the eartag belongs. | | HeatProbability | number | Probability or likelihood of heat. | | BirthProbability | number | Probability or likelihood of birth. | | LamenessProbability | number | Probability or likelihood of lameness. | | HealthScore | number | A numeric value representing the health status. | | Battery | number | The battery level of the eartag. |

Functions

Import the module and use the provided functions to interact with Firestore:

init(token: string): Promise<void>

Initialize LiSA access. This function needs to be called before any calls to the database.

  • Parameters:
    • token (string): The custom token for authentication.
  • Returns: Promise<void> - A promise that resolves when the initialization is successful.

getEartags(): Promise<Eartag[]>

Get all eartags of a given user.

  • Returns: Promise<Eartag[]> - A promise that resolves to an array of Eartag objects.

getEartag(id: string): Promise<Eartag | null>

Get one specific eartag by ID.

  • Parameters:
    • id (string): The ID of the eartag.
  • Returns: Promise<Eartag | null> - A promise that resolves to the Eartag object or null if not found.

subEartags(callback: (eartags: Eartag[]) => void): void

Subscribe to real-time updates of eartags collection for the current user.

  • Parameters:
    • callback (function): Function to call with the updated eartags array.

Dev Notes

The following section is only for contributng developers.

Test

To test the library, please follow these steps:

  1. Build the Library: Ensure that the library is built and ready for use.

    npm run build
    npm link
    cd test
    npm link biocv-api-js
    npm run test-script