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

Unable to perform expanded filtered query. #37

Open
eyeruleall opened this issue Jan 25, 2020 · 2 comments
Open

Unable to perform expanded filtered query. #37

eyeruleall opened this issue Jan 25, 2020 · 2 comments

Comments

@eyeruleall
Copy link

The two 'where' statements below are straight from the filters section of the igdb documentation. One works, the commented out one doesn't. None of the example queries showing how to query an expanded field work.

const igdb = igDB(igdbAPIKey)
async function main () {
  try {
    // const where = 'release_dates.platform = (6)'
    const where = '(platforms = [6,48] & genres = 13) | (platforms = [130,48] & genres = 12)'
    const response = await igdb
      .fields('name')
      .limit(2)
      .offset(0)
      .sort('name')
      .where(where)
      .request('/games')
    console.log(response.data)
  } catch (error) {
    console.log(error)
  }
}
main()

I can't query any expanded data on the "release_dates" section of the /games endpoint. The same query works from the shell using curl. This could just be outdated documentation, but since the issue only occurs here, I'm reporting it as a bug.

@eyeruleall
Copy link
Author

Removing the .sort() option appears to do something to fix the issue, but it is still a bug.

@alzedd
Copy link

alzedd commented Dec 4, 2021

I'm currently having the same issue. Using .sort() the api return 406

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

2 participants