wip
This commit is contained in:
1 parent
4184acdb8a
commit
8f1aeafe46
10 files changed
+136
-55
No files matched your search
@@ -17,12 +17,10 @@ class Bwin
|
||||
|
||||
$sportmap = Sport::map('bwin');
|
||||
|
||||
$sportmap = [4];
|
||||
|
||||
$total = 1;
|
||||
foreach ($sportmap as $sport_id => $bwin_sport_id) {
|
||||
foreach ($sportmap as $bwin_sport_id) {
|
||||
|
||||
$page = 1;
|
||||
$total = 10;
|
||||
|
||||
/**
|
||||
* BWIN ODDS & BETRADAR ID (per page)
|
||||
@@ -32,24 +30,25 @@ class Bwin
|
||||
|
||||
while ($page <= $total) {
|
||||
|
||||
if ($debug) {
|
||||
Notice::note("Page: $page \Sport: $bwin_sport_id", 'b');
|
||||
}
|
||||
|
||||
$url = str_replace('###page###', $page, $base_url);
|
||||
|
||||
$data = Curl::load($url);
|
||||
|
||||
if (! isset($data['pager'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$total = round($data['pager']['total'] / $data['pager']['per_page']);
|
||||
|
||||
if ($debug) {
|
||||
Notice::note("Page: $page \nTotal: $total");
|
||||
if (isset($data['pager'])) {
|
||||
$total = round($data['pager']['total'] / $data['pager']['per_page']);
|
||||
}
|
||||
|
||||
$page++;
|
||||
|
||||
if (isset($data['results'])) {
|
||||
foreach ($data['results'] as $event) {
|
||||
if ($debug && isset($event['HomeTeam'])) {
|
||||
Notice::note($event['RegionName'].'-'.$event['SportName']."\n".$event['HomeTeam'].' - '.$event['AwayTeam']);
|
||||
}
|
||||
|
||||
$betsapi_id = $event['our_event_id'] ?? 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user