README.md in intercom-3.0.0b1 vs README.md in intercom-3.0.0
- old
+ new
@@ -20,29 +20,30 @@
gem install intercom
Using bundler:
- gem 'intercom', "~> 3.0.0b1"
+ gem 'intercom', "~> 3.0.0"
## Basic Usage
### Configure your client
```ruby
intercom = Intercom::Client.new(app_id: 'my_app_id', api_key: 'my_api_key')
```
-You can get your `app_id` from the URL when you're logged into Intercom (it's the alphanumeric just after `/apps/`) and your API key from the API keys integration settings page (under your app settings - integrations in Intercom).
+You can get your `app_id` from the URL when you're logged into Intercom (it's the alphanumeric just after `/apps/`) and your API key from the API keys integration settings page (under your app settings - integrations in Intercom).
### Resources
Resources this API supports:
https://api.intercom.io/users
https://api.intercom.io/contacts
https://api.intercom.io/companies
+ https://api.intercom.io/counts
https://api.intercom.io/tags
https://api.intercom.io/notes
https://api.intercom.io/segments
https://api.intercom.io/events
https://api.intercom.io/conversations
@@ -109,11 +110,11 @@
#### Tags
```ruby
# Tag users
tag = intercom.tags.tag(name: 'blue', users: [{email: "test1@example.com"}])
# Untag users
-intercom.tags.untag_users('blue', users: [{user_id: "42ea2f1b93891f6a99000427"}])
+intercom.tags.untag(name: 'blue', users: [{user_id: "42ea2f1b93891f6a99000427"}])
# Iterate over all tags
intercom.tags.all.each {|tag| "#{tag.id} - #{tag.name}" }
intercom.tags.all.map {|tag| tag.name }
# Tag companies
tag = intercom.tags.tag(name: 'blue', companies: [{id: "42ea2f1b93891f6a99000427"}])
@@ -309,9 +310,19 @@
# Find contacts by email
contacts = intercom.contacts.find_all(email: "some_contact@example.com")
# Convert a contact into a user
intercom.contacts.convert(contact, user)
+```
+
+### Counts
+
+```ruby
+# App-wide counts
+intercom.counts.for_app
+
+# Users in segment counts
+intercom.counts.for_type(type: 'user', count: 'segment')
```
### Subscriptions
Subscribe to events in Intercom to receive webhooks.