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

jservice-node

v0.2.3

Published

Node wrapper for accessing the jservice.io API

Downloads

19

Readme

jservice-node

Node wrapper for accessing jservice.io

Installation

npm install jservice-node

Setup

var js = require('jservice-node');

Methods

Please read the official documentation at jservice.io

clues(options, callback)

var options = {
	value: 200,
	category: 11502,
};
js.clues(options, function(error, response, json){
	if(!error && response.statusCode == 200){
		console.dir(json);
	} else {
		console.log(`Error: ${response.statusCode}`);
	}
});

Outputs

[{
    id: 87665,
    answer: 'the Penguin',
    question: 'Burgess Meredith as this odd bird',
    value: 200,
    airdate: '2009-07-23T12:00:00.000Z',
    created_at: '2014-02-14T01:53:20.179Z',
    updated_at: '2014-02-14T01:53:20.179Z',
    category_id: 11502,
    game_id: null,
    invalid_count: null,
    category: {
        id: 11502,
        title: 'batman tv villains',
        created_at: '2014-02-14T01:53:20.027Z',
        updated_at: '2014-02-14T01:53:20.027Z',
        clues_count: 5
    }
}]

random(count, callback)

js.random(2, function(error, response, json){
	if(!error && response.statusCode == 200){
		console.dir(json);
	} else {
		console.log(`Error: ${response.statusCode}`);
	}
});

Outputs

[{
    id: 44377,
    answer: 'Beetle',
    question: 'Also a classic Volkswagen, it\'s the insect with the greatest number of species',
    value: 100,
    airdate: '2001-02-16T12:00:00.000Z',
    created_at: '2014-02-11T23:12:36.463Z',
    updated_at: '2014-02-11T23:12:36.463Z',
    category_id: 35,
    game_id: null,
    invalid_count: null,
    category: {
        id: 35,
        title: 'insects',
        created_at: '2014-02-11T22:47:23.318Z',
        updated_at: '2014-02-11T22:47:23.318Z',
        clues_count: 75
    }
}, {
    id: 44378,
    answer: 'Dalai Lama',
    question: 'In 1959 this spiritual leader of Tibet fled to exile in India',
    value: 100,
    airdate: '2001-02-16T12:00:00.000Z',
    created_at: '2014-02-11T23:12:36.485Z',
    updated_at: '2014-02-11T23:12:36.485Z',
    category_id: 181,
    game_id: null,
    invalid_count: null,
    category: {
        id: 181,
        title: 'the 1950s',
        created_at: '2014-02-11T22:47:50.004Z',
        updated_at: '2014-02-11T22:47:50.004Z',
        clues_count: 25
    }
}]

categories(options, callback)

var options = {
	count: 5,
	offset: 25
};
js.categories(options, function(error, response, json){
	if(!error && response.statusCode == 200){
		console.dir(json);
	} else {
		console.log(`Error: ${response.statusCode}`);
	}
});

Outputs

[{
    id: 11515,
    title: "that's just ducky",
    clues_count: 5
}, {
    id: 11516,
    title: "parts",
    clues_count: 5
}, {
    id: 11517,
    title: "say it in latin",
    clues_count: 5
}, {
    id: 11501,
    title: "east asia",
    clues_count: 5
}, {
    id: 11502,
    title: "batman tv villains",
    clues_count: 5
}]

category(id, callback)

js.category(11502, function(error, repsonse, json){
	if(!error && response.statusCode == 200){
		console.dir(json);
	} else {
		console.log(`Error: ${response.statusCode}`);
	}
});

Outputs

{
    id: 11502,
    title: "batman tv villains",
    clues_count: 5,
    clues: [{
        id: 87665,
        answer: "the Penguin",
        question: "Burgess Meredith as this odd bird",
        value: 200,
        airdate: "2009-07-23T12:00:00.000Z",
        category_id: 11502,
        game_id: null,
        invalid_count: null
    }, {
        id: 87671,
        answer: "Catwoman",
        question: "Julie Newmar, Eartha Kitt & Lee Meriwether as this purr-fect villain (not all at the same time)",
        value: 400,
        airdate: "2009-07-23T12:00:00.000Z",
        category_id: 11502,
        game_id: null,
        invalid_count: null
    }, {
        id: 87677,
        answer: "the Riddler",
        question: "Frank Gorshin as this puzzling criminal",
        value: 600,
        airdate: "2009-07-23T12:00:00.000Z",
        category_id: 11502,
        game_id: null,
        invalid_count: null
    }, {
        id: 87683,
        answer: "the Joker",
        question: "Cesar Romero as this kooky cutup",
        value: 800,
        airdate: "2009-07-23T12:00:00.000Z",
        category_id: 11502,
        game_id: null,
        invalid_count: null
    }, {
        id: 87689,
        answer: "King Tut",
        question: "Victor Buono as this felonious pharaoh",
        value: 1000,
        airdate: "2009-07-23T12:00:00.000Z",
        category_id: 11502,
        game_id: null,
        invalid_count: null
    }]
}