Code Monkey home page Code Monkey logo

bir1's Introduction

Deprecated Notice:

This package is deprecated. Please consider using the bir1 package as a recommended alternative.

BIR1 - GUS REGON client

Simple node.js client library to Statistics Poland (GUS) information about companies api REGON

Install

npm i bir1

Usage

import Bir from 'bir1'

const bir = new Bir()
await bir.login()
console.log(await bir.search({ nip: '5261040567' }))

/*
output: 

{
  regon: '011417295',
  nip: '5261040567',
  statusNip: null,
  nazwa: 'T-MOBILE POLSKA SPÓŁKA AKCYJNA',
  wojewodztwo: 'MAZOWIECKIE',
  powiat: 'Warszawa',
  gmina: 'Mokotów',
  miejscowosc: 'Warszawa',
  kodPocztowy: '02-674',
  ulica: 'ul. Marynarska',
  nrNieruchomosci: '12',
  nrLokalu: null,
  typ: 'P',
  silosID: '6',
  dataZakonczeniaDzialalnosci: null,
  miejscowoscPoczty: 'Warszawa'
}
*/

API

constructor

new Bir(options?)

Parameters

Name Type Notes
options Object
options.key? string production API key

Note: by default it connects to non production GUS database using public default key. In order to connect to production database with current company data provide a key granted by GUS.

login

login(): Promise<void>

Returns

Promise<void>


search

search(query): Promise<any>

Parameters

Name Type Notes
query Object
query.nip? string
query.regon? string
query.krs? string

Returns

Promise<any>


report

report(query): Promise<any>

Parameters

Name Type Notes
query Object
query.regon string
query.report string e.g.: BIR11OsPrawna

See BIR1 original documentation for more report types.

Returns

Promise<any>


value

value(value): Promise<string>

Parameters

Name Type
value string

Returns

Promise<string>

bir1's People

Contributors

chmielulu avatar dependabot[bot] avatar konradkalemba avatar pawel-id avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.