Permalink
Browse files

Merge pull request #41 from arangamani/gh-pages

Added example for pagination in the search API call
  • Loading branch information...
2 parents 7058c30 + 5300b41 commit 6f999f8149fbb9750a3e0f94c043a50c52b07db3 @sferik sferik committed Mar 5, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 rubygems-org-api.md
View
@@ -175,6 +175,12 @@ site. Returns an array of the XML or JSON representation of gems that match.
$ curl 'https://rubygems.org/api/v1/search.xml?query=cucumber'
+The results are paginated so the API call will return only the first 30 matched
+gems. To get subsequent results, use the page query parameter until an empty
+reponse is received.
+
+ $ curl 'https://rubygems.org/api/v1/search.json?query=cucumber&page=2'
+
### GET - `/api/v1/gems.(json|xml|yaml)`
List all gems that you own. Returns an array of the XML or JSON representation

0 comments on commit 6f999f8

Please sign in to comment.