Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
A wrapper for the Imgur API written in JavaScript. All methods take advantage of Promises.
npm install --save imgurjs
var Imgur = require('imgurjs');
var imgur = new Imgur({
clientId: 'myClientId',
clientSecret: 'myClientSecret'
});
##Using it
var options = {
username: 'me'
};
imgur.endpoint.method(options).then(function(data) {
console.log(data);
}).catch(function(error) {
console.log(error);
});
router.get('/login', function(req, res, next) {
res.redirect(imgur.oauth.getOauthUrl());
});
router.get('/logincallback', function(req, res, next) {
imgur.oauth.authorizeCallback(req.query.code).then(function(user) {
req.session.user = user;
res.redirect('/');
});
});
router.get('/refreshsession', function(req, res, next) {
imgur.oauth.refreshToken(req.session.user.refresh_token).then(function(user) {
req.session.user = user;
res.redirect('/');
});
});
fs.readFile('./myImage.png', function(err, data) {
imgur.image.upload({
file: data
}).then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
});
imgur.image.upload({
file: fs.createReadStream('./myImage.png')
}).then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
imgur.image.upload({
file: 'http://mysite.com/myImage.png'
}).then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
Full documentation is available at https://xbenjii.github.io/imgurjs
FAQs
An Imgur API wrapper.
The npm package imgurjs receives a total of 2 weekly downloads. As such, imgurjs popularity was classified as not popular.
We found that imgurjs 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
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.