Skip to content

abcdan/rock-so

Repository files navigation

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/

About

🪨 An unofficial wrapper around the Rock.so public API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published