2017 © Pedro Peláez
 

project laravel-sportmonks-soccer

Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama

image

kirill-latish/laravel-sportmonks-soccer

Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama

  • Thursday, July 26, 2018
  • by kirill-latish
  • Repository
  • 2 Watchers
  • 5 Stars
  • 456 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 18 Forks
  • 0 Open issues
  • 10 Versions
  • 38 % Grown

The README.md

Laravel Sportmonks Soccer API

Laravel wrapper for Sportmonks (live) score API calls. Documentation for the API can be found here, (*1)

Installation

1- Require the package via Composer in your composer.json., (*2)

{
  "require": {
    "kirill-latish/laravel-sportmonks-soccer": "^2.0"
  }
}

2- Run Composer to install or update the new requirement., (*3)

$ composer install

or, (*4)

$ composer update

3- Add the service provider to your app/config/app.php file, (*5)

Sportmonks\SoccerAPI\SoccerAPIServiceProvider::class,

4- Add the facade to your app/config/app.php file, (*6)

'SoccerAPI' => Sportmonks\SoccerAPI\Facades\SoccerAPI::class,

5- Publish the configuration file, (*7)

$ php artisan vendor:publish --provider="Sportmonks\SoccerAPI\SoccerAPIServiceProvider"

6- Review the configuration file and add your token (preferably through env: 'api_token' => env('API_TOKEN') ), (*8)

config/soccerapi.php

7- Review the configuration file and add your timezone (preferably through config file: 'timezone' => config('app.timezone') ), (*9)

config/soccerapi.php

Usage

Refer to the official docs as to which calls can be made and check the calls in traits under Sportmonks\SoccerAPI\Requests., (*10)

For example, get all leagues (if using facade):, (*11)

use SoccerAPI;

...

$response = SoccerAPI::leagues()->all();

The above returns an object containing a data array. If you want to directly retrieve the data within data, change your config file: 'without_data' => true, (*12)

Get a match by its id:, (*13)

$response = SoccerAPI::fixtures()->byId($id);

If you need to include other relations (check the official docs for which relations can be included):, (*14)

$include = 'league,fixtures';
// Or: $include = ['league', 'fixtures'];

$response = SoccerAPI::seasons()->setInclude($include)->all();

The Versions

26/07 2018

dev-master

9999999-dev

Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges
by Kirill Latish

laravel framework soccer live-scores

09/05 2018

v2.0.2

2.0.2.0

Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges
by Kirill Latish

laravel framework soccer live-scores

16/06 2017

v2.0.1

2.0.1.0

Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges
by Kirill Latish

laravel framework soccer live-scores

06/06 2017

v2.0.0

2.0.0.0

Laravel wrapper for Soccerama score API calls v2.0. Fork of rebing/laravel-soccerama

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges
by Kirill Latish

laravel framework soccer live-scores

22/11 2016

v1.0.2

1.0.2.0

Laravel wrapper for Soccerama score API calls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges

laravel framework soccer live-scores

27/09 2016

v1.0.1

1.0.1.0

Laravel wrapper for Soccerama score API calls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges

laravel framework soccer live-scores

25/09 2016

v1.0

1.0.0.0

Laravel wrapper for Soccerama score API calls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges

laravel framework soccer live-scores

25/09 2016

dev-develop

dev-develop

Laravel wrapper for Soccerama score API calls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges

laravel framework soccer live-scores

25/09 2016

v0.2

0.2.0.0

Laravel wrapper for Soccerama score API calls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges

laravel framework soccer live-scores

25/09 2016

v0.1

0.1.0.0

Laravel wrapper for Soccerama score API calls

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mikk Mihkel Nurges

laravel framework soccer live-scores