node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

dpla

dpla

API client for the Digital Public Library of America

Installation

npm install dpla

Basic Use

var dpla = require('dpla')('APIKEY');
 
dpla({
    uri: '/items',
    search: {
        q: 'fruit+AND+banana'
    }
}, function (err, results) {
    // Yay data! 
});

Complex Search Queries

var dpla = require('dpla')('APIKEY');
 
dpla({
    uri: '/items',
    search: {
        'q': 'atl*',
        'sourceResource.title': 'africa',
        'page_size': 25,
        'page': 2
    }
}, function (err, results) {
    // Even more data! 
});

Testing

npm test