libtracker-sdk
v0.8.8
Published
[](https://gitlab.com/orka-tools/libtracker/libtracker-api-sdk/-/pipelines) . Breaking changes may occur. Feedback is welcome!
Introduction
The LibTracker SDK is designed to simplify communication with the LibTracker API. It provides reusable components to handle common operations like managing projects, teams, and releases, while ensuring secure and efficient HTTP calls with automatic token refresh.
Features
- 🚀 Project, Team, and Release Management: Effortless API integration for core LibTracker entities.
- 🔐 Secure HTTP Calls: Automatic token refresh on authentication failure.
- 🎯 TypeScript Support: Strong typing ensures type safety and better developer experience.
- ⚙️ Customizable: Configure base URL and token management as per your environment.
Installation
To install the LibTracker SDK, use npm:
npm install [email protected]Getting Started
1. Import and Initialize the SDK
import { SDK } from 'libtracker-sdk';
const sdk = new SDK({
baseUrl: 'https://api.libtracker.io', // API Base URL
accessToken: 'your-access-token', // Initial Access Token
});2. Example Usage
Fetch All Projects:
const projects = await sdk.projectAPI.getProjects();
console.log(projects);Create a New Project:
const newProject = await sdk.projectAPI.createProject({
name: 'My New Project',
slug: 'my-new-project',
});
console.log(newProject);Development
To contribute or develop the SDK locally, clone the repository and install dependencies:
git clone https://gitlab.com/orka-tools/libtracker/libtracker-api-sdk.git
cd libtracker-api-sdk
npm installRun tests to ensure everything is working:
npm run testLicense
This project is licensed under the MIT License. See the LICENSE file for details.
