PHP Classes

PHP TheSportsDb: Get game information from the Sports DB site API

Recommend this page to a friend!
  Info   View files View files (103)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2016-09-24 (3 years ago) RSS 2.0 feedStarStarStar 50%Total: 107 All time: 9,274 This week: 274Up
Version License PHP version Categories
thesportsdb 1.0.8GNU General Publi...5.5PHP 5, Games, Web services
Description Author

This package can get game information from the Sports DB site API.

It can send HTTP requests to thesportsdb.com API Web server to retrieve several types of information about sports games.

Currently it can get information about sports and their leagues, seasons, teams and players.

Innovation Award
PHP Programming Innovation award nominee
June 2016
Number 8


Prize: One downloadable copy of Komodo IDE
The SportsDb is a site that uses crowd sourcing to aggregate information about games of many different sports.

This package provides means to retrieve information about sports and their leagues, seasons, teams and players from the The SportsDB site.

Manuel Lemos
  Performance   Level  
Name: Jelle Sebreghts <contact>
Classes: 7 packages by
Country: Belgium Belgium
Age: 30
All time rank: 14909 in Belgium Belgium
Week rank: 278 Up1 in Belgium Belgium Up
Innovation award
Innovation award
Nominee: 4x

Details

TheSportsDb

PHP Library to connect to the api of http://thesportsdb.com/

Example code

<?php

include_once __DIR__ . '/default_bootstrap.php';

// Get all sports.
$sports = $db->getSports();

// Print the first sport.
$sport = reset($sports);
print_r($sport->raw());

// Get the leagues of this sport (lazy loaded).
$leagues = $sport->getLeagues();

// Print the first league.
$league = reset($leagues);
print_r($league->raw());

// Get the seasons for this league.
$seasons = $league->getSeasons();

// Print the first season.
$season = reset($seasons);
print_r($season->raw());

// Get the events for this league.
$events = $season->getEvents();

// Print the first event.
$event = reset($events);
// Trigger lazy load, the full event object will be loaded when calling $event->raw().
$event->getName();
print_r($event->raw());

Code Climate Scrutinizer Code Quality Codacy Badge SensioLabsInsight Build Status

Code Coverage

  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagesrc (1 file, 3 directories)
Files folder imagetests (1 file, 1 directory)
Accessible without login Plain text file .codeclimate.ruleset.xml Data Auxiliary data
Accessible without login Plain text file .codeclimate.yml Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file default_bootstrap.php Conf. Configuration script
Accessible without login Plain text file default_bootstrap_dic.php Conf. Configuration script
Accessible without login Plain text file LICENSE Lic. License
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Data Auxiliary data

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file config.yml Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageEntity (19 files, 3 directories)
Files folder imageHttp (2 files)
Files folder imagePropertyMapper (3 files, 1 directory)
  Plain text file TheSportsDb.php Class Class source

  Files folder image Files  /  src  /  Entity  
File Role Description
Files folder imageFactory (4 files)
Files folder imageProxy (8 files)
Files folder imageRepository (16 files)
  Plain text file Entity.php Class Class source
  Plain text file EntityInterface.php Class Class source
  Plain text file EntityManager.php Class Class source
  Plain text file EntityManagerConsumerInterface.php Class Class source
  Plain text file EntityManagerConsumerTrait.php Class Class source
  Plain text file EntityManagerInterface.php Class Class source
  Plain text file EntityPropertyUtil.php Class Class source
  Plain text file Event.php Class Class source
  Plain text file EventInterface.php Class Class source
  Plain text file League.php Class Class source
  Plain text file LeagueInterface.php Class Class source
  Plain text file Player.php Class Class source
  Plain text file PlayerInterface.php Class Class source
  Plain text file Season.php Class Class source
  Plain text file SeasonInterface.php Class Class source
  Plain text file Sport.php Class Class source
  Plain text file SportInterface.php Class Class source
  Plain text file Team.php Class Class source
  Plain text file TeamInterface.php Class Class source

  Files folder image Files  /  src  /  Entity  /  Factory  
File Role Description
  Plain text file Factory.php Class Class source
  Plain text file FactoryContainer.php Class Class source
  Plain text file FactoryContainerInterface.php Class Class source
  Plain text file FactoryInterface.php Class Class source

  Files folder image Files  /  src  /  Entity  /  Proxy  
File Role Description
  Plain text file EventProxy.php Class Class source
  Plain text file LeagueProxy.php Class Class source
  Plain text file PlayerProxy.php Class Class source
  Plain text file Proxy.php Class Class source
  Plain text file ProxyInterface.php Class Class source
  Plain text file SeasonProxy.php Class Class source
  Plain text file SportProxy.php Class Class source
  Plain text file TeamProxy.php Class Class source

  Files folder image Files  /  src  /  Entity  /  Repository  
File Role Description
  Plain text file EventRepository.php Class Class source
  Plain text file EventRepositoryInterface.php Class Class source
  Plain text file LeagueRepository.php Class Class source
  Plain text file LeagueRepositoryInterface.php Class Class source
  Plain text file PlayerRepository.php Class Class source
  Plain text file PlayerRepositoryInterface.php Class Class source
  Plain text file Repository.php Class Class source
  Plain text file RepositoryContainer.php Class Class source
  Plain text file RepositoryContainerInterface.php Class Class source
  Plain text file RepositoryInterface.php Class Class source
  Plain text file SeasonRepository.php Class Class source
  Plain text file SeasonRepositoryInterface.php Class Class source
  Plain text file SportRepository.php Class Class source
  Plain text file SportRepositoryInterface.php Class Class source
  Plain text file TeamRepository.php Class Class source
  Plain text file TeamRepositoryInterface.php Class Class source

  Files folder image Files  /  src  /  Http  
File Role Description
  Plain text file TheSportsDbClient.php Class Class source
  Plain text file TheSportsDbClientInterface.php Class Class source

  Files folder image Files  /  src  /  PropertyMapper  
File Role Description
Files folder imageTransformer (1 file)
  Plain text file PropertyDefinition.php Class Class source
  Plain text file PropertyMap.php Class Class source
  Plain text file PropertyMapDefinition.php Class Class source

  Files folder image Files  /  src  /  PropertyMapper  /  Transformer  
File Role Description
  Plain text file Callback.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imagesrc (1 file, 3 directories)
  Accessible without login Plain text file autoload.php Example Example script

  Files folder image Files  /  tests  /  src  
File Role Description
Files folder imageEntity (12 files, 3 directories)
Files folder imageHttp (1 file)
Files folder imagePropertyMapper (3 files, 1 directory)
  Plain text file TheSportsDbTest.php Class Class source

  Files folder image Files  /  tests  /  src  /  Entity  
File Role Description
Files folder imageFactory (2 files)
Files folder imageProxy (8 files)
Files folder imageRepository (9 files)
  Plain text file AbstractEntityTest.php Class Class source
  Plain text file EntityManagerConsumerTraitTest.php Class Class source
  Plain text file EntityManagerTest.php Class Class source
  Plain text file EntityPropertyUtilTest.php Class Class source
  Plain text file EntityTest.php Class Class source
  Plain text file EventTest.php Class Class source
  Plain text file LeagueTest.php Class Class source
  Plain text file PlayerTest.php Class Class source
  Plain text file SeasonTest.php Class Class source
  Plain text file SportTest.php Class Class source
  Plain text file TeamTest.php Class Class source
  Plain text file TestEntity.php Class Class source

  Files folder image Files  /  tests  /  src  /  Entity  /  Factory  
File Role Description
  Plain text file FactoryContainerTest.php Class Class source
  Plain text file FactoryTest.php Class Class source

  Files folder image Files  /  tests  /  src  /  Entity  /  Proxy  
File Role Description
  Plain text file EventProxyTest.php Class Class source
  Plain text file LeagueProxyTest.php Class Class source
  Plain text file PlayerProxyTest.php Class Class source
  Plain text file ProxyTest.php Class Class source
  Plain text file SeasonProxyTest.php Class Class source
  Plain text file SportProxyTest.php Class Class source
  Plain text file TeamProxyTest.php Class Class source
  Plain text file TestEntityProxy.php Class Class source

  Files folder image Files  /  tests  /  src  /  Entity  /  Repository  
File Role Description
  Plain text file EventRepositoryTest.php Class Class source
  Plain text file LeagueRepositoryTest.php Class Class source
  Plain text file PlayerRepositoryTest.php Class Class source
  Plain text file RepositoryContainerTest.php Class Class source
  Plain text file RepositoryTest.php Class Class source
  Plain text file SeasonRepositoryTest.php Class Class source
  Plain text file SportRepositoryTest.php Class Class source
  Plain text file TeamRepositoryTest.php Class Class source
  Plain text file TestRepository.php Class Class source

  Files folder image Files  /  tests  /  src  /  Http  
File Role Description
  Plain text file TheSportsDbClientTest.php Class Class source

  Files folder image Files  /  tests  /  src  /  PropertyMapper  
File Role Description
Files folder imageTransformer (1 file)
  Plain text file PropertyDefinitionTest.php Class Class source
  Plain text file PropertyMapDefinitionTest.php Class Class source
  Plain text file PropertyMapTest.php Class Class source

  Files folder image Files  /  tests  /  src  /  PropertyMapper  /  Transformer  
File Role Description
  Plain text file CallbackTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:107
This week:0
All time:9,274
This week:274Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:62%StarStarStarStar
Documentation:-
Examples:66%StarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2334
  

For more information send a message to info at phpclasses dot org.