2017 © Pedro Peláez
 

library enetpulse-parser

Enetpulse parser

image

scandesignsdk/enetpulse-parser

Enetpulse parser

  • Thursday, May 31, 2018
  • by lsv
  • Repository
  • 4 Watchers
  • 0 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 10 % Grown

The README.md

Enetpulse Parser

Build Status codecov, (*1)

Enetpulse database object builder for PHP, (*2)

Usage

composer require scandesignsdk/enetpulse-parser

Requires: PHP 7.2, (*3)

Configuration

setOddsProviderCountryNames(['Denmark', 'International']);

// Which sports do we want, get the ID from the `sport` table
$config->setSports([1]);

// We can also set specific odds providers by ID, get the ID from the table `odds_provider`
//$config->setOddsProviders([
//    1,
//    2,
//    3,
//]);

// Which tournaments do we want to see, find the ID's from the table `tournament_template`
$config->setTournamentTemplates([
    42,
    46,
    77,
    85,
    245,
    9408,
]);

?>

Events

getEventProvider()
    // Lets find the latest 10 finished events
    ->getFinishedEvents(10)
    // We could also get upcoming, live, yesterdays, today, tomorrow,
//    ->getUpcomingEvents()
//    ->getLiveEvents()
//    ->getYesterdayEvents()
//    ->getTodayEvents()
//    ->getTomorrowEvents()
;

?>
Loop through events

    <?php echo $event->getId(); ?>
    <?php $hometeam = $event->getParticipants()[0]; ?>
    Hometeam: <?php echo $hometeam->getName(); ?>
    Hometeam logo: <img src="<?php echo $hometeam->getImage(); ?>
    Hometeam result: <?php echo $hometeam->getFirstResult()->getResult(); ?>

    Hometeam odds:
        <?php foreach ($hometeam->getOdds() as $odds): ?>
            - Odds type: <?php echo $odds->getScope(); ?>-<?php echo $odds->getSubtype(); ?>
            - Offers
            <?php foreach ($odds->getOffers() as $offer): ?>
                - Odds: <?php echo $offer->getOdds(); ?> (old odds: <?php echo $offer->getOldOdds(); ?>
                - Link: <?php echo $offer->getProvider()->getUrl().$offer->getCouponkey(); ?>
                - Provider: <?php echo $offer->getProvider()->getName(); ?>
            <?php endforeach; ?>
        <?php endforeach; ?>

    <?php $awayteam = $event->getParticipants()[1]; ?>
    Awayteam: <?php echo $awayteam->getName(); ?>
    Awayteam logo: <img src="<?php echo $awayteam->getImage(); ?>
    Awayteam result: <?php echo $awayteam->getFirstResult()->getResult(); ?>

    Awayteam odds:
    <?php foreach ($awayteam->getOdds() as $odds): ?>
        - Odds type: <?php echo $odds->getScope(); ?>-<?php echo $odds->getSubtype(); ?>
        - Offers
        <?php foreach ($odds->getOffers() as $offer): ?>
            - Odds: <?php echo $offer->getOdds(); ?> (old odds: <?php echo $offer->getOldOdds(); ?>
            - Link: <?php echo $offer->getProvider()->getUrl().$offer->getCouponkey(); ?>
            - Provider: <?php echo $offer->getProvider()->getName(); ?>
        <?php endforeach; ?>
    <?php endforeach; ?>

The Versions

31/05 2018

dev-master

9999999-dev

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

24/05 2018
16/05 2018
09/05 2018
09/05 2018
09/05 2018
08/05 2018
08/05 2018
08/05 2018

0.3.3

0.3.3.0

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

07/05 2018

0.3.2

0.3.2.0

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

07/05 2018

0.3.1

0.3.1.0

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

04/05 2018

0.3

0.3.0.0

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

12/04 2018

0.2

0.2.0.0

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

12/04 2018

dev-feature/declare-strict

dev-feature/declare-strict

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk

11/04 2018

0.1

0.1.0.0

Enetpulse parser

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Aarhof @ scandesignmedia.dk