lib/school_digger/api.rb in school_digger-0.9.0 vs lib/school_digger/api.rb in school_digger-1.0.0
- old
+ new
@@ -70,10 +70,10 @@
options[:page] ||= 1
get "/rankings/schools/#{state}", options
end
## response = SchoolDigger::Api.new.districts('CA')
- ## response = SchoolDigger::Api.new.next_page(response)
+ ## next_page_response = SchoolDigger::Api.new.next_page(response)
def next_page(response)
max_pages = response["numberOfPages"]
original_query = response.request.options[:query]
current_page = original_query[:page]
next_page = current_page.to_i + 1