fix supervisor grapper vaiables
This commit is contained in:
1 parent
93febce6fb
commit
ae13d0b1f9
8 files changed
+97
-89
No files matched your search
@@ -17,7 +17,7 @@ class Betsapi
|
||||
{
|
||||
$debug = Nuh::$options['d'] ?? 0;
|
||||
if ($debug) {
|
||||
Notice::note(Nuh::$options['provider']['name'].' '.Nuh::$options['name'], 'b');
|
||||
Notice::note(Nuh::$options['provider'].' '.Nuh::$options['name'], 'b');
|
||||
}
|
||||
|
||||
switch (Nuh::$options['name']) {
|
||||
|
||||
@@ -21,6 +21,10 @@ class Fixtures
|
||||
$today = Nuh::$options['t'] ?? 0;
|
||||
$week = Nuh::$options['w'] ?? 0;
|
||||
|
||||
if ($debug) {
|
||||
Notice::note('TXODDS FIXTURES', 'b');
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$total_soccer = 0;
|
||||
$total_others = 0;
|
||||
@@ -38,15 +42,13 @@ class Fixtures
|
||||
}
|
||||
|
||||
$sports = Sport::where('is_active', 1)->pluck('id')->toArray();
|
||||
|
||||
/**
|
||||
* Grap
|
||||
*/
|
||||
$AUTHTOKEN = [
|
||||
'SOCCER' => 'ident=betaid1&passwd=Dy59vpRC',
|
||||
'OTHER' => 'ident=betaid2&passwd=Dy59vpRC',
|
||||
];
|
||||
$kontos = ['soccer' => config('env.txodds_betaid1'), 'other' => config('env.txodds_betaid2')];
|
||||
|
||||
foreach ($AUTHTOKEN as $konto => $authentication) {
|
||||
foreach ($kontos as $authentication) {
|
||||
// code...
|
||||
|
||||
if ($today) {
|
||||
|
||||
@@ -37,7 +37,7 @@ class Odds
|
||||
$debug = Nuh::$options['d'] ?? 0;
|
||||
|
||||
if ($debug) {
|
||||
Notice::note('txodd odd sport: '.Nuh::$options['sport_id'], 'b');
|
||||
Notice::note('TXODD ODD sport: '.Nuh::$options['sport_id'], 'b');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,13 +66,11 @@ class Odds
|
||||
* URL
|
||||
*************************************************/
|
||||
if (Nuh::$options['sport_id'] == 1) {
|
||||
$AUTHTOKEN = 'ident=betaid1&passwd=Dy59vpRC';
|
||||
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.config('env.txodds_betaid1').'&all_odds=2';
|
||||
} else {
|
||||
$AUTHTOKEN = 'ident=betaid2&passwd=Dy59vpRC';
|
||||
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.config('env.txodds_betaid2').'&all_odds=2';
|
||||
}
|
||||
|
||||
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.$AUTHTOKEN.'&all_odds=2';
|
||||
|
||||
$_calls = [];
|
||||
|
||||
$sport = '&spid='.Nuh::$options['sport_id'];
|
||||
|
||||
@@ -27,18 +27,27 @@ class Supervisorctl
|
||||
|
||||
$supervisor = Supervisor::with('sport')->with('provider')->find(self::$code)->toArray();
|
||||
|
||||
$options['name'] = $supervisor['name'];
|
||||
$options['sport_id'] = $supervisor['sport_id'];
|
||||
$options['txodds_market_id'] = $supervisor['txodds_market_id'];
|
||||
$options['sleep'] = $supervisor['sleep'];
|
||||
$options['lastcall'] = $supervisor['lastcall'];
|
||||
$options['commandline_options'] = $supervisor['commandline_options'];
|
||||
$options['is_active'] = $supervisor['is_active'];
|
||||
$options['days_from'] = $supervisor['days_from'];
|
||||
$options['days_to'] = $supervisor['days_to'];
|
||||
$options['is_supervisor'] = $supervisor['is_supervisor'];
|
||||
|
||||
if (isset($supervisor['sport']['name'])) {
|
||||
$supervisor['sport'] = $supervisor['sport']['name'];
|
||||
$options['sport'] = $supervisor['sport']['name'];
|
||||
}
|
||||
|
||||
if ($supervisor['provider']) {
|
||||
$supervisor['provider_id'] = $supervisor['provider']['id'];
|
||||
$supervisor['base_url'] = $supervisor['provider']['base_url'];
|
||||
$supervisor['provider'] = $supervisor['provider']['name'];
|
||||
$options['provider_id'] = $supervisor['provider']['id'];
|
||||
$options['provider'] = $supervisor['provider']['name'];
|
||||
$options['base_url'] = $supervisor['provider']['base_url'];
|
||||
}
|
||||
|
||||
$options = array_merge($options, $supervisor);
|
||||
|
||||
if ($maker) {
|
||||
SupervisorMaker::run($supervisor);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user