1.0.0-alpha.9 • Published 5 months ago

reclaim-unofficial-api v1.0.0-alpha.9

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

📅 Unofficial Reclaim.ai API for Node.js

npm version GitHub license

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

MethodDescriptionStatus
searchSearch for tasks.
createCreate a new task.
getGet an existing task.
updateUpdate an existing task.
deleteDelete an existing task.
markCompleteMark a task as complete.

Habits

MethodDescriptionStatus
searchSearch for habits.
createCreate a new habit.
getGet an existing habit.
updateUpdate an existing habit.
deleteDelete an existing habit.

Users

MethodDescriptionStatus
currentGet the current user.
updateUpdate the current user.

Calendars

MethodDescriptionStatus
primaryGet the primary calendar.

Analytics

MethodDescriptionStatus
getGet 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.

1.0.0-alpha.9

5 months ago

1.0.0-alpha.8

5 months ago

1.0.0-alpha.6

5 months ago

1.0.0-alpha.5

5 months ago

1.0.0-alpha.4

5 months ago

1.0.0-alpha.3

5 months ago

1.0.0-alpha.1

5 months ago

1.0.0-alpha.0

5 months ago