Permalink
Browse files

document ListRange

  • Loading branch information...
1 parent 0b7a194 commit 9fc49f589d1c5d7a61004b04d1cfceb9c3b6fbe3 @bgentry committed Dec 20, 2013
Showing with 23 additions and 0 deletions.
  1. +13 −0 README.md
  2. +10 −0 doc.go
View
13 README.md
@@ -92,9 +92,22 @@ options struct, and the options will be omitted from the API request entirely.
For any individual options that you don't want to set, simply leave them as
`nil`, and they will be omitted from the API request.
+## List Ranges & Sorting
+
+Results from the Heroku API are paginated. You can specify a field for sorting
+and adjust the maximum number of records returned by providing a `ListRange` to
+API calls that list objects:
+
+```go
+apps, err = client.AppList(&heroku.ListRange{Field: "name", Max: 1000})
+```
+
+Note `Field` [is required][range-docs] when setting any range options.
+
## Documentation
More detailed documentation is available on [godoc][godoc].
[godoc]: https://godoc.org/github.com/bgentry/heroku-go "heroku-go on Godoc.org"
[platform-api]: https://devcenter.heroku.com/articles/platform-api-reference "Heroku Platform API"
+[range-docs]: https://devcenter.heroku.com/articles/platform-api-reference#ranges "Request Ranges"
View
10 doc.go
@@ -85,5 +85,15 @@ wish to set any optional parameters, simply provide a nil in place of the
options struct, and the options will be omitted from the API request entirely.
For any individual options that you don't want to set, simply leave them as nil,
and they will be omitted from the API request.
+
+List Ranges & Sorting
+
+Results from the Heroku API are paginated. You can specify a field for sorting
+and adjust the maximum number of records returned by providing a ListRange to
+API calls that list objects:
+
+ apps, err = client.AppList(&heroku.ListRange{Field: "name", Max: 1000})
+
+Note Field is required when setting any range options.
*/
package heroku

0 comments on commit 9fc49f5

Please sign in to comment.