intercom 3.6.0 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/intercom/service/conversation.rb +1 -0
- data/lib/intercom/version.rb +1 -1
- data/spec/spec_helper.rb +50 -0
- data/spec/unit/intercom/conversation_spec.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7be32afec8fcf15ffa2598c616e9683009061cde
|
4
|
+
data.tar.gz: 1b8d355eca0509e9a908f0837a429cd4e7b8f4b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2555e34cce12982bbc52c2d4c0fba7e2671362edeb52ce7b5d93135ad9d4ac1382d98a52a37b51f4a6a33fc38a3069423aaf4aa6f8a0507ca4009a22305b4b3f
|
7
|
+
data.tar.gz: 356cc3db92090c795b57854072ef16b6711afe296320545691778aa8a30666da78670f31b685944cbc5eaac84611c1a8e0002ec475268a358b54a0f1504562ff
|
data/README.md
CHANGED
@@ -176,6 +176,9 @@ intercom.notes.find_all(user_id: '123').each {|note| puts note.body}
|
|
176
176
|
|
177
177
|
#### Conversations
|
178
178
|
```ruby
|
179
|
+
# Iterate over all conversations for your app
|
180
|
+
intercom.conversations.all.each { |convo| ... }
|
181
|
+
|
179
182
|
# FINDING CONVERSATIONS FOR AN ADMIN
|
180
183
|
# Iterate over all conversations (open and closed) assigned to an admin
|
181
184
|
intercom.conversations.find_all(type: 'admin', id: '7').each {|convo| ... }
|
data/lib/intercom/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -291,6 +291,56 @@ def test_conversation
|
|
291
291
|
}
|
292
292
|
end
|
293
293
|
|
294
|
+
def test_conversation_list
|
295
|
+
{
|
296
|
+
"type" => "conversation.list",
|
297
|
+
"pages" => {
|
298
|
+
"type" => "pages",
|
299
|
+
"page" => 1,
|
300
|
+
"per_page" => 20,
|
301
|
+
"total_pages" => 1
|
302
|
+
},
|
303
|
+
"conversations" => [
|
304
|
+
{
|
305
|
+
"type" => "conversation",
|
306
|
+
"id" => "147",
|
307
|
+
"created_at" => 1400850973,
|
308
|
+
"updated_at" => 1400857494,
|
309
|
+
"conversation_message" => {
|
310
|
+
"type" => "conversation_message",
|
311
|
+
"subject" => "",
|
312
|
+
"body" => "<p>Hi Alice,</p>\n\n<p>We noticed you using our Product, do you have any questions?</p> \n<p>- Jane</p>",
|
313
|
+
"author" => {
|
314
|
+
"type" => "admin",
|
315
|
+
"id" => "25"
|
316
|
+
},
|
317
|
+
"attachments" => [
|
318
|
+
{
|
319
|
+
"name" => "signature",
|
320
|
+
"url" => "http =>//someurl.com/signature.jpg"
|
321
|
+
}
|
322
|
+
]
|
323
|
+
},
|
324
|
+
"user" => {
|
325
|
+
"type" => "user",
|
326
|
+
"id" => "536e564f316c83104c000020"
|
327
|
+
},
|
328
|
+
"assignee" => {
|
329
|
+
"type" => "admin",
|
330
|
+
"id" => "25"
|
331
|
+
},
|
332
|
+
"open" => true,
|
333
|
+
"read" => true,
|
334
|
+
"conversation_parts" => {
|
335
|
+
"type" => "conversation_part.list",
|
336
|
+
"conversation_parts" => [
|
337
|
+
]
|
338
|
+
}
|
339
|
+
}
|
340
|
+
]
|
341
|
+
}
|
342
|
+
end
|
343
|
+
|
294
344
|
def segment
|
295
345
|
{
|
296
346
|
"type" => "segment",
|
@@ -8,6 +8,11 @@ describe "Intercom::Conversation" do
|
|
8
8
|
client.conversations.find(:id => "147")
|
9
9
|
end
|
10
10
|
|
11
|
+
it "gets all conversations" do
|
12
|
+
client.expects(:get).with("/conversations", {}).returns(test_conversation_list)
|
13
|
+
client.conversations.all.each { |c| }
|
14
|
+
end
|
15
|
+
|
11
16
|
it 'marks a conversation as read' do
|
12
17
|
client.expects(:put).with('/conversations/147', { read: true })
|
13
18
|
client.conversations.mark_read('147')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intercom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben McRedmond
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2018-10-
|
18
|
+
date: 2018-10-03 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: minitest
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project: intercom
|
232
|
-
rubygems_version: 2.6.14
|
232
|
+
rubygems_version: 2.6.14.1
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: Ruby bindings for the Intercom API
|