README.md in intercom-3.5.17 vs README.md in intercom-3.5.19

- old
+ new

@@ -20,11 +20,11 @@ gem install intercom Using bundler: - gem 'intercom', '~> 3.5.10' + gem 'intercom', '~> 3.5.18' ## Basic Usage ### Configure your client @@ -132,10 +132,13 @@ # Iterate over all companies intercom.companies.all.each {|company| puts %Q(#{company.name} - #{company.custom_attributes["referral_source"]}) } intercom.companies.all.map {|company| company.name } # Get a list of users in a company intercom.companies.users(company.id) +# Get a large list of companies using scroll +intercom.companies.scroll.each { |comp| puts comp.name} +# Please see users scroll for more details of how to use scroll ``` #### Tags ```ruby # Tag users @@ -369,10 +372,14 @@ # Convert a contact into a user intercom.contacts.convert(contact, user) # Delete a contact intercom.contacts.delete(contact) + +# Get a large list of contacts using scroll +intercom.contacts.scroll.each { |lead| puts lead.id} +# Please see users scroll for more details of how to use scroll ``` ### Counts ```ruby @@ -431,9 +438,15 @@ ```ruby intercom.rate_limit_details #=> {:limit=>180, :remaining=>179, :reset_at=>2014-10-07 14:58:00 +0100} ``` +You can handle the rate limits yourself but a simple option is to use the handle_rate_limit flag. +This will automatically catch the 429 rate limit exceeded error and wait until the reset time to retry. + +``` +intercom = Intercom::Client.new(token: ENV['AT'], handle_rate_limit: true) +``` ### Pull Requests - **Add tests!** Your patch won't be accepted if it doesn't have tests.