Class PageOptions

java.lang.Object
org.sourcelab.buildkite.api.client.request.PageOptions

public class PageOptions extends Object
Paging options.
  • 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

      public static PageOptions getDefault()
      Default instance with sane default properties.
      Returns:
      Default instance with sane default properties.
    • fromUrl

      public static PageOptions fromUrl(String url)
      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

      public String toString()
      Overrides:
      toString in class Object