Class PageOptions
java.lang.Object
org.sourcelab.buildkite.api.client.request.PageOptions
Paging options.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PageOptionsParses the given url and creates a PageOptions instance from the parameters.static PageOptionsDefault instance with sane default properties.longgetPage()inttoString()
-
Constructor Details
-
PageOptions
public PageOptions(long page, int perPage) Constructor.- Parameters:
page- Which page to request.perPage- How many entries per page.
-
-
Method Details
-
getDefault
Default instance with sane default properties.- Returns:
- Default instance with sane default properties.
-
fromUrl
Parses the given url and creates a PageOptions instance from the parameters.- Parameters:
url- The url to parse for per_page and page parameters.- Returns:
- PageOptions instance populated from the supplied url.
- Throws:
IllegalArgumentException- if passed an invalid url.
-
getPage
public long getPage() -
getPerPage
public int getPerPage() -
toString
-