Conversation
josler
commented
May 28, 2015
|
contacts: contact = client.contacts.find(id: "63g78ac87ec4")
new_user = client.contacts.convert(contact, user) |
puts client.rate_limit_details
# {:limit=>500, :remaining=>500, :reset_at=>2015-05-28 16:00:00 +0100} |
|
admins: admin = client.admins.all.each { |a| puts a.name }companies: client.companies.find(id: "abc6123def87")
#users in company
client.companies.users("abc6123def87").each do { |u| puts u.id } |
|
subscriptions: client.subscriptions.create(:url => "http://example.com", :topics => ["user.created"])
subscription = client.subscriptions.find(:id => "nsub_123456789")events: client.events.create(:event_name => "item_sold", :email => 'joe@example.com') |
f86ba3d to
6667374
Compare
|
messages: client.messages.create(:from => { :type => "user", :email => "jim@example.com" }, :body => "halp")notes: client.notes.create("body" => "Note to leave on user")
client.notes.find(id: '123') |
233e3e0 to
7d5e17e
Compare
|
tags: client.tags.tag(:name => "Test Tag", :user_ids => ["abc123", "def456"])
client.tags.untag(:name => "Test Tag", :user_ids => ["abc123", "def456"])users by tag: client.users.by_tag(124).each { |u| puts u.email } |
|
segments: client.segments.all.to_ausers by segment: client.users.by_segment('55490e308a6818289f000007').each { |u| puts u.email } |
|
conversations: client.conversations.mark_read('157')
client.conversations.reply(id: '157', type: 'user', body: 'Thanks again', message_type: 'comment', intercom_id: '55390fd78a6818acb1000099') |
|
Nice! If 1.9.3 support is being dropped perhaps some named parameters would be nice? E.g. Intercom::Client.new(app_id: 'my_app_id', api_key: 'my_api_key') |
|
👍 done |
bfb67ba to
86af5dc
Compare
version 3 - client based intercom ruby
|
This is all really interesting but I am having trouble understanding what necessitated this change or what the benefits are. Is there a rationale somewhere or list of issues we may run into if we stay on version 2? |
|
@gaffneyc - this change lets you use Intercom in a multi-app environment. For example, if you're providing an integration with Intercom to your own customers, creating New functionality as it arrives will be going into v3 though we're committed to not making breaking changes to our API that would affect v2 (or any client) going forward. |
|
@josler thanks for the response. That makes sense, though it's not a use case we're likely to run into only managing a single application. |