igdb-api-node
igdb-api-node copied to clipboard
Is Expand still a thing in this latest API?
Looks like I can write requests directly to the API and expand will work, but this library doesn't support expand, is that right?
@adjstreams I don't know if you were able to get an answer, but just in case -- it seems like you can still use expand with this wrapper the same way as it's described in the api docs by adding a sub-property to that field. So for genre, you could do genres.* or genres.name as part of the fields parameter. I was able to expand release_dates and directly grab the associated years when searching for a game with the following example:
const { data } = await igdb(clientId, token)
.search('Halo')
.fields(['name', 'release_dates.y'])
.request('/games')