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

rijksmuseum

v0.0.3

Published

Connects to Rijksmuseum api based on the following documentation: http://rijksmuseum.github.io/

Downloads

1

Readme

Rijksmuseum

This is a wrapper around the public API of the Rijksmuseum in Amsterdam, The Netherlands

Prerequisites

Before you can use this wrapper or the API, you need a api-key. You can read more on how to obtain the API key and the parameters you can use from this page: http://rijksmuseum.github.io/

Getting Started

You can install the wrapper with "npm install rijksmuseum".

Currently only the "Collection" and "Collection Details" requests are implemented.

During the creation of the Rijksmuseum class you need to provide the apikey and culture. Only cultures "en" (English) and "nl" (Nederlands) are supported. Default is "nl":

    const Rijksmuseum = require('rijksmuseum');
    const museum = new Rijksmuseum({apikey: 'xxxxxxxx', culture: 'nl | en'});

To get a selection of the collection (all filter options are explained below):

    let collectionFilter = {involvedMaker: 'Rembrandt Harmensz. van Rijn'};

    museum.getCollection('De Nachtwacht', collectionFilter, (err, result) => {
        if(err)
            console.log(err);
        else
            console.log(JSON.stringify(result));
    });

And to iterate through the following pages in the selection:

    museum.getNextCollectionPage((err, result) => {
        if(err)
            console.log(err);
        else
            console.log(JSON.stringify(result));
    });

After the last page an empty object ({}) is returned.

And to get the details page of an object, you use the objectNumber as the first parameter:

    museum.getCollectionDetailPage('SK-A-4691', (err, result) => {
        if(err)
            console.log('error %s', err);
        else
            console.log(JSON.stringify(result));
    });

Filter options (all optional):

{
    pagesize: 10,         // (values 1-100, default = 10)
    query: 'Nachtwacht',  // you can specify the query here or as the first parameter of the function call
    maker: 'Rembrandt Harmensz. van Rijn', // name of the artist
    involvedMaker: 'Rembrandt Harmensz. van Rijn', // name of an involved artist, e.g. work is based on this person's work
    place: 'Amsterdam',   // location where the object was worked on
    type: 'schilderij',   // type of object, like schilderij (or painting), foto (photo), etc
    material: 'canvas',   // material used for the object
    technique: 'chromolithografie', // technique used
    century: 17,          // century of the works (values between 0 - 21), or a full year. year will be converted to a century value
    imgonly: false,       // only return results where images are available (default is false) 
    toppieces: false,     // only return top-pieces (default is false)
    sortby: 'relevance',  // sorting fields. see http://rijksmuseum.github.io/ for options
    colors: ['#FFFFFF']   // array of color codes used in the object
}

Authors

License

This project is licensed under the ISC License

Acknowledgments

  • Thanks to jkaizer and remcoder who created the initial api on https://github.com/Rijksmuseum