grapper betsapi
This commit is contained in:
1 parent
406fd26864
commit
a3c9f16550
127 files changed
+158128
-650
No files matched your search
@@ -14,12 +14,10 @@ class Fixtures
|
||||
public static function grap()
|
||||
{
|
||||
$debug = Nuh::$options['d'] ?? 0;
|
||||
$test = Nuh::$options['t'] ?? 0;
|
||||
$echo = Nuh::$options['e'] ?? 0;
|
||||
|
||||
$sportmap = Sport::map('bapi');
|
||||
|
||||
$total = 10;
|
||||
$total = 1;
|
||||
foreach ($sportmap as $sport_id => $betsapi_sport_id) {
|
||||
$page = 1;
|
||||
while ($page <= $total) {
|
||||
@@ -41,7 +39,7 @@ class Fixtures
|
||||
foreach ($data['results'] as $row) {
|
||||
|
||||
$event = [
|
||||
'sport_id' => (int) $row['sport_id'],
|
||||
'sport_id' => (int) $sport_id,
|
||||
'provider_id' => (int) Nuh::$options['provider_id'],
|
||||
'starttime' => Carbon::createFromTimestamp((string) $row['time'])->toDateTimeString(),
|
||||
'home' => $row['home']['name'] ?? '',
|
||||
@@ -55,7 +53,7 @@ class Fixtures
|
||||
'group_cc' => $row['league']['cc'] ?? '',
|
||||
];
|
||||
|
||||
Mapper::updateOrCreate(['betsapi_id' => (int) $row['id']], $event);
|
||||
Mapper::updateOrCreate(['event_id' => (int) $row['id']], $event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user