wip
This commit is contained in:
1 parent
4f9125ef12
commit
61418c8cee
47 files changed
+726
-221
No files matched your search
@@ -2,11 +2,16 @@
|
||||
|
||||
namespace App\Console\Commands\Grapper\TxOdds;
|
||||
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_2Way;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_2WayS1;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_3Way;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_Dc;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_Dnb;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_Ggng;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_Points;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_PointsHt;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_Totals;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_TotalsHt;
|
||||
use App\Console\Commands\Grapper\TxOdds\Odds\_Tq;
|
||||
use App\Console\Commands\Nuh;
|
||||
use App\Console\Commands\Xml;
|
||||
@@ -38,52 +43,49 @@ class Odds
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* SINGLE SOCCER
|
||||
* https://xml2.txodds.com/feed/odds/xml.php?ident=betaid1&passwd=Dy59vpRC&peid=3118930
|
||||
* https://xml2.txodds.com/feed/odds_types.php
|
||||
|
||||
* SINGLE OTHER
|
||||
*************************************************
|
||||
* https://xml2.txodds.com/feed/odds/xml.php?ident=betaid2&passwd=Dy59vpRC&peid=3118930
|
||||
* BETTYPE IDS
|
||||
0 3-WAY
|
||||
1 2-WAY
|
||||
3 POINTS
|
||||
4 TOTALS
|
||||
|
||||
*************************************************
|
||||
* https://xml2.txodds.com/feed/odds_types.php
|
||||
131073 MONEY LINE - Q1
|
||||
|
||||
* BETTYPE IDS
|
||||
0 3-WAY
|
||||
1 2-WAY
|
||||
3 POINTS
|
||||
4 TOTALS
|
||||
5 Asian
|
||||
65536 3-WAY HALF TIME
|
||||
131072 3 WAY QUARTER TIME
|
||||
65539 POINTS HALF TIME
|
||||
131075 POINTS QUARTER TIME
|
||||
262147 POINTS OVER TIME
|
||||
65540 TOTALS HALF TIME
|
||||
131076 TOTALS QUARTER TIME
|
||||
262148 TOTALS OVER TIME
|
||||
11534337 GG/NG (both teams to score)
|
||||
5242880 DOUBLE CHANCE
|
||||
7340033 TO PROGRESS (to qualify)
|
||||
6291457 DRAW NO BET
|
||||
65536 3-WAY HALF TIME
|
||||
65540 TOTALS HALF TIME
|
||||
65539 POINTS HALF TIME
|
||||
|
||||
Not used:
|
||||
131075 POINTS QUARTER TIME
|
||||
131076 TOTALS QUARTER TIME
|
||||
|
||||
65537 2-WAY HALF TIME
|
||||
327680 3-WAY 2ND HALF
|
||||
327681 2-WAY 2ND HALF
|
||||
327683 POINT 2ND HALF
|
||||
327684 TOTALS 2ND HALF
|
||||
1048577 GOAL / NO GOAL
|
||||
5242880 DOUBLE CHANCE
|
||||
6291457 DRAW NO BET
|
||||
11534337 GG/NG (both teams to score)
|
||||
7340033 TO PROGRESS (to qualify)
|
||||
|
||||
2097153 ODD / EVEN
|
||||
4194304 TOTAL GOALS
|
||||
8388608 1X2 EURO HANDCIAP
|
||||
9437188 TOTAL CORNERS
|
||||
9502724 TOTAL CORNERS 1ST HALF
|
||||
20971520 3-WAY CORNERS
|
||||
28311555 HANDICAP SETS
|
||||
28311556 TOTAL SETS
|
||||
Not used:
|
||||
5 Asian
|
||||
131072 3 WAY QUARTER TIME
|
||||
262148 TOTALS OVER TIME
|
||||
262147 POINTS OVER TIME
|
||||
|
||||
65537 2-WAY HALF TIME
|
||||
327680 3-WAY 2ND HALF
|
||||
327681 2-WAY 2ND HALF
|
||||
327683 POINT 2ND HALF
|
||||
327684 TOTALS 2ND HALF
|
||||
1048577 GOAL / NO GOAL
|
||||
|
||||
2097153 ODD / EVEN
|
||||
4194304 TOTAL GOALS
|
||||
8388608 1X2 EURO HANDCIAP
|
||||
9437188 TOTAL CORNERS
|
||||
9502724 TOTAL CORNERS 1ST HALF
|
||||
20971520 3-WAY CORNERS
|
||||
28311555 HANDICAP SETS
|
||||
28311556 TOTAL SETS
|
||||
|
||||
*************************************************/
|
||||
|
||||
@@ -91,21 +93,49 @@ class Odds
|
||||
|
||||
switch (Nuh::$options['sport_id']) {
|
||||
case 1:
|
||||
$markets = '0,4,11534337,5242880,7340033,6291457';
|
||||
/**
|
||||
* 0 3-WAY
|
||||
* 4 TOTALS
|
||||
* 65536 3-WAY HALF TIME
|
||||
* 65540 TOTALS HALF TIME
|
||||
* 11534337 GG/NG (both teams to score)
|
||||
* 5242880 DOUBLE CHANCE
|
||||
* 7340033 TO PROGRESS (to qualify)
|
||||
* 6291457 DRAW NO BET
|
||||
*/
|
||||
$markets = '0,4,65536,65540,11534337,5242880,7340033,6291457';
|
||||
break;
|
||||
case 2:
|
||||
// needs check
|
||||
$markets = '0,1,3,4,262148,131072,131076';
|
||||
/**
|
||||
* 0 3-WAY
|
||||
* 1 2-WAY
|
||||
* 3 POINTS
|
||||
* 4 TOTALS
|
||||
* 131075 POINTS QUARTER TIME
|
||||
* 131076 TOTALS QUARTER TIME
|
||||
*/
|
||||
$markets = '0,1,3,4,131076,131075';
|
||||
break;
|
||||
case 3:
|
||||
// needs check
|
||||
$markets = '0,1,3,4,262147,262148,65539,65540,131075,131076';
|
||||
/**
|
||||
* 1 2-WAY
|
||||
* 3 POINTS
|
||||
* 4 TOTALS
|
||||
* 65539 POINTS HALF TIME
|
||||
* 65540 TOTALS HALF TIME
|
||||
* 131075 POINTS QUARTER TIME
|
||||
* 131076 TOTALS QUARTER TIME
|
||||
*/
|
||||
$markets = '1,3,4,65539,65540,131075,131076';
|
||||
break;
|
||||
case 5:
|
||||
$markets = '1,3,4';
|
||||
break;
|
||||
case 8:
|
||||
$markets = '0,3,4';
|
||||
/**
|
||||
* 1 2-WAY
|
||||
* 3 POINTS
|
||||
* 4 TOTALS
|
||||
* 131073 MONEY LINE - Q1
|
||||
*/
|
||||
$markets = '1,3,4,131073';
|
||||
break;
|
||||
default:
|
||||
Notice::note('sport not defined', 'r', 1);
|
||||
@@ -115,22 +145,28 @@ class Odds
|
||||
/*************************************************
|
||||
* URL
|
||||
*************************************************/
|
||||
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.Nuh::$AUTHTOKEN.'&all_odds=2&spid='.Nuh::$options['sport_id'];
|
||||
if (Nuh::$options['sport_id'] == 1) {
|
||||
$AUTHTOKEN = 'ident=betaid1&passwd=Dy59vpRC';
|
||||
} else {
|
||||
$AUTHTOKEN = 'ident=betaid2&passwd=Dy59vpRC';
|
||||
}
|
||||
$url = 'https://xml2.txodds.com/feed/odds/xml.php?'.$AUTHTOKEN.'&all_odds=2';
|
||||
|
||||
$_calls = [];
|
||||
if (Nuh::$options['id']) {
|
||||
if ($debug) {
|
||||
Notice::note('BY ID', 'p');
|
||||
}
|
||||
/**
|
||||
* BY ID
|
||||
* by SINGLE ID
|
||||
*/
|
||||
$_calls[] = $url."&ot=$markets&peid=".Nuh::$options['id'];
|
||||
} elseif (Nuh::$options['a']) {
|
||||
if ($debug) {
|
||||
Notice::note('ALL EXISTING', 'p');
|
||||
Notice::note('ALL', 'p');
|
||||
}
|
||||
/**
|
||||
* ALL EXISTING
|
||||
* ALL by ID
|
||||
*/
|
||||
$res = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->pluck('id');
|
||||
foreach ($res as $id) {
|
||||
@@ -142,8 +178,7 @@ class Odds
|
||||
}
|
||||
/**
|
||||
* PER GROUP_ID
|
||||
*
|
||||
* with from-to days
|
||||
* with from-to
|
||||
*/
|
||||
$groupids = Event::where('starttime', '>', Carbon::now()->toDateTimeString())->groupBy('group_id')->pluck('group_id');
|
||||
foreach ($groupids as $groupid) {
|
||||
@@ -158,7 +193,7 @@ class Odds
|
||||
*/
|
||||
$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;
|
||||
$_calls[] = $url.'&spid='.Nuh::$options['sport_id']."&ot=$markets&peid=".$id;
|
||||
}
|
||||
} elseif (Nuh::$options['w']) {
|
||||
if ($debug) {
|
||||
@@ -180,11 +215,9 @@ class Odds
|
||||
|
||||
* with from-to days
|
||||
*/
|
||||
$_calls[] = $url."&ot=$markets&days=".Nuh::$options['days_from'].','.Nuh::$options['days_to'].'&last='.Nuh::$options['lastcall'];
|
||||
$_calls[] = $url.'&spid='.Nuh::$options['sport_id']."&ot=$markets&days=".Nuh::$options['days_from'].','.Nuh::$options['days_to'].'&last='.Nuh::$options['lastcall'];
|
||||
}
|
||||
|
||||
dd($_calls);
|
||||
|
||||
/*************************************************
|
||||
* CALL
|
||||
*************************************************/
|
||||
@@ -276,9 +309,37 @@ class Odds
|
||||
case 0:
|
||||
_3Way::grap($odds, $offer);
|
||||
break;
|
||||
case 1:
|
||||
_2Way::grap($odds, $offer);
|
||||
break;
|
||||
case 3:
|
||||
_Points::grap($odds, $offer);
|
||||
break;
|
||||
case 4:
|
||||
_Totals::grap($odds, $offer);
|
||||
break;
|
||||
|
||||
case 131073:
|
||||
_2WayS1::grap($odds, $offer);
|
||||
break;
|
||||
|
||||
case 65536:
|
||||
_3WayHt::grap($odds, $offer);
|
||||
break;
|
||||
case 65540:
|
||||
_TotalsHt::grap($odds, $offer);
|
||||
break;
|
||||
case 65539:
|
||||
_PointsHt::grap($odds, $offer);
|
||||
break;
|
||||
|
||||
case 131075:
|
||||
_PointsQt::grap($odds, $offer);
|
||||
break;
|
||||
case 131076:
|
||||
_TotalsQt::grap($odds, $offer);
|
||||
break;
|
||||
|
||||
case 5242880:
|
||||
_Dc::grap($odds, $offer);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user