Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
discourse-sdk
Advanced tools
Using npm
npm install --save discourse-sdk
In node.js
var discourse = require('discourse-sdk');
var client = new discourse('API-URL', 'API-KEY', 'USER-NAME');
Gets a list of categories
client.getCategories({},function(error, body, httpCode) {
console.log(body);
});
Create new category
client.createCategory('name', 'color', 'text_color', 'parent_category_id',function(error, body, httpCode) {
console.log(body);
});
Get category Latest Topic
client.getCategoryLatestTopic('category_slug', 'params',,function(error, body, httpCode) {
console.log(body);
});
Create new Topic
client.createTopic('title', 'raw', 'category' ,function(error, body, httpCode) {
console.log(body);
});
Get Created Topics by given user
client.getCreatedTopicsfunction('username' ,function(error, body, httpCode) {
console.log(body);
});
Get Last Created Post Id
client.getLastPostId(function(error, body, httpCode) {
console.log(body);
});
Get Post by Id
client.getPost('post-id',function(error, body, httpCode) {
console.log(body);
});
Create New User
client.createUser('name', 'email', 'username', 'password', 'active',function(error, body, httpCode) {
console.log(body);
});
Delete User
client.deleteUser('id','username', function(error, body, httpCode) {
console.log(body);
});
Get User Details
client.getUser('username', function(error, body, httpCode) {
console.log(body);
});
FAQs
This npm module allows to consume the discourse api
We found that discourse-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.