npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-gat-blac-api

v1.0.3

Published

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

Downloads

10

Readme

#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