dif

difi

Node.js module for hotell.difi.no API

Showing:

Popularity

Downloads/wk

14

GitHub Stars

1

Maintenance

Last Commit

13d ago

Contributors

3

Package

Dependencies

1

Size (min+gzip)

5.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Build Status Coverage Status js-standard-style

difi

Node.js module for querying the hotell.difi.no API.

Requires Node >= 14

Installation

$ npm install difi --save

Usage

Pass an object with the required properties and receive the result.

dataset The dataset you want to query.

format Format for the result. Can be csv, json, jsonp, xml or yaml

query Object with properties for querystring. Find all options in the API description

const difi = require('difi')
const options = {
      dataset: 'brreg/enhetsregisteret',
      format: 'json',
      query: {
        query: 'Registerenheten i Brønnøysund'
      }
}

difi(options)
  .then(console.log)
  .catch(console.error)

Returns

{ entries: 
   [ { tvangsavvikling: 'N',
       regnskap: '',
       forradrpostnr: '8900',
       ansatte_antall: '566',
       postadresse: 'Postboks 900',
       nkode3: '',
       ppoststed: 'BRØNNØYSUND',
       konkurs: 'N',
       stiftelsesdato: '',
       sektorkode: '6100',
       ansatte_dato: '12.10.2017',
       organisasjonsform: 'ORGL',
       navn: 'REGISTERENHETEN I BRØNNØYSUND',
       regifriv: 'N',
       forradrkommnr: '1813',
       regimva: 'N',
       tlf_mobil: '',
       forradrland: 'Norge',
       ppostland: 'Norge',
       avvikling: 'N',
       regifr: 'N',
       hovedenhet: '912660680',
       forretningsadr: 'Havnegata 48',
       url: 'www.brreg.no',
       forradrpoststed: 'BRØNNØYSUND',
       tlf: '75 00 75 09',
       nkode1: '84.110',
       nkode2: '',
       forradrkommnavn: 'BRØNNØY',
       regdato: '09.08.1995',
       orgnr: '974760673',
       regiaa: 'J',
       ppostnr: '8910' } ],
  page: 1,
  pages: 1,
  posts: 1 }

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100