You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,17 +10,12 @@ A convenient API wrapper for the Odds API, designed for Composer environments su
10
10
## About "The Odds API"
11
11
[The Odds API](https://the-odds-api.com/) is a simple and very well-documented API, allowing for fast, low-cost integration. It covers over 70 sports and over 40 bookmakers - with a continuing expanding offering. The Odds API is an Australian company based in Melbourne since 2017.
12
12
13
-
## So why make a wrapper
14
-
A wrapper simplifies the usage and implementation of powerful APIs like "The Odds API" It abstracts the complexities of direct API interactions, providing a more user-friendly interface for us developers.
13
+
## Why a Wrapper?
14
+
A wrapper simplifies the usage and implementation of powerful APIs like "The Odds API". It abstracts the complexities of direct API interactions, providing a more user-friendly interface for us developers.
15
15
16
16
# Contribution Guide
17
17
This is an open-source project, so contributions are welcome! Whether you want to add new features, fix bugs, or improve documentation, your help is appreciated. Submit your PR for review and I will review them as soon as possible.
18
18
19
-
**Sport Enum opportunity**
20
-
This package uses an enum to define the sports you can pass to the endpoints, this ensures you don't make a typo or have
21
-
to worry about remembering the exact grammar. Currently, there are only a couple sports so if you need the support for more,
You can simply create a new Client, passing in your api key and that's it! You can decide to bind the class in
38
-
your `AppServiceProvider`, but if not, the client can easily be initialised in any `__invoke` or `__construct`
32
+
You can simply create a new Client, passing in your api key and that's it!
39
33
```php
40
34
$client = new OddsClient(config('odds-api.api_key'));
41
35
42
-
$response = $client->setRegion('us')
36
+
$response = $client->setRegion('au')
43
37
->dateFormat('iso')
44
38
->getOddsForSport(SportsEnum::RUGBYLEAGUE_NRL);
45
39
@@ -86,8 +80,8 @@ This avoids having to define these on each request, but they can be overwritten
86
80
To help manage your quota, there are helpers that you can call to return the number of requests used and remaining. Checkout the `UseHandleHeaders` trait, which
87
81
can be called on any `OddsClient` instant.
88
82
89
-
Also, if this API ever becomes outdated for a small period of time, and you require to use new parameters, you can utilise
90
-
the `addParams()` function, which accepts an array where you can pass any new parameters.
83
+
Also, if this API ever becomes outdated for a small period of time and you need to add new parameters, you can utilise
84
+
the `addParams()` function, which accepts an array.
0 commit comments