Comments (3)
Seems like grambas/football-data is currently based on and older version of guzzlehttp.
I had the same issue (in guzzle 6.2) and found the solution within the ServiceProvider (FootballDataServiceProvider).
You should probably use an older version of guzzle or wait for an update.
(Not quite sure, but I think something around guzzle 5.3 should work.)
If you don't want to use any of these two options you can do the changes mentioned below. (But I don't recommend it!)
@grambas Are you currently using this container by yourself and if so: Which version of guzzle are you are running on?
If you don't want to wait or use an older version of guzzlehttp you can do the following changes.
Instead of
[...] 'base_url' => 'http://api.football-data.org/', [...]
it must be called
[...] 'base_uri' => 'http://api.football-data.org/', [...]
reference:
New documentation (Guzzle 6)
Old documentation (Guzzle 5.3)
Had problems using the method json()
afterwards as well.
Used getBody()->getContents();
instead and it worked just fine.
For example to request the leagues, use this within the FootballData class:
$leagues = $this->client->get("{$v}/competitions")->getBody()->getContents();
from football-data.
Thank you @timmep90 for helping me out.
I'm using a older guzzle version now. But it would be nice if @grambas could have a look at it.
I'm new in using packages in laravel and need some more experience with it to handle such things with routine. ;)
from football-data.
I have just released first stable version. I changed and added some missing request with filters. All information you will find in readme file Now this package will work correctly with Guzzle >6.0. Just add "guzzlehttp/guzzle": "~6.0" to your composer.json
from football-data.
Related Issues (7)
- Installation Problem HOT 3
- Latest commit not on composer HOT 1
- Logo HOT 1
- where to put api key? HOT 1
- Getting Old Data HOT 1
- Live matches
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from football-data.