Open hirenbhuva1993 opened 6 years ago
All information is in Readme.md file. Just replace "open sesame" with your token and you will be able to make API calls. Tests are working with php-unit.
Are there any other examples the one you provide works perfectly but wondered if there were a few more examples people could share as examples of how this works...
/**
* @param string $code
* @param \DateTime $start
* @param \DateTime $end
* @return array
* @throws \SportMonks\API\Exceptions\MissingParameterException
*/
private function getFixtureByDate($code, $start, $end = null)
{
$rateLimit = null;
$cache = $this->getData($code);
if(is_null($cache)) {
$include = [
'query' => [
'include' => 'substitutions,goals,cards,corners,stats,comments,tvstations,referee,odds,group' // up to 10
]
];
$data = [];
do {
if(is_null($end)){
$data = array_merge($data, $this->api->fixtures()->date()->day($start, $include));
}else{
$data = array_merge($data, $this->api->fixtures()->between()->period($start, $end, null, $include));
}
} while ($this->api->fixtures()->between()->NextPage($include));
}
$rateLimit = (int)$this->api->getRateLimitRemaining();
return [
$rateLimit,
$data
];
}
Fixtures by date and period.
Thanks - useful.
I have downloaded the API.
But, I'm not able to create how-to call and configure this API.
I don't know how can I use FunctionalTest.php.
So please guide me for the same. Like what is the API call and request URL.