Download the PHP package andreskrip/sstats-api-client without Composer
On this page you can find all versions of the php package andreskrip/sstats-api-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download andreskrip/sstats-api-client
More information about andreskrip/sstats-api-client
Files in andreskrip/sstats-api-client
Package sstats-api-client
Short Description Laravel client for the SStats.net Football API — matches, live odds, statistics, Glicko-2
License MIT
Informations about the package sstats-api-client
SStats.net API Client for Laravel
A Laravel package for the SStats.net Football API — match data, pre-match and live odds, statistics, profits, and Glicko-2 ratings.
The API is free to use with rate limiting: 300 req/min shared or 30 req/min per IP without key, 150 req/min with a personal API key.
Requirements
| Package version | PHP | Laravel |
|---|---|---|
| 2.x | ^8.3 | 13 |
| 1.x | ^8.3 | 11, 12, 13 |
Installation
Publish the config file:
Configuration
Add to your .env:
config/sstats.php:
The API key is optional — omit it to use the public rate limit. When provided, it is sent as an Authorization: ApiKey <key> header on every request.
Usage
Via Facade
Via Dependency Injection
Return Values
Every resource method (except ExcelResource, which returns a raw CSV/text string) returns an Illuminate\Support\Collection built from the response's data key, so you can chain the usual collection methods:
Error Handling
- A response with
status: "error"throwsAndreskrip\SstatsApiClient\Exceptions\SstatsApiException, carrying the API'smessage. - HTTP-level failures (4xx/5xx) throw
Illuminate\Http\Client\RequestException. - Network-level failures (timeouts, DNS, connection refused) throw
Illuminate\Http\Client\ConnectionException.
Resources
Account
Games
Leagues
Odds
Players
Teams
Seasons
Ls (LiveScore)
Pari
Excel
Endpoints designed for use in Excel spreadsheets (DeluX).
Testing
Changelog
See CHANGELOG.md.
License
MIT. See LICENSE.