Skip to content

A JavaScript Library for interacting with the Find Me Spot Messaging API

License

Notifications You must be signed in to change notification settings

OpenGIS/Spot-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spot API

A JavaScript Library for interacting with the Find Me Spot Messaging API.

Spot API

Usage

Installation

# Install the library
npm install @ogis/spot-api

Fetch Spot Messages

import { fetchSpotMessages } from "@ogis/spot-api";

const feedId = "0onlLopfoM4bG5jXvWRE8H0Obd0oMxMBq";
const startDate = "2012-07-03T00:00:00-0000";
const endDate = "2012-08-02T00:00:00-0000";

fetchSpotMessages(feedId, startDate, endDate)
	.then((messages) => {
		// Do something with the messages
		console.log(messages);
	})
	.catch((error) => {
		console.error(error);
	});

Development

# Install dependencies
npm install

# Build the library
npm run build

# Run the Development app
npm run dev

Environment Variables

By creating a .env file in the root of the project, you can set the following defaults for the Development App:

VITE_SPOT_FEED_ID=[Your Feed ID]
VITE_SPOT_FEED_START=[The Start Date of the Feed: YYYY-MM-DDTHH:MM:SS-0000]
VITE_SPOT_FEED_END=[The End Date of the Feed: YYYY-MM-DDTHH:MM:SS-0000]

Example:

VITE_SPOT_FEED_ID=0onlLopfoM4bG5jXvWRE8H0Obd0oMxMBq
VITE_SPOT_FEED_START=2012-07-03T00:00:00-0000
VITE_SPOT_FEED_END=2012-08-02T00:00:00-0000

About

A JavaScript Library for interacting with the Find Me Spot Messaging API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published