Live Cricket Score App

How to develop Live Cricket Score app?

Feb. 20, 2018

author image

Arun

Cricket has 2.5 Billion followers, also it is the second popular sport in the world. Football (Soccer) in first place with 4 Billion followers all over the world. Cricket is more popular in former British colonies such as India, Sri Lanka, Bangladesh, Pakistan, and Australia. As cricket has many followers, we have a massive marketplace in a field of the Cricket. For cricket enthusiasts, the best entertainment is to enjoy live cricket matches on their TV screens, but if they fail to see it on television, technology has built a pathway to access the online live cricket scores and other sports like Football, Hockey, Tennis, Kabaddi, etc. Let’s see how to develop a Live Cricket Score app. In this article, I’m using one of the top cricket live score provider Roanuz Cricket API, to explain you on how to create a Live Cricket score web application. Note: This tutorial will not conclude on the complete development of all widgets shown on above image. But it will help you build one widget.

Step 1: Create a new App on Roanuz Cricket API

Roanuz Cricket API provides Live Cricket Scores, News feeds, Ready to Go Cricket related Answers and Metrics, Historical Statistics of Player and Team, and Players Performance TimeLine. With the coverage of all essential cricket Seasons and Tournaments from ICC, IPL, T20, ICE T20, BBL, PSL and CL Matches. Therefore, Roanuz Cricket API provides accurate real time data for significant cricket leagues. They offer easy to use HTTP REST based API, which of-course can be used in Android, Ios, MacOS, Windows, Web browser Application, etc. Follow the simple steps to get Roanuz Cricket API Access Key & Secret Key:
  1. Get Enrolled with Roanuz Cricket API using following Link: https://www.cricketapi.com/register/
  2. Fill the missing information on My Apps page to get the Access Token for your App.
Now you should be able to see the Access key and Secret key in your App Details page mentioned below.

Step 2: Start the development

Download the get start project from here or clone using the following command
git clone [https://github.com/roanuz/cricketapi-nodejs.git](https://github.com/roanuz/cricketapi-nodejs.git)  
cd cricketapi-nodejs
This sample code uses NODEJS, Nunjucks and Memcache to develop a sports App to show Live Cricket Score using Roanuz Cricket API apis. Install the dependencies Run following command to install all required library dependencies
npm install

Initial configuration

Create a .env file with following information on the root folder
SC_APP_ID = your_app_id  
SC_ACCESS_KEY = your_access_key  
SC_SECRET_KEY = your_secret_key  
SC_PORT = any port default 4000

Running the application

Run the server using the following command:
npm start
The server starts running on port 4000. Go to the browser and type the following url:
http://localhost:4000/

Match Widget Result

http://localhost:4000/match/<match_key>/ match_key: Any available match key on Roanuz CricketAPI In this match widget we used Match API. You can test your application with all free apis provided by Roanuz CricketAPI.

And other batteries

Roanuz CricketAPI developed one more open-source project named cricket-html-template. It is a standalone HTML5 and CSS3 template. It has more than 6 color theme css. You can get it from [here(https://github.com/roanuz/cricket-html-template.git)] or clone using the following command:
git clone [https://github.com/roanuz/cricket-html-template.git](https://github.com/roanuz/cricket-html-template.git)
Roanuz CricketAPI shared lots of getting start code for different languages. Here is the list:
  1. Python: https://github.com/roanuz/py-cricket
  2. Socket: https://github.com/roanuz/cricketapi-websocket
  3. Wordpress: https://github.com/roanuz/cricket-wordpress
  4. Php: https://github.com/roanuz/php-cricket
  5. Django: https://github.com/roanuz/py-cricket-django
This template consists of live match score, recent matches, recent seasons, monthly schedule, points table, player/team stats, team squad, full page scorecard designs. It supports to show real time data pretty as much as possible from apis provided by Roanuz CricketAPI. Note: Generally Live Cricket Score websites are hitting huge traffic, Hence they earn money thru_ Google AdSense (digital marketing platform). You can follow us here on click the green heart if you found this helpful so our developer circle can make use of this. Also follow us on Facebook and twitter.