Skip to content

Commit

Permalink
📦 v1.2.0 - Added new endpoint: /notify-revolt
Browse files Browse the repository at this point in the history
Method added: `notifyRevolt()`
This API Method allows you to send notifications to your RevoltID as a DirectMessage.
  • Loading branch information
itskdhere committed Oct 25, 2023
1 parent 70596b5 commit 33a5b26
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 13 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ let response = await sshsurf.notify({
console.log(response);
```

- `notifyRevolt()` - This API Method allows you to send notifications to your RevoltID as a DirectMessage. Required Parameters:
- `message` - The Message You Want To Send.
```js
let response = await sshsurf.notifyRevolt({
message: 'ANY_MESSAGE_HERE'
});
console.log(response);
```

</details>


Expand Down
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssh.surf",
"version": "1.1.0",
"version": "1.2.0",
"description": "SSH.SURF API Wrapper",
"type": "module",
"main": "./src/index.js",
Expand All @@ -24,9 +24,9 @@
},
"homepage": "https://github.com/itskdhere/ssh.surf#readme",
"dependencies": {
"chalk": "^5.2.0",
"chalk": "^5.3.0",
"chalk-animation": "^2.0.3",
"figlet": "^1.6.0",
"figlet": "^1.7.0",
"gradient-string": "^2.0.2",
"nanospinner": "^1.1.0"
}
Expand Down
19 changes: 19 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,25 @@ class SshSurfApi {
return await this.#post("notify", JSON.stringify(payload));
}


/**
* This API Method allows you to send notifications to your RevoltID as a DirectMessage.
*
* Required Options:
*
* @param message - The Message You Want To Send.
*/

async notifyRevolt(options) {
const { message } = options;

const payload = {
"message": message
};

return await this.#post("notify-revolt", JSON.stringify(payload));
}

}

export default SshSurfApi;

0 comments on commit 33a5b26

Please sign in to comment.