Skip to content

Commit

Permalink
docs: updated base configuration, resource methods and other improvem…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
andrepimpao committed May 16, 2024
1 parent fb4af91 commit b0c0ca4
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 407 deletions.
23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,24 @@ You must sign up for a [SportMonks account](https://www.sportmonks.com/football-

## Installation

You can install the library via [Composer](https://getcomposer.org/):
Install the library via [Composer](https://getcomposer.org/):

```bash
composer require programmatordev/sportmonksfootball-php-api
```

To use the library, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```php
require_once 'vendor/autoload.php';
```

## Basic Usage

Simple usage looks like:

```php
use ProgrammatorDev\SportMonksFootball\Config;
use ProgrammatorDev\SportMonksFootball\SportMonksFootball;

// Initialize
$sportMonksFootball = new SportMonksFootball(
new Config([
'applicationKey' => 'yourappkey'
])
);
// initialize
$api = new SportMonksFootball('yourapikey');

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

## Documentation
Expand All @@ -59,7 +48,7 @@ $livescores = $sportMonksFootball->livescores()->getAll();
- [Odds](docs/03-supported-endpoints.md#odds-endpoints)
- [Core](docs/03-supported-endpoints.md#core-endpoints)
- [Error Handling](docs/04-error-handling.md)
- [Objects](docs/05-objects.md)
- [Entities](docs/05-entities.md)

## Contributing

Expand Down
21 changes: 5 additions & 16 deletions docs/01-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,22 @@ You must sign up for a [SportMonks account](https://www.sportmonks.com/football-

## Installation

You can install the library via [Composer](https://getcomposer.org/):
Install the library via [Composer](https://getcomposer.org/):

```bash
composer require programmatordev/sportmonksfootball-php-api
```

To use the library, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```php
require_once 'vendor/autoload.php';
```

## Basic Usage

Simple usage looks like:

```php
use ProgrammatorDev\SportMonksFootball\Config;
use ProgrammatorDev\SportMonksFootball\SportMonksFootball;

// Initialize
$sportMonksFootball = new SportMonksFootball(
new Config([
'applicationKey' => 'yourappkey'
])
);
// initialize
$api = new SportMonksFootball('yourapikey');

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

0 comments on commit b0c0ca4

Please sign in to comment.