Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default searchGame() ordering should be blank, not release date #1

Closed
louis-marchant opened this issue Feb 12, 2017 · 0 comments
Closed

Comments

@louis-marchant
Copy link
Contributor

Hey nice API wrapper!,

I noticed that in the following line of code:

public function searchGames($search, $fields = ['*'], $limit = 10, $offset = 0, $order = 'release_dates.date:desc')

You set the default search ordering to be 'release_dates.date:desc'. 9 times out of 10, I think this produces results you don't want, for example, upon searching "The Witcher 3", I get this:

[ { "id": 2933, "name": "Kingdom Hearts III" }, { "id": 13165, "name": "The Guild 3" }, { "id": 12579, "name": "Danganronpa V3: Killing Harmony" }, { "id": 7333, "name": "Crackdown 3" }, { "id": 18980, "name": "Warhammer 40,000: Dawn of War III" }, { "id": 11806, "name": "Dark Cloud 3" }, { "id": 17583, "name": "SpellForce 3" }, { "id": 13215, "name": "Cossacks 3" }, { "id": 13163, "name": "Syberia 3" }, { "id": 11542, "name": "Shenmue III" } ]

Whereby the real result I clearly wanted is absent, since the game is "too old".

I'd recommend changing it to be "null" since the ordering is not a required parameter, but I'm not sure if that will break your code. (I am currently using my own API wrapper).

messerli90 added a commit that referenced this issue Jun 1, 2017
default ordering no longer 'release_dates.date:desc' closes #1
messerli90 pushed a commit that referenced this issue Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant