
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 1 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.