npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-habitica-link

v0.3.2

Published

NodeRED plugin to provide nodes for interacting with the Habitica API.

Downloads

10

Readme

Node-RED Habitica Link

npm npm GitHub license

Habitica Link provides nodes for Node-RED to fetch data from and interact with the Habitica API.

Features

  • Fetch data from Habitica for multiple user accounts
  • Fetch profile data

Installation

Habitica Link was written for Node.js 14+ and Node-RED v1.1.3+. It supports the Habitica API version 3+.

Either use the Editor - Menu - Manage Palette - Install option, or run the following command in your Node-RED user directory (typically ~/.node-red) after installing Node-RED-dashboard.

npm install node-red-contrib-habitica-link

Note: As this is a new plugin in active development, the version compatibility is likely to change. That said, my goal is to only broaden the version compatibility. In other words, as I continue working on the plugin, I hope to expand support for more than simply the latest Node.js LTS and Node-RED versions.

Configuration

When setting up your first node, you will need to define at least one set of credentials to use when querying Habitica's API. All API calls require the following information:

  • "App Owner" user ID: This will typically be the user ID of the Node-RED admin.
  • User ID: this is the ID of the user for which data will be fetched
  • API Token: this must match the secret token for the given user ID (i.e. not the "app owner")

User Account Setup

Available Nodes

User Profile

Use the User Profile node to fetch profile data (including things such as stats, current gold, etc) for a given user.

User Profile Example

Profile information

If you don't specify which fields you want, the Habitica API will return the complete user object. See the user schema for a list of fields.

Retrieving specific fields

In the node's edit dialog, you may specify one or more fields you wish to retrieve for the user. Enter a list of field keys separated by commas or line breaks into the textarea.

| Property | Type | Information | |:----------:|:----:|------------------------------------------------------------------| | API Account | Habitica Account | (required) The main account to be used by Node-RED to identify itself to Habitica's API | | Account | Habitica Account | (required) The account for which data will be fetched from Habitica. | | Fields | string[] | (optional) A list of strings, separated by commas or line breaks, indicating which fields should be fetched from the user's account. |

User Profile Config

Contributing

Anyone willing to contribute is welcome to open an issue. Code contributions are always welcome! For ideas, check out the issue tracker and/or project road map (coming soon).

This project welcomes any and all who wish to contribute. To aid in this, we have adopted the Contributor Covenant. You can read the full text of the code here.

License

Node-RED Habitica Link is released as open source under the MIT license. See the license file for the full text of the license.