Browse files

Improved README

  • Loading branch information...
1 parent ff790af commit 10101d09d86729de7232652b66c1aea2c31ab48d @lucashungaro committed Sep 10, 2011
Showing with 18 additions and 1 deletion.
  1. +18 −1 README.textile
@@ -35,7 +35,7 @@ An example of a ResourceList is a GameList. To get a list of games you can do th
>> GiantBomb::GameList.fetch
-=> [<#Hashie::Mash aliases="BioShock" ...>, <#Hashie::Mash aliases="Civilization V" ...>, ...]
+=> [<#Hashie::Mash name="BioShock" ...>, <#Hashie::Mash name="Civilization V" ...>, ...]
As you can see, the gem makes use of "Hashie's": 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":
For a Resource, the return will always be a Mash instance. For a ResourceList, it will be an Array of Mash instances.
+A Resource has one method (details) which receives the entity id.
+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.
+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:
+>> GiantBomb::GameList.platforms = [35, 129]
+=> [35, 129]
+>> GiantBomb::GameList.fetch
+=> [<#Hashie::Mash name="Uncharted" ...>, <#Hashie::Mash name="God of War" ...>, ...]
+The other lists do not feature additional filters at the moment.
+For further reference, please check the "official API documentation":
h3. Available endpoints

0 comments on commit 10101d0

Please sign in to comment.