duckduckgo / zeroclickinfo-spice

DuckDuckGo Instant Answers based on JavaScript (JSON) APIs
https://duckduckhack.com/
Other
548 stars 942 forks source link

GameInfo fails to appear #192

Closed majuscule closed 11 years ago

majuscule commented 11 years ago

@thomaspreece10

Hi Thomas,

I've created this issue in response to your email. I've noticed a possible source of the error. The API is responding with Content-Type: text/html, instead of Content-Type: application/json as it should. I'm not certain that this is what is causing the problem, as it should be converted to application/javascript regardless, but it should definitely be fixed.

thomaspreece commented 11 years ago

I've updated the API to respond 'application/json' and the problem appears to still persist.

majuscule commented 11 years ago

The problem was a combination of that and the redirect. Now that both are fixed, I've tested the changes on dylan.duckduckgo.com, and it seems to work perfectly. I am releasing the zeroclickinfo-spice package, and the problem should be fully resolved with our next deploy. I'm leaving this issue open for now until it's live.

thomaspreece commented 11 years ago

Thats great news :) Just a small query, in 'zeroclickinfo-spice / share / spice / game_info / game_info.js' it renders source as TheFreeGamesDB resulting in 'More at TheFreeGamesDB' in instant box. Could this be changed to api_result.domain because the api searches both tfgdb.com and thegamesdb.net and it might confuse the users when clicking if they end up at thegamesdb.net

majuscule commented 11 years ago

It's live :-)

https://duckduckgo.com/?q=game+homesick

Would you please make a pull request for the change you're describing? I'd be happy to merge it. Thanks!