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

lamp-core

v2024.11.16

Published

The JavaScript and TypeScript API client for the LAMP Platform.

Downloads

239

Readme

JavaScript & TypeScript API client for the LAMP Platform

Overview

This API client is used to connect to the LAMP Platform from the JavaScript and TypeScript programming languages. Visit our documentation for more information about the LAMP Platform.

Installation

Prerequisites

Install the package directly from the GitHub repository.

npm i lamp-core

Configuration

Ensure your serverAddress is set correctly. If using the default server, it will be api.lamp.digital. Keep your accessKey (sometimes an email address) and secretKey (sometimes a password) private and do not share them with others.

import LAMP from 'lamp-core'
await LAMP.connect({ serverAddress: '...', accessKey: '...', secretKey: '...' })

API Endpoints

All URIs are relative to the serverAddress (by default, api.lamp.digital) with the https:// protocol.

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- LAMP.API | query | POST / | Query the LAMP Database. LAMP.API | schema | GET / | View the API schema document. LAMP.Activity | all | GET /activity | Get the set of all activities. LAMP.Activity | allByParticipant | GET /participant/{participant_id}/activity | Get all activities for a participant. LAMP.Activity | allByResearcher | GET /researcher/{researcher_id}/activity | Get all activities for a researcher. LAMP.Activity | allByStudy | GET /study/{study_id}/activity | Get all activities in a study. LAMP.Activity | create | POST /study/{study_id}/activity | Create a new Activity under the given Study. LAMP.Activity | delete | DELETE /activity/{activity_id} | Delete an Activity. LAMP.Activity | update | PUT /activity/{activity_id} | Update an Activity's settings. LAMP.Activity | view | GET /activity/{activity_id} | Get a single activity, by identifier. LAMP.ActivityEvent | allByParticipant | GET /participant/{participant_id}/activity_event | Get all activity events for a participant. LAMP.ActivityEvent | allByResearcher | GET /researcher/{researcher_id}/activity_event | Get all activity events for a researcher by participant. LAMP.ActivityEvent | allByStudy | GET /study/{study_id}/activity_event | Get all activity events for a study by participant. LAMP.ActivityEvent | create | POST /participant/{participant_id}/activity_event | Create a new ActivityEvent for the given Participant. LAMP.ActivityEvent | delete | DELETE /participant/{participant_id}/activity_event | Delete a ActivityEvent. LAMP.ActivitySpec | all | GET /activity_spec | Get all ActivitySpecs registered. LAMP.ActivitySpec | create | POST /activity_spec | Create a new ActivitySpec. LAMP.ActivitySpec | delete | DELETE /activity_spec/{activity_spec_name} | Delete an ActivitySpec. LAMP.ActivitySpec | update | PUT /activity_spec/{activity_spec_name} | Update an ActivitySpec. LAMP.ActivitySpec | view | GET /activity_spec/{activity_spec_name} | View an ActivitySpec. LAMP.Credential | create | POST /type/{type_id}/credential | LAMP.Credential | delete | DELETE /type/{type_id}/credential/{access_key} | LAMP.Credential | list | GET /type/{type_id}/credential | LAMP.Credential | update | PUT /type/{type_id}/credential/{access_key} | LAMP.Participant | all | GET /participant | Get the set of all participants. LAMP.Participant | allByResearcher | GET /researcher/{researcher_id}/participant | Get the set of all participants under a single researcher. LAMP.Participant | allByStudy | GET /study/{study_id}/participant | Get the set of all participants in a single study. LAMP.Participant | create | POST /study/{study_id}/participant | Create a new Participant for the given Study. LAMP.Participant | delete | DELETE /participant/{participant_id} | Delete a participant AND all owned data or event streams. LAMP.Participant | update | PUT /participant/{participant_id} | Update a Participant's settings. LAMP.Participant | view | GET /participant/{participant_id} | Get a single participant, by identifier. LAMP.Researcher | all | GET /researcher | Get the set of all researchers. LAMP.Researcher | create | POST /researcher | Create a new Researcher. LAMP.Researcher | delete | DELETE /researcher/{researcher_id} | Delete a researcher. LAMP.Researcher | update | PUT /researcher/{researcher_id} | Update a Researcher's settings. LAMP.Researcher | view | GET /researcher/{researcher_id} | Get a single researcher, by identifier. LAMP.Sensor | all | GET /sensor | Get the set of all sensors. LAMP.Sensor | allByParticipant | GET /participant/{participant_id}/sensor | Get all sensors for a participant. LAMP.Sensor | allByResearcher | GET /researcher/{researcher_id}/sensor | Get all sensors for a researcher. LAMP.Sensor | allByStudy | GET /study/{study_id}/sensor | View all sensors in a study. LAMP.Sensor | create | POST /study/{study_id}/sensor | Create a new Sensor under the given Study. LAMP.Sensor | delete | DELETE /sensor/{sensor_id} | Delete a Sensor. LAMP.Sensor | update | PUT /sensor/{sensor_id} | Update an Sensor's settings. LAMP.Sensor | view | GET /sensor/{sensor_id} | Get a single sensor, by identifier. LAMP.SensorEvent | allByParticipant | GET /participant/{participant_id}/sensor_event | Get all sensor events for a participant. LAMP.SensorEvent | allByResearcher | GET /researcher/{researcher_id}/sensor_event | Get all sensor events for a researcher by participant. LAMP.SensorEvent | allByStudy | GET /study/{study_id}/sensor_event | Get all sensor events for a study by participant. LAMP.SensorEvent | create | POST /participant/{participant_id}/sensor_event | Create a new SensorEvent for the given Participant. LAMP.SensorEvent | delete | DELETE /participant/{participant_id}/sensor_event | Delete a sensor event. LAMP.SensorSpec | all | GET /sensor_spec | Get all SensorSpecs registered. LAMP.SensorSpec | create | POST /sensor_spec | Create a new SensorSpec. LAMP.SensorSpec | delete | DELETE /sensor_spec/{sensor_spec_name} | Delete an SensorSpec. LAMP.SensorSpec | update | PUT /sensor_spec/{sensor_spec_name} | Update an SensorSpec. LAMP.SensorSpec | view | GET /sensor_spec/{sensor_spec_name} | Get a SensorSpec. LAMP.Study | all | GET /study | Get the set of all studies. LAMP.Study | allByResearcher | GET /researcher/{researcher_id}/study | Get the set of studies for a single researcher. LAMP.Study | create | POST /researcher/{researcher_id}/study | Create a new Study for the given Researcher. LAMP.Study | delete | DELETE /study/{study_id} | Delete a study. LAMP.Study | update | PUT /study/{study_id} | Update the study. LAMP.Study | view | GET /study/{study_id} | Get a single study, by identifier. LAMP.Type | getAttachment | GET /type/{type_id}/attachment/{attachment_key} | LAMP.Type | getDynamicAttachment | GET /type/{type_id}/attachment/dynamic/{attachment_key} | LAMP.Type | listAttachments | GET /type/{type_id}/attachment | LAMP.Type | parent | GET /type/{type_id}/parent | Find the owner(s) of the resource. LAMP.Type | setAttachment | PUT /type/{type_id}/attachment/{attachment_key}/{target} | LAMP.Type | setDynamicAttachment | PUT /type/{type_id}/attachment/dynamic/{attachment_key}/{target} |

Documentation for Models