Giter Club home page Giter Club logo

czares's Introduction

czares

NodeJS API handler for ARES requests (Czech registry of economic subjects). Please read carefully security limits and other operations instruction. All the documents are in czech language.

Installation

It's really simple:

npm install czares --save

API Overview and Examples

Let's start with initiation of the class and the object.

const CZAres = require('czares');
const ares = new CZAres();

For now, there are available only basic methods for accessing standard information like IČO, DIČ, etc. Before we go deeper into details, have a look at types definition, which gives you great overview.

Get Basic information about a company by ID Number (IČO)

When you need to get the basic information about company by its ID Number (in czech IČO), just use following code. When nothing is found '''undefined''' is returned:

const CZAres = require('czares');
const ares = new CZAres();
ares.getByIdentificationNumber('COMPANY_ID_NUMBER')
    .then(data => console.log('Company details are:', JSON.stringify(data)))
    .catch(err => console.error(err));

Get information, whether a company is VAT registered

When you need to know whether a freelancer is registered to pay VAT, use this snippet of code:

const CZAres = require('czares');
const ares = new CZAres();
ares.isVATRegistered('71700650')
    .then(isRegistered => console.log('Is Company registered?', isRegistered))
    .catch(err => console.error(err));

Get Tax ID Number ('DIČ')

When you need to know tax ID Number (in czech 'DIČ'), just use this:

const CZAres = require('czares');
const ares = new CZAres();
ares.getTaxIdNumber('COMPANY_ID_NUMBER')
    .then(taxId => console.log('Company tax ID is:', taxId))
    .catch(err => console.error(err));

Development

To run the tests you'll need just:

$ npm install -g mocha
$ npm install
$ npm run test

Author

Originally developed by Stepan Kouba.

czares's People

Contributors

stepankouba avatar dependabot[bot] avatar jvoj 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.