#1 Posted by fearbefore (57 posts) -

Hey all, 
 
I thought I would play around with the Chrome extensions structure and I thought the GB API would be decent to use for a bit of practice.  I'm starting by making the extension pull the reviews, but I noticed that the game element of a review's node content is a call to the api for the game.  Did I miss something here?  Is just the game's name included somewhere in the Review XML? 
 
Ian

#2 Posted by LordAndrew (14426 posts) -

It's in there. name is what you want.
<game>
    <api_detail_url>http://api.giantbomb.com/game/20462/</api_detail_url>
    <id>20462</id>
    <name>SingStar</name>
</game>

#3 Posted by fearbefore (57 posts) -

Thanks Andrew, didn't drill down far enough into game looking at the API return. 

#4 Posted by fearbefore (57 posts) -

How do you flip the sort?  I need to pull the 5 newest reviews. 

#5 Posted by LordAndrew (14426 posts) -
@fearbefore: You can't change the sorting, which is a major limitation of the API. But you can make an initial request for number_of_total_results, then make another request with offset = number_of_total_results - 5. That will get you the last five.
#6 Posted by fearbefore (57 posts) -
@LordAndrew:  But you can't sort beyond that?  At least not with the return?  I would have to parse the results backward to write newest to oldest?
#7 Posted by fearbefore (57 posts) -

A terrible beta version is accessible from the Chrome extensions.  I have Reviews paging working, just need to work a few bugs out before I post it.  Ideally it will have news, reviews, and maybe video links, along with a text search that will return some abbreviated results for quick viewing and linking.  Any comments/complaints?

#8 Posted by LordAndrew (14426 posts) -

Not bad. You should probably add dlc_name to the game title to avoid ambiguity.

#9 Posted by jakob187 (21662 posts) -

Dood, yes!  I need easier GB browsing at all times, and now I can have it at work AND at home! 
 
Thanks for the work, sir.

#10 Posted by AjayRaz (12424 posts) -

just installed it. neat extension :) 

#11 Posted by fearbefore (57 posts) -

Wrapped the new version earlier, and it has review browsing with dlc_names if they exist.  I was trying to clean up the code a bit and it should be looking better .

#12 Posted by The_Laughing_Man (13629 posts) -
@fearbefore said:
" Wrapped the new version earlier, and it has review browsing with dlc_names if they exist.  I was trying to clean up the code a bit and it should be looking better . "
Link>? 
#13 Posted by fearbefore (57 posts) -

Left it on my work machine, so I cant get to it until tomorrow.  I'll post it by Friday morning and let you all know. 

#14 Posted by fearbefore (57 posts) -

There's no way to query GB for their news feed is there?  Does Feedburner have a decent API, so I don't have to query the feed and return an excessive number of results?  Also the API doesn't support new release browsing?

#15 Posted by LordAndrew (14426 posts) -
@fearbefore: Welcome to the wonderful world of trying to get around stupid limitations in the API. :P There is no resource for retrieving news, so you'll have to figure out out a way to make the RSS feed work for you. I don't know much about that.
 
For new releases you'll have to grab all of the releases, or at least a large number of them, and sort them yourself. It's horribly impractical if you don't have your own database to store it all in. I could have sworn there was at one point an RSS feed for new releases, but that seems to have disappeared.
#16 Posted by fearbefore (57 posts) -

I'm sorta of working on this project to familiarize myself with jquery, so I'm not going to take the time to build my own database and feeds to sort everything else.  That I I doubt the audience for this will be all that large to even justify it.  I guess I'm trying to make it useful for the user, so they don't have to wait 5-10 seconds for the app to retrieve and parse the results.  I still poking around with the feedburner stuff, but I'm probably just going to move onto searching and come back to the news feed later.

#17 Posted by LordAndrew (14426 posts) -

Yeah, some things just aren't worth the bother. Many of the things I want to do with the API are either impossible or require me to retrieve data for every single page. It would be nice if the API devs would actually implement a more powerful interface for the API so that we don't have to do a bunch of client-side sorting and filtering. We shouldn't have to do that.

#18 Posted by fearbefore (57 posts) -
#19 Posted by fearbefore (57 posts) -

Version 1.2 ready to go at the above URL.  Added search support.  Still trying to figure out the best way to parse news.  Going to start working on topic browsing.

#20 Posted by Ryax (4630 posts) -

installed it. pretty good. very nice.

#21 Edited by harris (848 posts) -
@fearbefore: Lookin' good! Keep up the great work. 
 
In the GiantBomb Android app, I used this feed to parse news: 
http://feeds.feedburner.com/GiantBombNews?format=xml

I found it by doing packet capture on the iPhone app. 
 
Good luck! 
#22 Posted by fearbefore (57 posts) -
@harris:  You have to grab the whole feed though, eh?  Just seems painful to grab it all and parse it.  It would be nice if Feedburner had a basic API for pulling and sorting chunks of a feed rather than having to pull it all and parse it on my side.
#23 Posted by fearbefore (57 posts) -

Ehhh, after looking at it I guess your not pulling all that much info.  That url you provided is only pulling current info and there's not really any deck to display, so I only really need to pull the title and the link.  Seems simple enough, should have it together in the next hour or so.

#24 Posted by The_Laughing_Man (13629 posts) -
@harris said:
" @fearbefore: Lookin' good! Keep up the great work. 
 
In the GiantBomb Android app, I used this feed to parse news: 
http://feeds.feedburner.com/GiantBombNews?format=xml
I found it by doing packet capture on the iPhone app.  Good luck!  "
Any chance you can make it so I can post on the forums from my droid? 
#25 Edited by fearbefore (57 posts) -

Arg, there's no deck/tagline for news stories in the feed.  The ones on the site have nice decks for each headline, but the feed only has a description that's is stuffed full of html.

#26 Posted by LordAndrew (14426 posts) -

Like these decks? Yeah, it would be nice to include those in the feed.

#27 Posted by fearbefore (57 posts) -
@LordAndrew:  Yep, a plain text deck like those on the site would be great to have in the feed.
#28 Posted by Gav47 (1542 posts) -

Nice one, good job 

#29 Posted by harris (848 posts) -
@The_Laughing_Man: We had forum support working, but it required a painfully hard html scraping method that was recently broken by site changes. We're looking into it. So I guess the answer is... maybe. 
  
@fearbefore: Yeah... it's certainly not an optimal solution, but as far as I know it's the best way to do it. 
#30 Posted by fearbefore (57 posts) -

Version 1.3 now available 
              Features: 
                               - News Feed now working 
                               - Videos now working 
                               - Full search support 
                               - Section browsing, allows you to view the newest entries in each section