Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
var api = new APISDK([
// An API definition list here
'POST /articles',
'GET /articles/:id',
'PUT /articles/:id',
'DELETE /articles/:id'
], {
'host': '/api',
// 'promise' and 'http' MUST be provided
'promise': Promise,
'http': function(params) { console.log(params); }
});
var id = 123;
// { "method": "get", "url": "/api/articles/123", "data": { "token": 789 } }
api.articles(id).get({ token: 789 });
// Dynamic parameter is supported
var inc = 0;
var nextArticle = api.articles(function() { return inc++; });
// { method: "GET", url: "/api/articles/0", data: undefined }
nextArticle.get();
// { method: "GET", url: "/api/articles/1", data: undefined }
nextArticle.get();
// Asynchronous parameter is supportd
var asyncParam = new Promise(function(resolve){ setTimeout(resolve, 1000, 123); });
// The request will be launched after the promise resolved
api.articles(asyncParam).get();
/**
* GET /users/:user_id/
* GET /users/:user_id/orders
* POST /users/:user_id/orders
* GET /users/:user_id/orders/:order_id
* POST /users/:user_id/orders/:order_id/payment
* POST /users/:user_id/orders/:order_id/rating
* POST /users/:user_id/orders/:order_id/cancel
* POST /users/:user_id/orders/:order_id/refunding
**/
var currentUserId = 123;
// Create a 'user' object for current user
var user = api.users(currentUserId);
// Get current user profile
user.get();
// Create an 'order' object
var order = user.orders(123);
// Get order information
order.get();
// Post a payment request for this order
order.payment.post();
// Post a rating for this order
order.rating.post();
// Post a order canceling request for this order
order.cancel.post();
// Post refunding request for this order
order.refunding.post();
bower install apisdk
<script src="/bower_components/apisdk/apisdk.js"></script>
FAQs
APISDK with ES6Module
The npm package apisdk receives a total of 4 weekly downloads. As such, apisdk popularity was classified as not popular.
We found that apisdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.