Skip to main content

JavaScript/TypeScript SDK

The JavaScript SDK provides LAMP API access for web and Node.js applications.

Installation​

npm install lamp-core

Usage​

import LAMP from 'lamp-core';

// Connect
LAMP.connect({
accessKey: 'email@address.com',
secretKey: 'password',
serverAddress: 'api.lamp.digital'
});

// Query participants
const participants = await LAMP.Participant.all_by_study(studyId);

// Query sensor events
const events = await LAMP.SensorEvent.all_by_participant(participantId, 'lamp.gps');

The JavaScript SDK mirrors the Python SDK's API methods. All methods return Promises and can be used with async/await.

Use Cases​

  • Web-based data dashboards
  • Node.js automation scripts
  • Custom web applications integrating LAMP data
  • Browser-based data visualization tools