Socket
Socket
Sign inDemoInstall

ape-cricket

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ape-cricket

This is a live cricket api provides data using crickapi.com


Version published
Maintainers
1
Install size
12.1 kB
Created

Readme

Source

ape-cricket npm version

NPM

The ape-cricket is a rest-api exported as Node.js module.

Description

The ape-cricket uses cricapi, Free to use, super-high bandwidth, high performance Cricket API. Targeted at Developers and Cricket lovers.
The endpoints exposed are as follows:

  • apecricket.schedule( ) provides international fixtures
  • apecricket.cricket( ) provides live scrores of ongoing match
  • apecricket.upcomingMatches( ) provides upcoming match fixtures
  • apecricket.cricketScore( ) provides detailed score card of the match
  • apecricket.playerStats( ) provides players carrer info and stats
  • apecricket.fantasySummary( ) provides match info and stats
  • apecricket.fantasySquad( ) provides team players info

In order to use the above endpoints, u need to have an api_key which can use generated by signing into cricpapi. For testing purpose can use test_api_key "TESTKEY0273"

Installation

Installation is done using the npm install command:

$ npm install ape-cricket
In Node.js:
// Load the full build. 
var apecricket = require("ape-cricket");
schedule
//user api_key
var api_key = "TESTKEY0273"
// calling a endpoint to get response.
apecricket.schedule( api_key, function(response){ 
    // response will be json data of upcoming cricket matches
});
cricket
//user api_key
var api_key = "TESTKEY0273"
// calling a endpoint to get response.
apecricket.cricket( api_key, function(response){ 
    // response will be json data of upcoming cricket matches
});
upcomingMatches
//user api_key
var api_key = "TESTKEY0273"
// calling a endpoint to get response.
apecricket.upcomingMatches( api_key, function(response){ 
    // response will be json data of upcoming cricket matches
});

The endpoints cricketScore() and playerStats() require a string input field "unique_id" and "pid"(player_id). "unique_id" for each match is available from the cricket() endpoint response. and for "pid"(player_id) need to visit cricapi players page. usage is as follows:

cricketScore
//user api_key
var api_key = "TESTKEY0273"
//match id
var unique_id = "1123492"
// calling a endpoint to get response.
apecricket.cricketScore( api_key, unique_id , function(response){ 
   // response will be json data of mentioned unique_id
});
playerStats
//user api_key
var api_key = "TESTKEY0273"
// player id
var pid = 35320;
// calling a endpoint to get response.
apecricket.playerStats( api_key, pid , function(response){ 
   // response will be json data of mentioned player
});
Fantasy API are billable since they're designed to help you generate income by running Fantasy Cricket portals.

Each hit is 1 credit. You get 250 credits free. Deducted from your prepaid account.

fantasySummary
//match id
var unique_id = "1123492"
// calling a endpoint to get response.
apecricket.fantasySummary(api_key, unique_id, function (response) {
   // response will be json data of mentioned unique_id
   console.log(response);
});
fantasySquad
//match id
var unique_id = "1123492"
// calling a endpoint to get response.
apecricket.fantasySquad(api_key, unique_id, function (response) {
   // response will be json data of mentioned unique_id
   console.log(response);
});

Keywords

FAQs

Last updated on 10 May 2018

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