pokec-send-message

    1.0.1 • Public • Published

    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

    Install

    npm i pokec-send-message

    DownloadsWeekly Downloads

    3

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    12.7 kB

    Total Files

    4

    Last publish

    Collaborators

    • oliverfindl