Iterates through each response entry through all pages
 @return [Enumerator<Hash>]
771244
def each_resource(&block)
      Enumerator.new do |result|
        each_page { |resources| resources.each { |resource| result << resource } }
      end.each(&block)
    end
719788
def extract_paging(response)
      paging            = response.to_h['paging']
      next_page_url     = paging && paging['next']      # gives nil when any one of the keys doens't exist
      previous_page_url = paging && paging['previous']  # can be replaced with Hash#dig for ruby >= 2.3.0
      @paging_next      = extract_endpoint_from(next_page_url)
      @paging_previous  = extract_endpoint_from(previous_page_url)
    end
690589
def each
      return enum_for(:each) unless block_given?

      execute.each do |result|
        yield(model.new(result.merge(api: api)))
      end
    end
1285206
def pages
      @pages ||= begin
        from = @page - (@size / 2).ceil
        from = 1 if from < 1
        upto = from + @size - 1

        # Correct +from+ and +to+ if +to+ is more than number of pages
        if upto > pages_count
          from -= (upto - pages_count)
          from = 1 if from < 1
          upto = pages_count
        end

        (from..upto).to_a
      end
    end
578721
def to_hash
      result = @response[:magic_response][:magic_result][:diffgram]
      result = strip_attributes(result)
      result = convert_dates_to_utc(result)

      if result.nil?
        return []
      end

      # All magic responses wrap their result in an ActionResponse element
      result = result.values.first

      # Often the first element in ActionResponse is an element
      # called ActionInfo, but in some cases it has a different name
      # so we just get the first element.
      result.values.first
    end
1057406
def each(&block)
      return @results.each(&block) if @results
      @results = []
      cur_v_i = Array.new(@data.keys.length, 0)
      keys = @data.keys.sort_by(&:to_s)
      result = {}
      keys.each do |key|
        result[key] = @data[key][0]
      end
      while true
        r = result.dup
        @results << r
        block.call(r) if block
        keys.each_with_index do |k, k_i|
          v_i = ((cur_v_i[k_i] = (1 + cur_v_i[k_i]) % @data[k].length))
          result[k] = @data[k][v_i]
          if v_i > 0 # Found next ?
            break
          elsif k_i == keys.length - 1 # Last?
            return
          end
        end
      end
      @results
    end
734072
def all(self):
        
        page = self._load(self.href)
        while True:
            try:
                for item in page._items:
                    yield item
                page = page.next_page()
            except PaginationError:
                break
406760
def each(&block)
      return enum_for(:each) unless block_given?

      child = first_child
      while child
        nextchild = child.next
        yield child
        child = nextchild
      end
    end
690772
def all_descriptions
      result = []
      @pages.each do |page|
        result << [page.page_url, page.meta_desc_content] if page.page_a_tags
      end
      result
    end
954337
def each
      return to_enum unless block_given?
      each_explicit_key do |*key|
        next if default?(*key)
        yield key, get(*key)
      end
    end
596207
def get_all_collections()
      response = self.get('collections').body
      parsed = JSON.parse(response)
      all_collections = []
      parsed.each do |item_hash|
        all_collections.push OmekaClient::OmekaCollection.new(self, item_hash)
      end
      return all_collections
    end
1020823
def topics(options = {})
      batches = Enumerator.new do |y|
        resp = @client.list_topics(options)
        resp.each_page do |page|
          batch = []
          page.data.topics.each do |t|
            batch << Topic.new(
              arn: t.topic_arn,
              client: @client
            )
          end
          y.yield(batch)
        end
      end
      Topic::Collection.new(batches)
    end
999871
def iter(self):
        

        page = 1
        fetch_all = True
        url = "{}/{}".format(__endpoint__, self.type.RESOURCE)

        if 'page' in self.params:
            page = self.params['page']
            fetch_all = False

        response = RestClient.get(url, self.params)[self.type.RESOURCE]
        while len(response):
            for item in response:
                yield self.type(item)

            if not fetch_all:
                break
            else:
                page += 1
                self.where(page=page)
            response = RestClient.get(url, self.params)[self.type.RESOURCE]
1006769
def pages(self):
        
        # Start with a page object for unknown entries if the HAR data has
        # any entries with no page ID
        pages = []
        if any('pageref' not in entry for entry in self.har_data['entries']):
            pages.append(HarPage('unknown', har_parser=self))
        for har_page in self.har_data['pages']:
            page = HarPage(har_page['id'], har_parser=self)
            pages.append(page)

        return pages
2830
def each
      return to_enum(__method__) { instance.size } unless block_given?
      instance.each_index { |i| yield(self[i]) }
      self
    end
358841
def all(options={})
      offset = nil
      results = []
      begin
        options.merge!(:limit => LIMIT_MAX, :offset => offset)
        response = records(options)
        results += response.records
        offset = response.offset
      end until offset.nil? || offset.empty? || results.empty?
      results
    end
433014
def with_pagination(&block)
      results = yield
      while next_ref = next_link_ref(@client.last_response.headers["link"])
        uri = URI.parse(next_ref.href)
        next_page = uri.query.split("=")[1]
        results.push(yield page: next_page)
      end
      results.flatten
    end