npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

deviantnode

v0.2.1

Published

a pretty basic node.js library using the deviantart api

Downloads

17

Readme

deviantnode

a pretty basic node.js library using the deviantart api

version

How do I start?

The functions for this package is quite easy and basic. All these contain the deviantart api. The only requirements you need is to create your application, which gives you CLIENT_ID and CLIENT_SECRET.

The "Basic"

const deviantnode = require('deviantnode');

const options = { //optional
  category: 'digitalart/animation/',
  q: 'test',
  time: '24hr',
  offset: 0,
  limit: 5
};
deviantnode.getPopularDeviations('CLIENT_ID','CLIENT_SECRET', options)
  .then(response => console.log(response.results[0])); //show the first result

Functions

getDailyDeviations(client_id, client_secret, [options])

Browse daily deviations. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • date(optional): the day to browse, defaults to today. the string must be like this: YYYY-MM-DD.
deviantnode.getDailyDeviations('CLIENT_ID','CLIENT_SECRET', { date: '2012-12-12' })
  .then(response => console.log(response));

getHotDeviations(client_id, client_secret, [options])

Browse whats hot deviations. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • category(optional): category path to fetch from.
    • offset(optional): the pagination offset.
    • limit(optional): the pagination limit.
const options = {
   category: 'apps',
   offset: 6,
   limit: 1 }
}
deviantnode.getHotDeviations('CLIENT_ID','CLIENT_SECRET', options)
  .then(response => console.log(response));

getNewestDeviations(client_id, client_secret, [options])

Browse whats hot deviations. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • category(optional): category path to fetch from.
    • q(optional): a search query term.
    • offset(optional): the pagination offset.
    • limit(optional): the pagination limit.
deviantnode.getNewestDeviations('CLIENT_ID','CLIENT_SECRET', { q: 'hi' })
  .then(response => console.log(response));

getPopularDeviations(client_id, client_secret, [options])

Browse popular deviations. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • category(optional): category path to fetch from.
    • q(optional): a search query term.
    • time(optional): the timerange, valid values(8hr, 24hr, 3days, 1week, 1month, alltime) default: 24hr.
    • offset(optional): the pagination offset.
    • limit(optional): the pagination limit.
deviantnode.getPopularDeviations('CLIENT_ID','CLIENT_SECRET', { time: 'alltime', limit: 5 })
  .then(response => console.log(response));

getTagDeviations(client_id, client_secret, [options])

Browse a tag. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • tag: the tag to browse.
    • offset(optional): the pagination offset.
    • limit(optional): the pagination limit.
deviantnode.getTagDeviations('CLIENT_ID','CLIENT_SECRET', { tag: 'Hi' })
  .then(response => console.log(response));

getUndiscoveredDeviations(client_id, client_secret, [options])

Browse undiscovered deviations. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • category(optional): category path to fetch from.
    • offset(optional): the pagination offset.
    • limit(optional): the pagination limit.
deviantnode.getUndiscoveredDeviations('CLIENT_ID','CLIENT_SECRET', { category: 'digitalart/animation/' })
  .then(response => console.log(response));

getGalleryAllDeviations(client_id, client_secret, [options])

Get the "all" view of a users gallery. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • username: the user whose gallery to fetch.
    • offset(optional): the pagination offset.
    • limit(optional): the pagination limit.
deviantnode.getGalleryAllDeviations('CLIENT_ID','CLIENT_SECRET', { username: 'EduardoBarra' })
  .then(response => console.log(response));

getUserInfo(client_id, client_secret, [options])

Get user profile information. Source

Parameters:

  • CLIENT_ID: the client id from your application.
  • CLIENT_SECRET: the client secret from your application.
  • options:
    • username: username to lookup profile of.
    • collections(optional): include collection folder info.
    • galleries(optional): include gallery folder info.
deviantnode.getUserInfo('CLIENT_ID','CLIENT_SECRET', { username: 'EduardoBarra' })
  .then(response => console.log(response));

and,.,. that's all. soon there will be more functions.!