Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

rantscript

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rantscript - npm Package Compare versions

Comparing version
1.3.5
to
1.3.6
+1
-1
package.json
{
"name": "rantscript",
"version": "1.3.5",
"version": "1.3.6",
"description": "A JavaScript wrapper for the FULL devRant API",

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

@@ -164,2 +164,25 @@ 'use strict';

function editRant(text, rant_id, token, imagePath) {
const url = `${variables['API']}/rants/${rant_id}`;
const token_id = token["id"];
const token_key = token["key"];
const user_id = token["user_id"];
const parameters = {
app: 3,
plat: 2,
rant: text,
token_id: token_id,
token_key: token_key,
user_id: user_id
};
if(imagePath !== undefined && imagePath !== null) {
return http.POST_FILE(url, parameters, imagePath);
} else {
return http.POST(url, parameters);
}
}
function postComment(text, rant_id, token, imagePath) {

@@ -439,2 +462,27 @@ const url = `${variables['API']}/devrant/rants/${rant_id}/comments`;

function listWeekly(token) {
const url = `${variables['API']}/devrant/weekly-list`;
let parameters = {
app: 3,
plat: 2,
};
if (token != null && token != undefined) {
const token_id = token["id"];
const token_key = token["key"];
const user_id = token["user_id"];
parameters = {
app: 3,
plat: 2,
token_id, token_key, user_id
};
}
return http
.GET(url, parameters)
.then(data => data.weeks);
}
function surpriseRant(token) {

@@ -474,2 +522,3 @@ const url = `${variables['API']}/devrant/rants/surprise`;

weekly,
listWeekly,
favorite,

@@ -476,0 +525,0 @@ subscribe,

@@ -16,5 +16,5 @@ var devrant = require('./src/index.js');

devrant
.weeklyRants('recent', 1, 0)
.listWeekly()
.then((res)=>{
console.log(res)
})