rock-so
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

rock-so

🪨 An unofficial wrapper around the Rock.so public API. It's simple but it does it's thing!

Installation

It's really simple. All you need is Node.js and NPM/Yarn installed!

npm i rock-so

or

yarn add rock-so

Usage

It's pretty simple, just create a custom webhook in your Rock space and then create a Rock client in your code. Here's an example on how to send a message to the channel

const Rock = require("rock-so");
    // Fill in the token of the client
  const client = new Rock("YOUR TOKEN HERE"); 
  const res = await client.sendMessage({
    text: "how are you", // The message you want to send
  });

  console.log(res); // Prints the ID of the message sent

You're done! You've sent a message. More examples are in the /examples directory. (Not right now, they'll be added later...)

Docs

There's also documentation available, it's autogenerated but it should give you an idea on what it is. If you find an issue in the comments be sure to open an issue. The docs are automatically generated with an AI so there are some issues sometimes...

🌐 [Wrapper Documentation](https://github.com
🪨 Rock API Documentation
💻 You can generate 'em yourself with npm run docs. It'll make a docs folder with HTML.

Credits

Thanks for for people at Rock.so for making the platform. I truly love it.

The API Docs that it's based off: https://rock.so/public-api/

Readme

Keywords

Package Sidebar

Install

npm i rock-so

Weekly Downloads

6

Version

0.1.2

License

Apache-2.0

Unpacked Size

43.4 kB

Total Files

76

Last publish

Collaborators

  • lngzl