Reverse Engineering the Giant Bomb URLs

Avatar image for drew
drew

135

Forum Posts

37

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#1  Edited By drew

Hey duders, 
I'm trying do a lookup on the API using only the data I can glean from the URL itself. Take, for example, Mario's page: 
http://www.giantbomb.com/mario/94-177/  
 From what I can tell, the word "mario" is ignored and is just there to make the URL human-readable. Instead, Giant Bomb seems to use the numbers (94-177) to resolve the resource and forward to its page. Now, all of the characters I've looked up start with "94-" so I assume "94" stands for character. If you look up /character/177 in the API, it returns Mario's details so 177 must be Mario's ID. 
Now, my question is, is there a more straightforward way of finding an object based on its URL? Or do I need to figure out the ID for each object type and store those in my application for making requests?
Thanks, 
 Drew

Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#2  Edited By LordAndrew

That's about it. The number before the hyphen indicates the page type, and the number after the hyphen is the ID of the page. Here's something I threw together in December. It doesn't give any information with regard to the API, but you can easily get that from the API documentation
 

 Giant Bomb

NamePluralized nameIDLinkAdditional notes
GameGames61/games/ 
FranchiseFranchises62/franchises/ 
CharacterCharacters94/characters/ 
PlatformPlatforms60/platforms/ 
PersonPeople72/person/ 
CompanyCompanies65/company/ 
ObjectObjects93/things/ 
ConceptConcepts92/concepts/ 
LocationLocations95/locations/ 
AccessoryAccessories59/accessory/ 
ReviewReviews141/reviews/ID is not normally seen
User reviewUser reviews31/user_reviews/ID for individual user reviews is seen, but not type ID
VideoVideos17/videos/ 
ReleaseReleases63none

ID for individual releases can be seen in some areas, but not the type ID
Releases cannot be viewed individually, but grouped together with other releases for a game

Rating boardRating boards56none

USK rating board and associated ratings are unused
Rating board and rating pages are associated with releases and cannot be viewed individually

Game ratingGame ratings77noneUSK rating board and associated ratings are unused
Rating board and rating pages are associated with releases and cannot be viewed individually
RegionRegions58noneIndividual regions cannot be viewed
GenreGenres64none 
ThemeThemes150none 
 
Avatar image for drew
drew

135

Forum Posts

37

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#3  Edited By drew
@LordAndrew: Ah, that's awesome. Thanks very much for passing that on.
Avatar image for lordandrew
LordAndrew

14609

Forum Posts

98305

Wiki Points

0

Followers

Reviews: 0

User Lists: 36

#4  Edited By LordAndrew
@drew: Glad to help. I didn't expect that would ever actually be of use to anyone. :)