hristonev / sportmonks-client-bundle

Easily talk to an SportMonks API in PHP
MIT License
14 stars 7 forks source link

Adding parameters to the request along with Includes #14

Closed ils-rahulm closed 5 years ago

ils-rahulm commented 5 years ago

While trying to include parameters such as league_id in the fixture by date along with include, it doesn't give requested data.

hristonev commented 5 years ago

There is no include league_id, You can include league as well.

ils-rahulm commented 5 years ago

I was trying to get specific league data, Unfortunately, was doing it all wrong.

I am now able to get that working using this

$matches = $client->fixtures()->date()->day( $date_object, [ 'query' => [ 'include' => 'localTeam,visitorTeam', 'leagues' => $league_id ], ]);