Posted by harris (848 posts) -

Hi, I'm Harris, the developer who started the GB android app. As I've worked on the app, I've run into things that simply weren't documented in the API and I had to use. While the API is great for getting game info and stuff, it's rather lacking for getting general GiantBomb content. I had to do packet capture on the site as well as the iPhone app to unearth some interesting, useful, and undocumented functions. These would be great to implement in the API, btw, in case any GB staff is reading this.  Below is a short list of them, which may grow in the future: 
 
Everything below will probably not be interesting unless you're a developer using GB stuff. Also, as usual, if the GB staff doesn't like this, feel free to make it disappear. Let me know if there are any errors.
 

Video Search

This is what the small video search box on the videos page uses. I couldn't find documentation for it anywhere, so I had to use packet capture to find it.

http://www.giantbomb.com/autosearch/?ct_ids=17?q=QUERY

 
Where "QUERY" is your search terms. ct_ids=17 seems to indicate the search is for videos only. So " http://www.giantbomb.com/autosearch/?ct_ids=17&q=bayonetta" would return a nice lookin' JSON response of all the video results for 'bayonetta', with some nice info. Sweet.  
 

iPod Formatted Videos


 This was the holy grail that allowed the GB app to play GB videos. I actually had the idea for the app after doing packet capture on the iPhone app for fun (yep.. I'm a geek.. that's the kind of thing I do for fun T_T). SO, here's how to use it.
  1. Make a /video/ request and get the 'url' parameter of the video you want. Should look something like this: "tr_matthazardbbb_gag.flv"
  2. Some video filenames are formatted a little differently, so: IF the name contains ".flv", remove it. Some videos have it, some videos don't. So now we have: "tr_matthazardbbb_gag"
  3. Add "http://media.giantbomb.com/video/" to the beginning of the name. So: "http://media.giantbomb.com/video/tr_matthazardbbb_gag"
  4. Add "_ip.m4v?api_key=API_KEY" where API_KEY is your api key to the end of the name. So: "http://media.giantbomb.com/video/tr_matthazardbbb_gag_ip.m4v?api_key=API_KEY"
  5. Done! You now have the URL to the iPod formatted video.
I hope this short guide has helped, and good luck developing whatever you're developing.
 
All hail luchadeer,
-Harris M.
#1 Edited by harris (848 posts) -

Hi, I'm Harris, the developer who started the GB android app. As I've worked on the app, I've run into things that simply weren't documented in the API and I had to use. While the API is great for getting game info and stuff, it's rather lacking for getting general GiantBomb content. I had to do packet capture on the site as well as the iPhone app to unearth some interesting, useful, and undocumented functions. These would be great to implement in the API, btw, in case any GB staff is reading this.  Below is a short list of them, which may grow in the future: 
 
Everything below will probably not be interesting unless you're a developer using GB stuff. Also, as usual, if the GB staff doesn't like this, feel free to make it disappear. Let me know if there are any errors.
 

Video Search

This is what the small video search box on the videos page uses. I couldn't find documentation for it anywhere, so I had to use packet capture to find it.

http://www.giantbomb.com/autosearch/?ct_ids=17?q=QUERY

 
Where "QUERY" is your search terms. ct_ids=17 seems to indicate the search is for videos only. So " http://www.giantbomb.com/autosearch/?ct_ids=17&q=bayonetta" would return a nice lookin' JSON response of all the video results for 'bayonetta', with some nice info. Sweet.  
 

iPod Formatted Videos


 This was the holy grail that allowed the GB app to play GB videos. I actually had the idea for the app after doing packet capture on the iPhone app for fun (yep.. I'm a geek.. that's the kind of thing I do for fun T_T). SO, here's how to use it.
  1. Make a /video/ request and get the 'url' parameter of the video you want. Should look something like this: "tr_matthazardbbb_gag.flv"
  2. Some video filenames are formatted a little differently, so: IF the name contains ".flv", remove it. Some videos have it, some videos don't. So now we have: "tr_matthazardbbb_gag"
  3. Add "http://media.giantbomb.com/video/" to the beginning of the name. So: "http://media.giantbomb.com/video/tr_matthazardbbb_gag"
  4. Add "_ip.m4v?api_key=API_KEY" where API_KEY is your api key to the end of the name. So: "http://media.giantbomb.com/video/tr_matthazardbbb_gag_ip.m4v?api_key=API_KEY"
  5. Done! You now have the URL to the iPod formatted video.
I hope this short guide has helped, and good luck developing whatever you're developing.
 
All hail luchadeer,
-Harris M.
#2 Posted by DanielJW (4915 posts) -

I don't know a damn thing about API mumbo jumbo, but if the information above is correct, it should be moved to the API forum and stickied there. 

#3 Posted by harris (848 posts) -
@DanielJW: I was going to put it there, but that place is pretty dead :| Although if it's stickied there, that would probably be better.
#4 Posted by Claude (16254 posts) -
@harris said:
" @DanielJW: I was going to put it there, but that place is pretty dead :| Although if it's stickied there, that would probably be better. "
It would last longer there. It will disappear in off-topic pretty quick. You need to inform a Mod to move it.
#5 Posted by LordAndrew (14424 posts) -

You don't have to include your API key when grabbing the M4V videos. I don't think the server is doing anything with it.

#6 Posted by Freek (91 posts) -

Thank you very much, very helpful for me to add full video support to my little mobile version of the site :D