Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improved README

  • Loading branch information...
commit 10101d09d86729de7232652b66c1aea2c31ab48d 1 parent ff790af
Lucas Húngaro authored September 10, 2011

Showing 1 changed file with 18 additions and 1 deletion. Show diff stats Hide diff stats

  1. 19  README.textile
19  README.textile
Source Rendered
@@ -35,7 +35,7 @@ An example of a ResourceList is a GameList. To get a list of games you can do th
35 35
 
36 36
 <pre>
37 37
 >> GiantBomb::GameList.fetch
38  
-=> [<#Hashie::Mash aliases="BioShock" ...>, <#Hashie::Mash aliases="Civilization V" ...>, ...]
  38
+=> [<#Hashie::Mash name="BioShock" ...>, <#Hashie::Mash name="Civilization V" ...>, ...]
39 39
 </pre>
40 40
 
41 41
 As you can see, the gem makes use of "Hashie's":https://github.com/intridea/hashie Mash, which basically is a Hash with attribute accessors for all keys, meaning you can use the dot notation to access values:
@@ -49,6 +49,23 @@ As you can see, the gem makes use of "Hashie's":https://github.com/intridea/hash
49 49
 
50 50
 For a Resource, the return will always be a Mash instance. For a ResourceList, it will be an Array of Mash instances.
51 51
 
  52
+A Resource has one method (details) which receives the entity id.
  53
+
  54
+A ResourceList has one method (fetch) which receives two numeric parameters regarding pagination: the first one is the current page and the second one is the amount of elements per page.
  55
+
  56
+The GameList can also send a "platforms" parameter, which is an Array containing the ids of the gaming platforms that will be used to filter the results:
  57
+
  58
+<pre>
  59
+>> GiantBomb::GameList.platforms = [35, 129]
  60
+=> [35, 129]
  61
+>> GiantBomb::GameList.fetch
  62
+=> [<#Hashie::Mash name="Uncharted" ...>, <#Hashie::Mash name="God of War" ...>, ...]
  63
+</pre>
  64
+
  65
+The other lists do not feature additional filters at the moment.
  66
+
  67
+For further reference, please check the "official API documentation":http://api.giantbomb.com/documentation/.
  68
+
52 69
 h3. Available endpoints
53 70
 
54 71
 Resources:

0 notes on commit 10101d0

Please sign in to comment.
Something went wrong with that request. Please try again.