wip
This commit is contained in:
1 parent
8a5a3e679f
commit
b3318b1c03
13 files changed
+100
-96
No files matched your search
@@ -119,18 +119,28 @@ class Odds
|
||||
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.Nuh::$AUTHTOKEN.'&all_odds=2&spid='.Nuh::$options['sport_id'];
|
||||
$_calls = [];
|
||||
if (Nuh::$options['event_id']) {
|
||||
// by id
|
||||
$_calls[] = $url."&ot=$markets&peid=".Nuh::$options['event_id'];
|
||||
} elseif (Nuh::$options['a']) {
|
||||
// all existing
|
||||
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->pluck('id');
|
||||
foreach ($res as $id) {
|
||||
$_calls[] = $url."&ot=$markets&peid=".$id;
|
||||
}
|
||||
} elseif (Nuh::$options['b']) {
|
||||
// one day
|
||||
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(1)->toDateTimeString())->pluck('id');
|
||||
foreach ($res as $id) {
|
||||
$_calls[] = $url."&ot=$markets&peid=".$id;
|
||||
}
|
||||
} elseif (Nuh::$options['w']) {
|
||||
// one week
|
||||
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->where('starttime', '<', Carbon::now()->addDays(7)->toDateTimeString())->pluck('id');
|
||||
foreach ($res as $id) {
|
||||
$_calls[] = $url."&ot=$markets&peid=".$id;
|
||||
}
|
||||
} else {
|
||||
// all with lastcall
|
||||
$_calls[] = $url."&ot=$markets&last=".Nuh::$options['lastcall'];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user