https://github.com/oliverfindl/pokec-send-message
Simple wrapper class for sending messages to chatrooms on Pokec social network.
https://github.com/oliverfindl/pokec-send-message
api javascript message pokec pokec-send-message send web wrapper
Last synced: about 1 year ago
JSON representation
Simple wrapper class for sending messages to chatrooms on Pokec social network.
- Host: GitHub
- URL: https://github.com/oliverfindl/pokec-send-message
- Owner: oliverfindl
- License: mit
- Created: 2018-09-15T11:39:57.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-05T21:06:16.000Z (over 7 years ago)
- Last Synced: 2024-02-25T08:41:05.409Z (over 2 years ago)
- Topics: api, javascript, message, pokec, pokec-send-message, send, web, wrapper
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pokec-send-message
[](https://www.npmjs.com/package/pokec-send-message)
[](https://www.npmjs.com/package/pokec-send-message)
[](https://www.npmjs.com/package/pokec-send-message)
[](https://paypal.me/oliverfindl)
Simple wrapper class for sending messages to chatrooms on [Pokec](https://pokec.azet.sk/) social network.
> This package cannot send RP messages.
---
## Install
Via [npm](https://npmjs.com/) [[package](https://www.npmjs.com/package/pokec-send-message)]:
```bash
$ npm install pokec-send-message
```
Via [yarn](https://yarnpkg.com/en/) [[package](https://yarnpkg.com/en/package/pokec-send-message)]:
```bash
$ yarn add pokec-send-message
```
## Usage
```javascript
// require lib
const PokecAPI = require("pokec-send-message");
// init lib
const pokec = new PokecAPI();
// get list of pokec chatrooms
pokec.getRooms().then(console.log).catch(console.error);
// login to pokec
pokec.login(
"username",
"password"
).then(response => {
console.log(response);
// send message
pokec.sendMessage(
"hello :)", // message
9, // room id, for list of available rooms use getRooms method
"somebody" // [optional] for user, defaults to "all"
).then(console.log).catch(console.error);
// set interval for ping
setInterval(() => pokec.ping().then(console.log).catch(console.error));
}).catch(console.error);
```
---
## License
[MIT](http://opensource.org/licenses/MIT)