Thw following library is wrapper around the Garmin IPCBound API. Garmin has two specific API's - The IPC Inbound API, and the IPC Outbound API. This API focuses on giving the tools to access these exact api's with ease. Currently this wrapper focuses on Inbound requests. Outbound service requires more than the scope of this library offers.
import { InboundGarminWrapper } from '@mulgul/garmin-wrapper-ts';
const credentials = {
username: process.env.USERNAME,
password: process.env.PASSWORD
};
const ipcUrl = process.env.IPCURL;
const imei = process.env.IMEI;
const api = new InboundGarminWrapper(ipcUrl, credentials, imei);
let data;
try {
data = await api.getTrackingVersion();
} catch (e) {
console.error(e)
}
All api calls take in an option param of type RequestInit
. These contain basic header options etc.
await api.getTrackingVersion({
body: 'foo',
headers: {
...
}
});
The source code in this repository is distributed under the Apache-2.0 license. See the file.
This source code comes with absolutely no warranty. Use at your own risk.