New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

imgurnode

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imgurnode

Node package for interacting with the Imgur API. This is a port of the official Python Imgur API, imgurpython.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

imgurnode

Node package for interacting with the Imgur API. This is a port of the official Python Imgur API, imgurpython. See: https://github.com/Imgur/imgurpython

As mentioned at the GitHub page above: "You must register your client with the Imgur API, and provide the Client-ID to make any request to the API (see the Authentication note). If you want to perform actions on accounts, the user will have to authorize your application through OAuth2."

Installation

  npm install imgurnode

Usage Example

  var ImgurClient = require('imgurnode');

  // Constructor params - Client ID, client secret, refresh token, access token
  var client = new ImgurClient(clientID, clientSecret, refreshToken, null);

  // Call init to validate access token
  // Will refresh access token if refresh token was passed into constructor
  client.init(function(err) {
    if(err) console.log(err);
    else console.log('Successfully refreshed access token');
  }

  // Get favorites for self
  client.getAccountFavorites('me', function(err, data) {
    if(err) console.log(err)
    else console.log('Favorites: ', data);
  });

Supported API Calls

Notes:

  • All callback params are in the form (err, data)
  • 'me' can be used in place of username
  • sort parameter options (may not apply to all API calls) - 'newest', 'viral', 'best', 'time'
  • anon parameter set to true forces anonymous
  • client.getAccount(username, callback)
  • client.getGalleryFavorites(username, callback)
  • client.getAccountFavorites(username, callback)
  • client.getAccountSubmissions(username, pageNumber, callback)
  • client.getAccountSettings(username, callback)
  • client.getAccountAlbums(username, pageNumber, callback)
  • client.getAccountAlbumIds(username, pageNumber, callback)
  • client.getAccountAlbumCount(username, callback)
  • client.getAccountComments(username, sort, pageNumber, callback)
  • client.getAccountCommentIds(username, sort, pageNumber, calllback)
  • client.getAccountCommentCount(username, callback)
  • client.getAccountImages(username, pageNumber, callback)
  • client.getAccountImageIds(username, pageNumber, callback)
  • client.getAccountImagesCount(username, callback)
  • client.getImage(imageId, callback)
  • client.uploadImageFromURL(url, anon, callback)
  • client.deleteImage(imageId, callback)
  • client.favoriteImage(imageId, callback)

Release History

  • 0.1.0 Initial release

Keywords

FAQs

Package last updated on 23 Feb 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc