Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 772 Bytes

01-usage.md

File metadata and controls

37 lines (24 loc) · 772 Bytes

Using SportMonksFootball PHP API

Requirements

  • PHP 8.1 or higher.

API Key

A key is required to be able to make requests to the API. You must sign up for a SportMonks account to get one.

Installation

Install the library via Composer:

composer require programmatordev/sportmonksfootball-php-api

Basic Usage

Simple usage looks like:

use ProgrammatorDev\SportMonksFootball\SportMonksFootball;

// initialize
$api = new SportMonksFootball('yourapikey');

// get all livescores of the current day
$livescores = $api->livescores()->getAll();