2015-02-08 3 views

ответ

2

Согласно некоторым исследованиям, я сделал, ограничение 200 записей выставиться в Zoho Апи. Путь я нашел, чтобы получить все записи с помощью RubyZoho:

def get_zoho_objects module_name 
    objects = [] 
    first_index = 1 
    block_size = 200 
    to_index = block_size 
    loop do 
     puts "from index: #{first_index} to index: #{to_index}" 
     return_objects = RubyZoho.configuration.api.some(module_name, first_index, to_index) 
     break if return_objects == nil 
     objects += return_objects 
     first_index = to_index + 1 
     to_index += block_size 
    end 
    objects 
end 

использование:

all_accounts = get_zoho_objects "Accounts"