You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

pokec-send-message

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pokec-send-message

Simple wrapper class for sending messages to chatrooms on Pokec social network.

1.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

pokec-send-message

npm npm npm paypal

Simple wrapper class for sending messages to chatrooms on Pokec social network.

This package cannot send RP messages.

Install

Via npm [package]:

$ npm install pokec-send-message

Via yarn [package]:

$ yarn add pokec-send-message

Usage

// 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

Keywords

pokec

FAQs

Package last updated on 05 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts