Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Live Cricket Score JSON API - Build using Deno πŸ¦•

License

Notifications You must be signed in to change notification settings

sanwebinfo/deno-cricket-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

78 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Deno Cricket API πŸ¦• 🏏

Test Lint Deno

Live Cricket Score JSON API - Build using Deno πŸ¦•

API is not working due to the Cricbuzz Mobile site being Fully Redesigned - The full Site Structure was Changed it's a bit complex to get data - Please Consider using the Python Cricket API Version - https://github.com/sanwebinfo/cricket-api

Prerequisites πŸ“•

Methods Used πŸ”§

Testing βš™

  • Development
denon run --allow-net --allow-read server.ts

or

deno task dev
  • Production
deno run --allow-net --allow-read server.ts

or

deno task start

API URL πŸ”΅

  • Live Match - http://localhost:3000/live
  • Get Match Score by ID - http://localhost:3000/match/<MatchID>

Configuration

  • Update live Match URL in /data/config.json
  • Update API Rate limits - /server.ts
  • Update CORS Headers to allow Specific websites to access the API - /lib/router.ts
  • change the Port No on server.ts file

Hosting Support and Setup πŸ“¦

You can Host this on your own server or use Deno Deploy just connect it via GitHub πŸ‘‡

  • Fork this Project on your Github Repo
  • Link your Forked Project Repo on Deno Deploy, and main Branch to deploy
  • Next, Choose the deploy option to automatic and Link the server.ts file to Start the API Server
  • Finally, Click the Link Button to Connect the repo for Continous auto deploy

Deno Deploy

Note : server.ts is the Main file to Start API server if you are Hosting this on your Server don't Forget to install deno and denon (For Local Testing)

# Production Start
deno task start

or

deno run --allow-net --allow-read server.ts
  • Download or use git to clone the Project repo on your Server
  • Create Systemd.service file to run the app forever
  • Use Nginx reverse proxy for DENO api server

self Host this API Service for 100% Uptime ⬆

  • Personally, I recommended Deno deploy - they offer a Free plan too
  • For More About Deno Deploy Refer - https://deno.com/deploy

Todo πŸ—ƒ

  • Random User Agent
  • API Caching
  • Display Live Match ID No's in seperate API router

Other Live Score API Projects πŸ—‚

Contributing

Your PR's are Welcome πŸ’š

Disclaimer ⚠

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

LICENSE β˜‘

MIT