Skip to content

DRFR0ST/reclaim-unofficial-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

52 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“… Unofficial Reclaim.ai API for Node.js

npm version GitHub license πŸ§ͺ Tests

Welcome to the unofficial Node.js API for Reclaim.ai! This library is designed to help you interact with the Reclaim.ai API in your Node.js applications. Please note that this library is not officially supported by Reclaim.ai and was reverse engineered for educational purposes.

πŸš€ Getting Started

First, install the library using npm:

npm install reclaim-unofficial-api

Then, you can import the ReclaimClient from the library:

import { ReclaimClient } from 'reclaim-unofficial-api';

You'll need to provide an access token either in the .env file or when creating a new ReclaimClient instance:

const client = new ReclaimClient({ accessToken: 'your-access-token' });

You can get an access token in the Reclaim.ai web app by going here.

πŸ“š API

The ReclaimClient provides access to various modules:

  • client.tasks: Interact with tasks in Reclaim.ai.
  • client.habits: Interact with habits in Reclaim.ai.
  • client.users: Interact with users in Reclaim.ai.
  • client.calendars: Interact with calendars in Reclaim.ai.
  • client.analytics: Interact with analytics in Reclaim.ai.

Each module provides methods for interacting with the respective resources in the Reclaim.ai API.

Tasks

Method Description Status
search Search for tasks. βœ…
create Create a new task. βœ…
get Get an existing task. βœ…
update Update an existing task. βœ…
delete Delete an existing task. βœ…
markComplete Mark a task as complete. βœ…

Habits

Method Description Status
search Search for habits. βœ…
create Create a new habit. βœ…
get Get an existing habit. βœ…
update Update an existing habit. βœ…
delete Delete an existing habit. βœ…

Users

Method Description Status
current Get the current user. βœ…
update Update the current user. βœ…

Calendars

Method Description Status
primary Get the primary calendar. βœ…

Analytics

Method Description Status
get Get analytics. βœ…

More methods will be added in the future. If you need a specific method, please open an issue or submit a pull request!

πŸ“– Examples

Search tasks

const tasks = await client.tasks.search();

Filter tasks

const tasks = await client.tasks.search({ title: 'My Ticket' });

Create task

const task = await client.tasks.create({
  title: "My Ticket",
  eventColor: null,
  eventCategory: "WORK",
  timeChunksRequired: 8,
  minChunkSize: 4,
  maxChunkSize: 8,
  alwaysPrivate: true,
  timeSchemeId: "989b3027-46c4-4729-bdec-1070fc4d8c0f",
  priority: "P2",
  snoozeUntil: "2029-11-17T06:00:00.000Z",
  due: "2029-11-21T16:30:00.000Z",
  onDeck: false,
});

Update task

const task = await client.tasks.update(12345, {
  title: "My Updated Ticket",
});

Delete task

const task = await client.tasks.delete(12345);

Get analytics

const analytics = await client.analytics.get({ start: "2021-01-01", end: "2021-01-31", metricName: [ "DURATION_BY_CATEGORY", "DURATION_BY_DATE_BY_CATEGORY" ] });

Get current user

const user = await client.users.current();

Check out the examples directory for more examples.

⚠️ Disclaimer

This library was reverse engineered from the Reclaim.ai API and may be incomplete or inaccurate. Use at your own risk.

Every 12 hours a Github Action runs to test the library against the Reclaim.ai API. If the tests fail, the library may be out of date. Please open an issue or submit a pull request if you notice any issues. Thanks!

πŸ™ Acknowledgements

Big thanks to the author of the reclaim-sdk Python library for reverse engineering the Reclaim.ai API β€” your work inspired this library! πŸš€

πŸ“ License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.