meb's forum posts

#1 Edited by meb (7 posts) -

This is great. Simple and clean. I noticed it's missing a way of handling game releases, but I'm guessing you were already planning to add that at some point. 
I've already completed the python program I needed to collect gb metadata, but I will probably use this nice wrapper of yours in the future!

#2 Posted by meb (7 posts) -

Ok, so I wrote a little app that downloads bits of metadata and covers of releases for games in my library using your gb api, but I noticed in my logs that certain games like Ōkami and Einhänder can't be found at all when i search for them. For example, my program tries the following url when searching for Ōkami
2011-03-18 00:56:58,322 - DEBUG - URL sent to api:<my key>&field_list=aliases%2Cid%2Cname&resources=game&format=xml     
Is this because these games have characters that can't be handled by the search? If so, should I just request the titles for these names be changed?

#3 Posted by meb (7 posts) -

#4 Edited by meb (7 posts) -
@andy said:

" Good catch. I just committed a fix. I'll go live with the next deployment. "

You are awesome, thanks. Another observation - I also noticed that the api's http server doesn't compress anything when i send it the 'accept-encoding: gzip, deflate' http header. A quick Chrome audit says you could be saving 2/3rds bandwidth w/ a quick server configuration change. Add 'text/xml' to gzip_types or something like that (I've never used nginx). Then you can tell your boss you're saving him money! 
Thanks again
#5 Posted by meb (7 posts) -

The HTTP 'Content-Type' header that is returned when i make requests to the API has 'text/xml' as a value when it should have 'text/xml;charset=utf-8'
This seems like a trivial issue, but it really isn't. This can cause some problems for software trying to guess the encoding of the xml file. According to the RFC spec, you're supposed to ignore anything about the encoding that's specified inside the xml file, and instead look at the content-type header. If there is no charset parameter in the content-type header, you're supposed to default to 'us-ascii' instead of 'utf-8'. Kinda problematic if software is up to spec and following the rules.
More info here:

#6 Posted by meb (7 posts) -
@Marino: duplicate  Grand Theft Auto: San Andreas US releases