How To give reward to user automatically

I Am making a app in kodular , a cricket prediction app so if anyone predict how can i make a system that when the team win his firebase data automatically gets updated?is there any way or anything related to this

You need to get an API service for that which provide you the data you require

i have api by crickbuz for getting winner but how do i make it automatic that my databse update automatically when the result is declared and to provide user reward

Search community/Google for how to implement API, there are several tutorial

i cant understand which type of api what i search

Search , how to use API in app Inventor or use API with firebase

i mean that there are several api which api what?i need something like bot you can read above

I think this is will help you:

Man i already have added auto score board app with api with json extension
But thats not my topic
Understand Calmly
I make a app with live scores
Scores is working it also show who won
But below that
I gave 2 button that enter amount you want to set on team who will win
If the team win you will get 2x
So i want it automatically rha if a team win
Automatically in background of database the data change and user get his rewards automatically

Anyone help me out