New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

chatadelic-api

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chatadelic-api - npm Package Compare versions

Comparing version 1.1.3 to 1.1.6

38

index.js

@@ -108,3 +108,3 @@ 'use strict';

}
const data = `chat=${_chat}&login=${encodeURI(_username)}&password=${encodeURI(_password)}&${(_sid ? `_=${+_sid}` : '')}`;
const data = `chat=${_chat}&login=${encodeURI(_username)}&password=${encodeURI(_password)}&${(_sid ? `_=${_sid}` : '')}`;
const req = http.request({

@@ -151,9 +151,3 @@ host: 'chatadelic.net',

_sid = e._;
ws.send(JSON.stringify({
_com: 1,
chat: _chat,
need: !_onlineInited ? 'state' : '',
sid: _sid
}));
callback(e);
_act.init(_sid, callback);
});

@@ -163,2 +157,19 @@ };

/**
* Init chatadelic session
* @param {string} data
* @param {function} [callback]
*/
_act.init = function (data, callback) {
callback = callback || function () {
};
ws.send(JSON.stringify({
_com: 1,
chat: _chat,
need: !_onlineInited ? 'state' : '',
sid: data || ""
}));
callback();
};
/**
* Logout from chat

@@ -235,3 +246,3 @@ * @param {string} data

*/
this.getQuqueInterval = function () {
this.getQueueInterval = function () {
return _queueInterval;

@@ -293,2 +304,10 @@ };

/**
* Init chatadelcic session
* @param callback
*/
this.init = function (callback) {
self.queueAdd('init', _sid || "");
};
/**
* Login

@@ -491,2 +510,3 @@ * @param {function} [callback]

ws.on('message', (e) => {
console.log(e);
let data = JSON.parse(e);

@@ -493,0 +513,0 @@ if (!_onlineInited) {

{
"name": "chatadelic-api",
"version": "1.1.3",
"version": "1.1.6",
"description": "chatadelic.net api",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -16,17 +16,22 @@ ## Functions

</dd>
<dt><a href="#queueInterval">queueInterval([data], [callback])</a> ⇒ <code>string</code></dt>
<dd><p>Set queue execution interval
If data and callback === undefined returns queue interval</p>
<dt><a href="#setQueueInterval">setQueueInterval(data, callback)</a> ⇒ <code>ChatadelicApi</code></dt>
<dd></dd>
<dt><a href="#getQueueInterval">getQueueInterval()</a> ⇒ <code>number</code></dt>
<dd></dd>
<dt><a href="#setChat">setChat(data, callback)</a> ⇒ <code>ChatadelicApi</code></dt>
<dd></dd>
<dt><a href="#getChat">getChat()</a> ⇒ <code>number</code></dt>
<dd></dd>
<dt><a href="#setUsername">setUsername(data, callback)</a> ⇒ <code>ChatadelicApi</code></dt>
<dd></dd>
<dt><a href="#getUsername">getUsername()</a> ⇒ <code>string</code></dt>
<dd></dd>
<dt><a href="#setPassword">setPassword(data, callback)</a> ⇒ <code>ChatadelicApi</code></dt>
<dd></dd>
<dt><a href="#getPassword">getPassword()</a> ⇒ <code>string</code></dt>
<dd><p>DO NOT return password</p>
</dd>
<dt><a href="#chat">chat([data], [callback])</a> ⇒ <code>string</code></dt>
<dd><p>Set chat id
If data and callback === undefined returns chat id</p>
<dt><a href="#init">init(callback)</a></dt>
<dd><p>Init chatadelcic session</p>
</dd>
<dt><a href="#username">username([data], [callback])</a> ⇒ <code>string</code></dt>
<dd><p>Set username
If data and callback === undefined returns username</p>
</dd>
<dt><a href="#password">password(data, [callback])</a></dt>
<dd><p>Set password</p>
</dd>
<dt><a href="#login">login([callback])</a></dt>

@@ -47,2 +52,4 @@ <dd><p>Login</p>

</dd>
<dt><a href="#getOnline">getOnline()</a> ⇒ <code>Array</code></dt>
<dd></dd>
</dl>

@@ -90,52 +97,70 @@

<a name="queueInterval"></a>
## queueInterval([data], [callback]) ⇒ <code>string</code>
Set queue execution interval
If data and callback === undefined returns queue interval
<a name="setQueueInterval"></a>
## setQueueInterval(data, callback) ⇒ <code>ChatadelicApi</code>
**Kind**: global function
**Returns**: <code>ChatadelicApi</code> - Returns this to chain methods
| Param | Type | Description |
| --- | --- | --- |
| data | <code>number</code> | Queue execution interval |
| callback | <code>function</code> | |
<a name="getQueueInterval"></a>
## getQueueInterval() ⇒ <code>number</code>
**Kind**: global function
**Returns**: <code>string</code> - username
**Returns**: <code>number</code> - Queue execution interval
<a name="setChat"></a>
## setChat(data, callback) ⇒ <code>ChatadelicApi</code>
**Kind**: global function
**Returns**: <code>ChatadelicApi</code> - Returns this to chain methods
| Param | Type |
| --- | --- |
| [data] | <code>string</code> |
| [callback] | <code>function</code> |
| Param | Type | Description |
| --- | --- | --- |
| data | <code>number</code> | Chat id |
| callback | <code>function</code> | |
<a name="chat"></a>
## chat([data], [callback]) ⇒ <code>string</code>
Set chat id
If data and callback === undefined returns chat id
<a name="getChat"></a>
## getChat() ⇒ <code>number</code>
**Kind**: global function
**Returns**: <code>string</code> - username
**Returns**: <code>number</code> - Chat id
<a name="setUsername"></a>
## setUsername(data, callback) ⇒ <code>ChatadelicApi</code>
**Kind**: global function
**Returns**: <code>ChatadelicApi</code> - Returns this to chain methods
| Param | Type |
| --- | --- |
| [data] | <code>string</code> |
| [callback] | <code>function</code> |
| Param | Type | Description |
| --- | --- | --- |
| data | <code>string</code> | Username |
| callback | <code>function</code> | |
<a name="username"></a>
## username([data], [callback]) ⇒ <code>string</code>
Set username
If data and callback === undefined returns username
<a name="getUsername"></a>
## getUsername() ⇒ <code>string</code>
**Kind**: global function
**Returns**: <code>string</code> - username
**Returns**: <code>string</code> - Username
<a name="setPassword"></a>
## setPassword(data, callback) ⇒ <code>ChatadelicApi</code>
**Kind**: global function
**Returns**: <code>ChatadelicApi</code> - Returns this to chain methods
| Param | Type |
| --- | --- |
| [data] | <code>string</code> |
| [callback] | <code>function</code> |
| Param | Type | Description |
| --- | --- | --- |
| data | <code>string</code> | Password |
| callback | <code>function</code> | |
<a name="password"></a>
## password(data, [callback])
Set password
<a name="getPassword"></a>
## getPassword() ⇒ <code>string</code>
DO NOT return password
**Kind**: global function
**Returns**: <code>string</code> - Empty string
<a name="init"></a>
## init(callback)
Init chatadelcic session
| Param | Type |
| --- | --- |
| data | <code>string</code> |
| [callback] | <code>function</code> |
**Kind**: global function
| Param |
| --- |
| callback |
<a name="login"></a>

@@ -197,1 +222,5 @@ ## login([callback])

<a name="getOnline"></a>
## getOnline() ⇒ <code>Array</code>
**Kind**: global function
**Returns**: <code>Array</code> - Online list

@@ -1,10 +0,12 @@

'use strict';
api = require("./index.js");
const C = require('./index.js');
const c = new C();
c.on('open',() => {
c.setChat(24714)
.setUsername('Deep Dark Fantasy')
.setPassword('FuckYou')
.login();
});
cirno = new api();
cirno.setUsername("Рейму");
cirno.setPassword("RagingCat741");
cirno.setChat(24714);
cirno.init();
cirno.login();
cirno.message("1");
cirno.logout();
cirno.message("2");

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc