Skip to content

Instantly share code, notes, and snippets.

@looneym
Created November 30, 2016 16:17
Show Gist options
  • Save looneym/7bd0b0331e6a9cefef27664c59e4aa9a to your computer and use it in GitHub Desktop.
Save looneym/7bd0b0331e6a9cefef27664c59e4aa9a to your computer and use it in GitHub Desktop.
# client code
require 'intercom'
#replace with your values
intercom = Intercom::Client.new(token: 'my_token')
convos = intercom.conversations.find_all(user_id: 'some_user_id', type: 'user')
convos.each { |x| puts x.id }
# sample output one
===> looneym ~/ruby-api-test ruby test.rb
7047773685
7046294106
#sample output two
===> looneym ~/ruby-api-test ruby test.rb
7048452436
7048451205
7034280134
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment