module Github::PagedRequest
def default_page
def default_page current_api.page ? current_api.page : FIRST_PAGE end
def default_page_size
otherwise use global default.
Check if current api instance has default per_page param set,
def default_page_size current_api.per_page ? current_api.per_page : PER_PAGE end
def page_request(path, params={})
Perform http get request with pagination parameters
def page_request(path, params={}) if params[PARAM_PER_PAGE] == NOT_FOUND params[PARAM_PER_PAGE] = default_page_size end if params[PARAM_PAGE] && params[PARAM_PAGE] == NOT_FOUND params[PARAM_PAGE] = default_page end current_api.get_request(path, ParamsHash.new(params)) end