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

ape-cricket

v1.1.7

Published

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

Downloads

10

Readme

ape-cricket

NPM

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

Build Status npm version Node.js Version Known Vulnerabilities

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.news( ) provides updated cricket news
  • apecricket.upcomingMatches( ) provides upcoming match fixtures
  • apecricket.cricketScore( ) provides detailed score card of the match
  • apecricket.playerStats( ) provides players carrer info and stats
  • apecricket.playerFinder( ) provides players ids matching given name string
  • 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
});

news

//user api_key
var api_key = "TESTKEY0273"
// calling a endpoint to get response.
apecricket.news( 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
});

playerfinder

//user api_key
var api_key = "TESTKEY0273"
// player id
var name = "sach";
// calling a endpoint to get response.
apecricket.playerFinder( api_key, name , function(response){ 
   // response will be json data of matching player ids
});

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);
});