Socket
Socket
Sign inDemoInstall

node-gat-blac-api

Package Overview
Dependencies
50
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-gat-blac-api

Node.js module to interact with official Gat-Blac Api


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

#node-gat-blac-api

npm package

A library providing methods to use all gat-blac apis

Installation

npm install node-gat-blac-api --save

Usage

Sport Api

Use the Sport team api of gat-blac is simple and easy with this module, there is here an example of using this. With getTeams Method returns an array with all teams that match with the filters

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
var filters = {'country':'chile'};
gatBlacApi.getTeams(filters,function(error,teams){
  if(error){
    console.log(error);
  }
  console.log(teams);
});

Football teams

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
var filters = {'sport':'football'};
gatBlacApi.getTeams(filters,function(error,teams){
  if(error){
    console.log(error);
  }
  console.log(teams);
});

Basketball teams

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
var filters = {'sport':'basketball'};
gatBlacApi.getTeams(filters,function(error,teams){
  if(error){
    console.log(error);
  }
  console.log(teams);
});

American Football teams

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
var filters = {'sport':'american-football'};
gatBlacApi.getTeams(filters,function(error,teams){
  if(error){
    console.log(error);
  }
  console.log(teams);
});

Baseball teams

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
var filters = {'sport':'baseball'};
gatBlacApi.getTeams(filters,function(error,teams){
  if(error){
    console.log(error);
  }
  console.log(teams);
});

Hockey teams

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
var filters = {'sport':'hockey'};
gatBlacApi.getTeams(filters,function(error,teams){
  if(error){
    console.log(error);
  }
  console.log(teams);
});

With getTeam Method returns an Object with a team that match with the code

var GatBlacApi = require('node-gat-blac-api');
var gatBlacApi = new GatBlacApi();
gatBlacApi.getTeam('colo-colo',function(error,team){
  if(error){
    console.log(error);
  }
  console.log(team);
});

Indicators Api

Use the indicators api of gat-blac is simple and easy with this module, there is here an example of using this. With getIndicators Method returns an array with indicators of Chile that match with the filters

var filters = {'date':'2016-02-28'}
gatBlacApi.getIndicators(filters,function(error,indicators){
  if(error){
    console.log(error);
  }
  console.log(indicators);
});

With getInflation Method returns an array with inflation indicators of Chile that match with the filters

var filters = {'date':'2016-02-28'}
gatBlacApi.getInflation(filters,function(error,inflation){
  if(error){
    console.log(error);
  }
  console.log(inflation);
});

With getNoonIndicators Method returns an array with noon indicators of Chile that match with the filters

var filters = {'date':'2016-02-28'}
gatBlacApi.getNoonIndicators(filters,function(error,noonIndicators){
  if(error){
    console.log(error);
  }
  console.log(noonIndicators);
});

With getExchangeRate Method returns an array with noon indicators of Chile that match with the filters

var filters = {'date':'2016-02-28'}
gatBlacApi.getExchangeRate(filters,function(error,exchangeRate){
  if(error){
    console.log(error);
  }
  console.log(exchangeRate);
});

Tests

npm test

References

Release History

  • 1.0.0 Initial release
  • 1.0.1 Fix release
  • 1.0.2 Fix release
  • 1.0.3 Fix release

Keywords

FAQs

Last updated on 31 Mar 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc