Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.
/ odp Public archive

Node.js wrapper to get data from the European Union Open Data Portal.

License

Notifications You must be signed in to change notification settings

kalinchernev/odp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

npm Version Build Status Documentation Status

This project is a simple node.js wrapper for the European Union Open Data Portal REST API. The wrapper does not aim to replace any of the existing services and websites, but rather encourage more integrations. The module is a helper in building web apps requesting data from the portal.

Installation

Install via npm.

$ npm install odp

or

Install via git clone

$ git clone https://github.com/kalinchernev/odp.git
$ cd odp
$ npm install

Documentation

REST API service: EU OPD developers' corner

Learn more about EU Open Data Portal

Examples

var odp = require('odp');

// Get list of all datasets.
odp.getDatasets()
  .then(data => console.log(data))

// Get a range of the list of datasets:
odp.getDatasets({query: {limit: 100, offset: 1}})
  .then(data => console.log(data))

// Get all tags:
odp.getTags()
  .then(data => console.log(data))

// Search through tags:
odp.getTags({
  query: {
    vocabulary_id: 'some_id',
    all_fields: true
    }
  })
  .then(data => console.log(data))

// Get details about a dataset:
odp.getDataset({body: {id: 'dgt-translation-memory'}})
  .then(data => console.log(data))

// Search for a dataset:
odp.datasetSearch({body: {q: 'forest'}})
  .then(data => console.log(data))

Tests

Run all tests

$ npm test

Linter

Check whether modifications are acceptable:

$ npm run lint

LICENSE

MIT license. See the LICENSE file for details.

About

Node.js wrapper to get data from the European Union Open Data Portal.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published