Useful information for anyone developing stuff with the GB API

Avatar image for harris
harris

841

Forum Posts

11

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

Edited By harris

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.
Avatar image for harris
harris

841

Forum Posts

11

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#1  Edited By harris

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.
Avatar image for danieljw
DanielJW

4933

Forum Posts

8618

Wiki Points

0

Followers

Reviews: 2

User Lists: 8

#2  Edited By DanielJW

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. 

Avatar image for harris
harris

841

Forum Posts

11

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#3  Edited By harris
@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.
Avatar image for claude
Claude

16672

Forum Posts

1047

Wiki Points

0

Followers

Reviews: 2

User Lists: 18

#4  Edited By Claude
@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.
Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#5  Edited By LordAndrew

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.

Avatar image for washclof
Washclof

111

Forum Posts

926

Wiki Points

0

Followers

Reviews: 0

User Lists: 4

#6  Edited By Washclof

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