Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
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
The npm package discourse-sdk receives a total of 5 weekly downloads. As such, discourse-sdk popularity was classified as not popular.
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 researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.