We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa3a5f0 commit f1ce4d9Copy full SHA for f1ce4d9
1 file changed
lib/oai/client/response.rb
@@ -1,4 +1,24 @@
1
module OAI
2
+
3
+ # An OAI::Response contains entries and a resumption token. If a resumption token is present,
4
+ # then you must use it to fetch the rest of the entries for your query. For example:
5
+ # # List all records
6
+ # i = 1
7
+ # begin
8
+ # response = client.list_records
9
+ # while response.entries.size > 0
10
+ # response.entries.each { |entry|
11
+ # puts "<b>#{i}</b> #{entry.header.identifier}<br/>"
12
+ # i +=1
13
+ # }
14
+ # token = response.resumption_token
15
+ # response = client.list_records :resumption_token => token if token
16
+ # end
17
+ # rescue OAI::Exception => e
18
+ # puts 'No records to process'
19
20
+ # puts "Done processing #{i} records"
21
22
class Response
23
include OAI::XPath
24
attr_reader :doc, :resumption_token
0 commit comments