A module that adds http get request to response pagination
Default request page if none provided
1Default number of items as specified by API
30Either page or per_page parameter not present
-1# Either page or per_page parameter not present
Constants::ACCEPT,Constants::ACCEPTED_OAUTH_SCOPES,Constants::ACCEPT_CHARSET,Constants::CACHE_CONTROL,Constants::CONTENT_LENGTH,Constants::CONTENT_TYPE,Constants::DATE,Constants::ETAG,Constants::HEADER_LAST,Constants::HEADER_LINK,Constants::HEADER_NEXT,Constants::LOCATION,Constants::META_FIRST,Constants::META_LAST,Constants::META_NEXT,Constants::META_PREV,Constants::META_REL,Constants::OAUTH_SCOPES,Constants::PARAM_PAGE,Constants::PARAM_PER_PAGE,Constants::PARAM_START_PAGE,Constants::RATELIMIT_LIMIT,Constants::RATELIMIT_REMAINING,Constants::RATELIMIT_RESET,Constants::SERVER,Constants::USER_AGENT
Check if current api instance has default per_page param set, otherwise use global default.
Perform http get request with pagination parameters.
242526 | # File 'lib/github_api/paged_request.rb', line 24defdefault_pagecurrent_api.page?current_api.page:FIRST_PAGEend |
Check if current api instance has default per_page param set, otherwise use global default.
202122 | # File 'lib/github_api/paged_request.rb', line 20defdefault_page_sizecurrent_api.per_page?current_api.per_page:PER_PAGEend |
Perform http get request with pagination parameters
30313233343536373839 | # File 'lib/github_api/paged_request.rb', line 30defpage_request(path,params={})ifparams[PARAM_PER_PAGE]==NOT_FOUNDparams[PARAM_PER_PAGE]=default_page_sizeendifparams[PARAM_PAGE]&¶ms[PARAM_PAGE]==NOT_FOUNDparams[PARAM_PAGE]=default_pageendcurrent_api.get_request(path,ParamsHash.new(params))end |