Git Product home page Git Product logo

node-red-contrib-habitica-link's Introduction

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.

node-red-contrib-habitica-link's People

Contributors

chimericdream avatar

Watchers

 avatar James Cloos avatar  avatar

node-red-contrib-habitica-link's Issues

Add configuration nodes

There needs to be a way for nodes to access a user's data.

Config node:

  • User name
  • API token

Individual nodes

  • Select user from dropdown

Feature: create task

  • Create simple task with a title and type
  • Set task priority
  • Add label(s)
  • Other options as appropriate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.