A request to a List Resource contains a resource name and an API Key. Optionally filters, sorting, and response format can be specified. Refer to the resource reference below for a list of fields that can be filtered and sorted. A request to retrieve all male characters sorted by birth_date in XML format would look like:I tried this exact example, but it doesn't seem to work right. Both male and female characters are returned in the results.http://api.giantbomb.com/characters/?api_key=ABCDEF123456&gender=M&sort=birth_date&format=xmlThat URL becomes easier to understand if broken apart. The "/characters/" path refers to the /characters/ resource. (See a complete list of resources below.)
The query string holds the rest of the request. The api_key parameter specifies your API key. The gender parameter specifies that the request should be filtered by gender. Passing "M" or "F" to it will filter the result set by either male- or female-only characters. Finally, the sort parameter specifies that the result set should be sorted by the "birth_date" field.
I noted that male characters display a 1 instead of M for gender, and females display a 2 instead of F (contrary to the XML and JSON response examples). So I tried to use 1 and 2 in place of the M, but still no luck. Both male and female are shown regardless.
Log in to comment