Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cricket-api-node

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cricket-api-node

Build a Live Cricket Score JSON API by using this Node Module.

  • 1.0.2
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Cricket API Node 🏏

Score Test dependencies Status

Build a Live Cricket Score JSON API by using this Node Module.

Requirements 📦

  • Node.js 12X LTS or 14X LTS

Installation 🍔

  • Insall via NPM
npm install cricket-api-node

OR

yarn add cricket-api-node

Usage 📝

  • Get Live Match Score
const score = require('cricket-api-node');

score.match('<Live Match URL from cricbuzz>');

This is My Experimenting npm Module for Build an API using Express.js

const express = require('express');
const cors = require('cors');
const score = require('cricket-api-node');

const app = express();
const port = process.env.PORT || 4000;
app.use(cors());

app.listen(port, function () {
    console.log('listening on port ' + port);
});

function customHeaders(req, res, next) {
    app.disable('x-powered-by');
    res.setHeader('X-Powered-By', 'Live Score API');
    next();
}
app.use(customHeaders);

app.get('/', async (req, res) => {
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Access-Control-Allow-Headers,Content-Type,Access-Control-Allow-Methods, Authorization, X-Requested-With');
    res.header('Access-Control-Allow-Methods', 'GET');
    res.header('X-Frame-Options', 'DENY');
    res.header('X-XSS-Protection', '1; mode=block');
    res.header('X-Content-Type-Options', 'nosniff');
    res.header('Strict-Transport-Security', 'max-age=63072000');
    res.header('Content-Type', 'application/json');
    const LIVE_MATCH = "<URL OF CRICKET API>";
    score.match(LIVE_MATCH).then(live => {
        res.send(live);
      });
});

API Library 🗃

Disclaimer 🗃

  • This is not an Offical CLI tool from Cricbuzz - it's an Unofficial CLI tool and API
  • This is for Education Purpose only - use at your own risk on Production Site

All Credits Goes to https://www.cricbuzz.com/

My other Projects 🤓

#Project NameDescription
01Live Cricket Score Static SiteA Simple Scrape Method - Fetch the Live Cricket Score from espncricinfo.com using Nodejs and Cheerio.js
02IPL SpecialCricket API for Get the Live IPL Cricket Score
03Live IPL Score Update on TelegramGet Live IPL cricket Score on Telegram
04Live Cricket Score Wordpress Plugin (JS Version)Get Live Cricket Score on Wordpress site call API using Javascript Fetch API
05Live Cricket Score Wordpress Plugin (Wp Remote URL)Get Live Cricket Score on Wordpress site call API using Wordpress HTTP Remote URL
06PWA Web AppReal-time Live Cricket Score Web app + PWA Built using Nuxt.js

LICENSE 📕

MIT

Keywords

FAQs

Package last updated on 04 Apr 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc