typetalk 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.rspec +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +215 -0
- data/Rakefile +7 -0
- data/lib/typetalk.rb +36 -0
- data/lib/typetalk/api.rb +49 -0
- data/lib/typetalk/api/auth.rb +43 -0
- data/lib/typetalk/api/mention.rb +28 -0
- data/lib/typetalk/api/message.rb +105 -0
- data/lib/typetalk/api/notification.rb +77 -0
- data/lib/typetalk/api/topic.rb +56 -0
- data/lib/typetalk/api/user.rb +17 -0
- data/lib/typetalk/connection.rb +31 -0
- data/lib/typetalk/error.rb +7 -0
- data/lib/typetalk/version.rb +3 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_authorization_code.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials_when_scope_changed.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_authorization_code_is_wrong.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_id_is_wrong.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_secret_is_wrong.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_redirect_uri_mismatch.yml +40 -0
- data/spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource.yml +85 -0
- data/spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource_till_mention.yml +83 -0
- data/spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_unread_resource.yml +83 -0
- data/spec/cassettes/Typetalk_Api_Mention/_read_mention/should_get_the_correct_resource.yml +83 -0
- data/spec/cassettes/Typetalk_Api_Mention/_read_mention/should_raise_error_when_mention_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Message/_get_message/should_get_the_correct_resource.yml +129 -0
- data/spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_post_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_topic_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_Message/_like_message/should_get_the_correct_resource.yml +161 -0
- data/spec/cassettes/Typetalk_Api_Message/_like_message/should_raise_error_when_post_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource.yml +85 -0
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_attachments.yml +536 -0
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_reply.yml +130 -0
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_talks.yml +88 -0
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_raise_error_when_topic_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource.yml +171 -0
- data/spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource_till_post.yml +171 -0
- data/spec/cassettes/Typetalk_Api_Message/_read_message/should_raise_error_when_post_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Message/_remove_message/should_get_the_correct_resource.yml +199 -0
- data/spec/cassettes/Typetalk_Api_Message/_remove_message/should_raise_error_when_post_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_Message/_unlike_message/should_get_the_correct_resource.yml +200 -0
- data/spec/cassettes/Typetalk_Api_Message/_unlike_message/should_raise_error_when_post_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_get_the_correct_resource.yml +258 -0
- data/spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_raise_error_when_topic_id_is_wrong.yml +250 -0
- data/spec/cassettes/Typetalk_Api_Notification/_accept_team/should_get_the_correct_resource.yml +119 -0
- data/spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_invite_team_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_team_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_get_the_correct_resource.yml +120 -0
- data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_invite_topic_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_topic_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_get_the_correct_resource.yml +118 -0
- data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_invite_team_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_team_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_get_the_correct_resource.yml +120 -0
- data/spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_invite_topic_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_topic_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Notification/_get_notifications/should_get_the_correct_resource.yml +101 -0
- data/spec/cassettes/Typetalk_Api_Notification/_get_notifications_status/should_get_the_correct_resource.yml +79 -0
- data/spec/cassettes/Typetalk_Api_Notification/_read_notifications/should_get_the_correct_resource.yml +81 -0
- data/spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_get_the_correct_resource.yml +82 -0
- data/spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_raise_error_when_topic_id_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_backward_resource.yml +85 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_forward_resource.yml +84 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_resource.yml +88 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_raise_error_when_topic_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_get_the_correct_resource.yml +81 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_raise_error_when_topic_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_Topic/_get_topics/should_get_the_correct_resource.yml +83 -0
- data/spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_get_the_correct_resource.yml +80 -0
- data/spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_raise_error_when_topic_id_is_wrong.yml +71 -0
- data/spec/cassettes/Typetalk_Api_User/_get_profile/should_get_the_correct_resource.yml +81 -0
- data/spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_access_token_is_wrong.yml +73 -0
- data/spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_scope_is_wrong.yml +73 -0
- data/spec/fixtures/attachments/logo_cacoo.jpg +0 -0
- data/spec/fixtures/attachments/logo_typetalk.jpg +0 -0
- data/spec/spec_helper.rb +36 -0
- data/spec/typetalk/api/auth_spec.rb +81 -0
- data/spec/typetalk/api/mention_spec.rb +73 -0
- data/spec/typetalk/api/message_spec.rb +232 -0
- data/spec/typetalk/api/notification_spec.rb +200 -0
- data/spec/typetalk/api/topic_spec.rb +150 -0
- data/spec/typetalk/api/user_spec.rb +27 -0
- data/typetalk.gemspec +33 -0
- metadata +326 -0
@@ -0,0 +1,200 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Typetalk::Api::Notification do
|
5
|
+
|
6
|
+
let(:api) { Typetalk::Api.new }
|
7
|
+
|
8
|
+
describe '#get_notifications', :vcr do
|
9
|
+
it 'should get the correct resource' do
|
10
|
+
response = api.get_notifications
|
11
|
+
expect(response).to be_a(Hashie::Mash)
|
12
|
+
|
13
|
+
expect(response.invites.teams.size).to eq(2)
|
14
|
+
expect(response.invites.teams[0].role).to eq('member')
|
15
|
+
expect(response.invites.teams[0].team.name).to eq('Test Team 3')
|
16
|
+
expect(response.invites.teams[0].sender.name).to eq('umakoz')
|
17
|
+
expect(response.invites.teams[0].message).to eq('Test Team Invitation 3')
|
18
|
+
expect(response.invites.teams[0].account.name).to eq('typetalk-rubygem-tester')
|
19
|
+
expect(response.invites.teams[1].role).to eq('member')
|
20
|
+
expect(response.invites.teams[1].team.name).to eq('Test Team 4')
|
21
|
+
expect(response.invites.teams[1].sender.name).to eq('umakoz')
|
22
|
+
expect(response.invites.teams[1].message).to eq('Test Team Invitation 4')
|
23
|
+
expect(response.invites.teams[1].account.name).to eq('typetalk-rubygem-tester')
|
24
|
+
|
25
|
+
expect(response.invites.topics.size).to eq(2)
|
26
|
+
expect(response.invites.topics[0].topic.name).to eq('Test Topic 5')
|
27
|
+
expect(response.invites.topics[0].sender.name).to eq('umakoz')
|
28
|
+
expect(response.invites.topics[0].message).to eq('Test Topic Invitation 5')
|
29
|
+
expect(response.invites.topics[0].account.name).to eq('typetalk-rubygem-tester')
|
30
|
+
expect(response.invites.topics[1].topic.name).to eq('Test Topic 4')
|
31
|
+
expect(response.invites.topics[1].sender.name).to eq('umakoz')
|
32
|
+
expect(response.invites.topics[1].message).to eq('Test Topic Invitation 4')
|
33
|
+
expect(response.invites.topics[1].account.name).to eq('typetalk-rubygem-tester')
|
34
|
+
|
35
|
+
expect(response.mentions.size).to eq(3)
|
36
|
+
expect(response.mentions[0].post.message).to eq('Test Message 1 - 4 @typetalk-rubygem-tester ')
|
37
|
+
expect(response.mentions[0].post.topic.name).to eq('Test Topic 1')
|
38
|
+
expect(response.mentions[0].post.account.name).to eq('umakoz')
|
39
|
+
expect(response.mentions[1].post.message).to eq('Test Message 1 - 3 @typetalk-rubygem-tester ')
|
40
|
+
expect(response.mentions[1].post.topic.name).to eq('Test Topic 1')
|
41
|
+
expect(response.mentions[1].post.account.name).to eq('umakoz')
|
42
|
+
expect(response.mentions[2].post.message).to eq('Test Message 3 - 5 @typetalk-rubygem-tester ')
|
43
|
+
expect(response.mentions[2].post.topic.name).to eq('Test Topic 3')
|
44
|
+
expect(response.mentions[2].post.account.name).to eq('umakoz')
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
describe '#get_notifications_status', :vcr do
|
53
|
+
it 'should get the correct resource' do
|
54
|
+
response = api.get_notifications_status
|
55
|
+
expect(response).to be_a(Hashie::Mash)
|
56
|
+
|
57
|
+
expect(response.access.unopened).to eq(0)
|
58
|
+
expect(response.invite.team.pending).to eq(2)
|
59
|
+
expect(response.invite.topic.pending).to eq(2)
|
60
|
+
expect(response.mention.unread).to eq(1)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
describe '#read_notifications', :vcr do
|
69
|
+
it 'should get the correct resource' do
|
70
|
+
response = api.read_notifications
|
71
|
+
expect(response).to be_a(Hashie::Mash)
|
72
|
+
|
73
|
+
expect(response.access.unopened).to eq(0)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
describe '#accept_team', :vcr do
|
82
|
+
it 'should get the correct resource' do
|
83
|
+
response = api.accept_team(1038, 2052) # Test Team 3
|
84
|
+
expect(response).to be_a(Hashie::Mash)
|
85
|
+
|
86
|
+
expect(response.topics[0].name).to eq('Test Team 3')
|
87
|
+
expect(response.invite.role).to eq('member')
|
88
|
+
expect(response.invite.team.name).to eq('Test Team 3')
|
89
|
+
expect(response.invite.sender.name).to eq('umakoz')
|
90
|
+
expect(response.invite.message).to eq('Test Team Invitation 3')
|
91
|
+
expect(response.invite.account.name).to eq('typetalk-rubygem-tester')
|
92
|
+
|
93
|
+
# already accept team
|
94
|
+
expect{ api.accept_team(1038, 2052) }.to raise_error(Typetalk::InvalidRequest)
|
95
|
+
end
|
96
|
+
|
97
|
+
|
98
|
+
it 'should raise error when team_id is wrong' do
|
99
|
+
expect{ api.accept_team('dummy', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
it 'should raise error when invite_team_id is wrong' do
|
104
|
+
# Test Team 3
|
105
|
+
expect{ api.accept_team('1038', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
describe '#decline_team', :vcr do
|
114
|
+
it 'should get the correct resource' do
|
115
|
+
response = api.decline_team(1039, 2053) # Test Team 4
|
116
|
+
expect(response).to be_a(Hashie::Mash)
|
117
|
+
|
118
|
+
expect(response.role).to eq('member')
|
119
|
+
expect(response.team.name).to eq('Test Team 4')
|
120
|
+
expect(response.sender.name).to eq('umakoz')
|
121
|
+
expect(response.message).to eq('Test Team Invitation 4')
|
122
|
+
expect(response.account.name).to eq('typetalk-rubygem-tester')
|
123
|
+
|
124
|
+
# already decline team
|
125
|
+
expect{ api.decline_team(1039, 2053) }.to raise_error(Typetalk::InvalidRequest)
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
it 'should raise error when team_id is wrong' do
|
130
|
+
expect{ api.decline_team('dummy', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
131
|
+
end
|
132
|
+
|
133
|
+
|
134
|
+
it 'should raise error when invite_team_id is wrong' do
|
135
|
+
# Test Team 4
|
136
|
+
expect{ api.decline_team('1039', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
describe '#accept_topic', :vcr do
|
145
|
+
it 'should get the correct resource' do
|
146
|
+
response = api.accept_topic(5170, 1778) # Test Topic 4
|
147
|
+
expect(response).to be_a(Hashie::Mash)
|
148
|
+
|
149
|
+
expect(response.invite.topic.name).to eq('Test Topic 4')
|
150
|
+
expect(response.invite.sender.name).to eq('umakoz')
|
151
|
+
expect(response.invite.message).to eq('Test Topic Invitation 4')
|
152
|
+
expect(response.invite.account.name).to eq('typetalk-rubygem-tester')
|
153
|
+
|
154
|
+
# already accept topic
|
155
|
+
expect{ api.accept_topic(5170, 1778) }.to raise_error(Typetalk::InvalidRequest)
|
156
|
+
end
|
157
|
+
|
158
|
+
|
159
|
+
it 'should raise error when topic_id is wrong' do
|
160
|
+
expect{ api.accept_topic('dummy', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
it 'should raise error when invite_topic_id is wrong' do
|
165
|
+
# Test Topic 4
|
166
|
+
expect{ api.accept_topic('5170', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
describe '#decline_topic', :vcr do
|
175
|
+
it 'should get the correct resource' do
|
176
|
+
response = api.decline_topic(5171, 1779) # Test Topic 5
|
177
|
+
expect(response).to be_a(Hashie::Mash)
|
178
|
+
|
179
|
+
expect(response.invite.topic.name).to eq('Test Topic 5')
|
180
|
+
expect(response.invite.sender.name).to eq('umakoz')
|
181
|
+
expect(response.invite.message).to eq('Test Topic Invitation 5')
|
182
|
+
expect(response.invite.account.name).to eq('typetalk-rubygem-tester')
|
183
|
+
|
184
|
+
# already decline topic
|
185
|
+
expect{ api.decline_topic(5171, 1779) }.to raise_error(Typetalk::InvalidRequest)
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
it 'should raise error when topic_id is wrong' do
|
190
|
+
expect{ api.decline_topic('dummy', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
191
|
+
end
|
192
|
+
|
193
|
+
|
194
|
+
it 'should raise error when invite_topic_id is wrong' do
|
195
|
+
# Test Topic 5
|
196
|
+
expect{ api.decline_topic('5171', 'dummy') }.to raise_error(Typetalk::InvalidRequest)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Typetalk::Api::Topic do
|
5
|
+
|
6
|
+
let(:api) { Typetalk::Api.new }
|
7
|
+
let(:topic_id) { 5149 } # Test Topic 3
|
8
|
+
|
9
|
+
describe '#get_topics', :vcr do
|
10
|
+
it 'should get the correct resource' do
|
11
|
+
response = api.get_topics
|
12
|
+
expect(response).to be_a(Hashie::Mash)
|
13
|
+
expect(response.topics.size).to eq(3)
|
14
|
+
|
15
|
+
topic1 = response.topics.find {|t| t.topic.name == 'Test Topic 1'}
|
16
|
+
expect(topic1).to be_a(Hashie::Mash)
|
17
|
+
expect(topic1.favorite).to be true
|
18
|
+
expect(topic1.unread['count']).to eq(1)
|
19
|
+
|
20
|
+
topic2 = response.topics.find {|t| t.topic.name == 'Test Topic 2'}
|
21
|
+
expect(topic2).to be_a(Hashie::Mash)
|
22
|
+
expect(topic2.favorite).to be true
|
23
|
+
expect(topic2.unread).to be_nil
|
24
|
+
|
25
|
+
topic3 = response.topics.find {|t| t.topic.name == 'Test Topic 3'}
|
26
|
+
expect(topic3).to be_a(Hashie::Mash)
|
27
|
+
expect(topic3.favorite).to be false
|
28
|
+
expect(topic3.unread['count']).to eq(3)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
describe '#get_topic', :vcr do
|
35
|
+
it 'should get the correct resource' do
|
36
|
+
response = api.get_topic(topic_id)
|
37
|
+
expect(response).to be_a(Hashie::Mash)
|
38
|
+
expect(response.posts.size).to eq(6)
|
39
|
+
|
40
|
+
expect(response.posts[0].topicId).to eq(topic_id)
|
41
|
+
expect(response.posts[0].message).to eq('Test Message 3 - 1')
|
42
|
+
expect(response.posts[0].account.name).to eq('umakoz')
|
43
|
+
expect(response.posts[0].talks).to be_empty
|
44
|
+
expect(response.posts[0].replyTo).to be_nil
|
45
|
+
expect(response.posts[0].likes).to be_empty
|
46
|
+
expect(response.posts[0].links).to be_empty
|
47
|
+
expect(response.posts[0].mention).to be_nil
|
48
|
+
expect(response.posts[0].attachments).to be_empty
|
49
|
+
|
50
|
+
expect(response.posts[1].message).to eq('Test Message 3 - 2')
|
51
|
+
expect(response.posts[1].likes).not_to be_nil
|
52
|
+
|
53
|
+
expect(response.posts[2].message).to eq('Test Message 3 - 3')
|
54
|
+
expect(response.posts[2].talks[0].name).to eq('Test Summary 3 - 1')
|
55
|
+
|
56
|
+
expect(response.posts[3].message).to eq('Test Message 3 - 4')
|
57
|
+
expect(response.posts[3].replyTo).to eq(response.posts[0].id)
|
58
|
+
|
59
|
+
expect(response.posts[4].message).to eq('Test Message 3 - 5 @typetalk-rubygem-tester ')
|
60
|
+
expect(response.posts[4].mention).not_to be_nil
|
61
|
+
|
62
|
+
expect(response.posts[5].message).to eq('Test Message 3 - 6')
|
63
|
+
expect(response.posts[5].attachments[0].fileName).to eq('logo.jpg')
|
64
|
+
|
65
|
+
expect(response.bookmark.postId).to eq(response.posts[0].id)
|
66
|
+
expect(response.hasNext).to be false
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
it 'should get the correct backward resource' do
|
71
|
+
response = api.get_topic(topic_id, count:3, direction:'backward', from:278782) # Test Message 3 - 5
|
72
|
+
expect(response).to be_a(Hashie::Mash)
|
73
|
+
expect(response.posts.size).to eq(3)
|
74
|
+
|
75
|
+
expect(response.posts[0].message).to eq('Test Message 3 - 2')
|
76
|
+
expect(response.posts[1].message).to eq('Test Message 3 - 3')
|
77
|
+
expect(response.posts[2].message).to eq('Test Message 3 - 4')
|
78
|
+
expect(response.hasNext).to be true
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
it 'should get the correct forward resource' do
|
83
|
+
response = api.get_topic(topic_id, count:2, direction:'forward', from:278765) # Test Message 3 - 2
|
84
|
+
expect(response).to be_a(Hashie::Mash)
|
85
|
+
expect(response.posts.size).to eq(2)
|
86
|
+
|
87
|
+
expect(response.posts[0].message).to eq('Test Message 3 - 3')
|
88
|
+
expect(response.posts[1].message).to eq('Test Message 3 - 4')
|
89
|
+
expect(response.hasNext).to be true
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
it 'should raise error when topic_id is wrong' do
|
94
|
+
expect{ api.get_topic('dummy') }.to raise_error(Typetalk::InvalidRequest)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
describe '#get_topic_members', :vcr do
|
101
|
+
it 'should get the correct resource' do
|
102
|
+
response = api.get_topic_members(topic_id)
|
103
|
+
expect(response).to be_a(Hashie::Mash)
|
104
|
+
expect(response.accounts.size).to eq(2)
|
105
|
+
|
106
|
+
account1 = response.accounts.find {|a| a.account.name == 'typetalk-rubygem-tester'}
|
107
|
+
expect(account1).not_to be_nil
|
108
|
+
account2 = response.accounts.find {|a| a.account.name == 'umakoz'}
|
109
|
+
expect(account2).not_to be_nil
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
it 'should raise error when topic_id is wrong' do
|
114
|
+
expect{ api.get_topic_members('dummy') }.to raise_error(Typetalk::InvalidRequest)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
describe '#favorite_topic', :vcr do
|
121
|
+
it 'should get the correct resource' do
|
122
|
+
response = api.favorite_topic(topic_id)
|
123
|
+
expect(response).to be_a(Hashie::Mash)
|
124
|
+
expect(response.id).to eq(topic_id)
|
125
|
+
expect(response.name).to eq('Test Topic 3')
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
it 'should raise error when topic_id is wrong' do
|
130
|
+
expect{ api.favorite_topic('dummy') }.to raise_error(Typetalk::InvalidRequest)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
describe '#unfavorite_topic', :vcr do
|
137
|
+
it 'should get the correct resource' do
|
138
|
+
response = api.unfavorite_topic(topic_id)
|
139
|
+
expect(response).to be_a(Hashie::Mash)
|
140
|
+
expect(response.id).to eq(topic_id)
|
141
|
+
expect(response.name).to eq('Test Topic 3')
|
142
|
+
end
|
143
|
+
|
144
|
+
|
145
|
+
it 'should raise error when topic_id is wrong' do
|
146
|
+
expect{ api.unfavorite_topic('dummy') }.to raise_error(Typetalk::InvalidRequest)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe Typetalk::Api::User do
|
5
|
+
|
6
|
+
let(:api) { Typetalk::Api.new }
|
7
|
+
|
8
|
+
describe '#get_profile', :vcr do
|
9
|
+
it 'should get the correct resource' do
|
10
|
+
response = api.get_profile
|
11
|
+
expect(response).to be_a(Hashie::Mash)
|
12
|
+
expect(response.account.name).to eq('typetalk-rubygem-tester')
|
13
|
+
expect(response.account.fullName).to eq('Rubygem Tester')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should raise error when access_token is wrong' do
|
17
|
+
api.get_access_token
|
18
|
+
expect{ api.get_profile(token: '(WRONG_ACCESS_TOKEN)') }.to raise_error(Typetalk::InvalidRequest)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should raise error when scope is wrong' do
|
22
|
+
r = api.get_access_token(scope: 'topic.read,topic.post')
|
23
|
+
expect{ api.get_profile(token: r.access_token) }.to raise_error(Typetalk::InvalidRequest)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
data/typetalk.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'typetalk/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "typetalk"
|
8
|
+
spec.version = Typetalk::VERSION
|
9
|
+
spec.authors = ["umakoz"]
|
10
|
+
spec.email = ["umakoz@gmail.com"]
|
11
|
+
spec.summary = %q{A Ruby wrapper for Typetalk}
|
12
|
+
spec.description = %q{A Ruby wrapper for Typetalk}
|
13
|
+
spec.homepage = "https://github.com/umakoz/typetalk"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.required_ruby_version = '>= 2.0.0'
|
22
|
+
|
23
|
+
spec.add_dependency "hashie"
|
24
|
+
spec.add_dependency "faraday"
|
25
|
+
spec.add_dependency "mime-types"
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
28
|
+
spec.add_development_dependency "rake"
|
29
|
+
spec.add_development_dependency "rspec"
|
30
|
+
spec.add_development_dependency "webmock"
|
31
|
+
spec.add_development_dependency "vcr"
|
32
|
+
spec.add_development_dependency "awesome_print"
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,326 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: typetalk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- umakoz
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: hashie
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mime-types
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: vcr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - '>='
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: awesome_print
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '>='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description: A Ruby wrapper for Typetalk
|
140
|
+
email:
|
141
|
+
- umakoz@gmail.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- .gitignore
|
147
|
+
- .rspec
|
148
|
+
- Gemfile
|
149
|
+
- LICENSE.txt
|
150
|
+
- README.md
|
151
|
+
- Rakefile
|
152
|
+
- lib/typetalk.rb
|
153
|
+
- lib/typetalk/api.rb
|
154
|
+
- lib/typetalk/api/auth.rb
|
155
|
+
- lib/typetalk/api/mention.rb
|
156
|
+
- lib/typetalk/api/message.rb
|
157
|
+
- lib/typetalk/api/notification.rb
|
158
|
+
- lib/typetalk/api/topic.rb
|
159
|
+
- lib/typetalk/api/user.rb
|
160
|
+
- lib/typetalk/connection.rb
|
161
|
+
- lib/typetalk/error.rb
|
162
|
+
- lib/typetalk/version.rb
|
163
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_authorization_code.yml
|
164
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials.yml
|
165
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials_when_scope_changed.yml
|
166
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_authorization_code_is_wrong.yml
|
167
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_id_is_wrong.yml
|
168
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_secret_is_wrong.yml
|
169
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_redirect_uri_mismatch.yml
|
170
|
+
- spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource.yml
|
171
|
+
- spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource_till_mention.yml
|
172
|
+
- spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_unread_resource.yml
|
173
|
+
- spec/cassettes/Typetalk_Api_Mention/_read_mention/should_get_the_correct_resource.yml
|
174
|
+
- spec/cassettes/Typetalk_Api_Mention/_read_mention/should_raise_error_when_mention_id_is_wrong.yml
|
175
|
+
- spec/cassettes/Typetalk_Api_Message/_get_message/should_get_the_correct_resource.yml
|
176
|
+
- spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_post_id_is_wrong.yml
|
177
|
+
- spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_topic_id_is_wrong.yml
|
178
|
+
- spec/cassettes/Typetalk_Api_Message/_like_message/should_get_the_correct_resource.yml
|
179
|
+
- spec/cassettes/Typetalk_Api_Message/_like_message/should_raise_error_when_post_id_is_wrong.yml
|
180
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource.yml
|
181
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_attachments.yml
|
182
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_reply.yml
|
183
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_talks.yml
|
184
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_raise_error_when_topic_id_is_wrong.yml
|
185
|
+
- spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource.yml
|
186
|
+
- spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource_till_post.yml
|
187
|
+
- spec/cassettes/Typetalk_Api_Message/_read_message/should_raise_error_when_post_id_is_wrong.yml
|
188
|
+
- spec/cassettes/Typetalk_Api_Message/_remove_message/should_get_the_correct_resource.yml
|
189
|
+
- spec/cassettes/Typetalk_Api_Message/_remove_message/should_raise_error_when_post_id_is_wrong.yml
|
190
|
+
- spec/cassettes/Typetalk_Api_Message/_unlike_message/should_get_the_correct_resource.yml
|
191
|
+
- spec/cassettes/Typetalk_Api_Message/_unlike_message/should_raise_error_when_post_id_is_wrong.yml
|
192
|
+
- spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_get_the_correct_resource.yml
|
193
|
+
- spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_raise_error_when_topic_id_is_wrong.yml
|
194
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_team/should_get_the_correct_resource.yml
|
195
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_invite_team_id_is_wrong.yml
|
196
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_team_id_is_wrong.yml
|
197
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_get_the_correct_resource.yml
|
198
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_invite_topic_id_is_wrong.yml
|
199
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_topic_id_is_wrong.yml
|
200
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_team/should_get_the_correct_resource.yml
|
201
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_invite_team_id_is_wrong.yml
|
202
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_team_id_is_wrong.yml
|
203
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_get_the_correct_resource.yml
|
204
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_invite_topic_id_is_wrong.yml
|
205
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_topic_id_is_wrong.yml
|
206
|
+
- spec/cassettes/Typetalk_Api_Notification/_get_notifications/should_get_the_correct_resource.yml
|
207
|
+
- spec/cassettes/Typetalk_Api_Notification/_get_notifications_status/should_get_the_correct_resource.yml
|
208
|
+
- spec/cassettes/Typetalk_Api_Notification/_read_notifications/should_get_the_correct_resource.yml
|
209
|
+
- spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_get_the_correct_resource.yml
|
210
|
+
- spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_raise_error_when_topic_id_is_wrong.yml
|
211
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_backward_resource.yml
|
212
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_forward_resource.yml
|
213
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_resource.yml
|
214
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_raise_error_when_topic_id_is_wrong.yml
|
215
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_get_the_correct_resource.yml
|
216
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_raise_error_when_topic_id_is_wrong.yml
|
217
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topics/should_get_the_correct_resource.yml
|
218
|
+
- spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_get_the_correct_resource.yml
|
219
|
+
- spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_raise_error_when_topic_id_is_wrong.yml
|
220
|
+
- spec/cassettes/Typetalk_Api_User/_get_profile/should_get_the_correct_resource.yml
|
221
|
+
- spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_access_token_is_wrong.yml
|
222
|
+
- spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_scope_is_wrong.yml
|
223
|
+
- spec/fixtures/attachments/logo_cacoo.jpg
|
224
|
+
- spec/fixtures/attachments/logo_typetalk.jpg
|
225
|
+
- spec/spec_helper.rb
|
226
|
+
- spec/typetalk/api/auth_spec.rb
|
227
|
+
- spec/typetalk/api/mention_spec.rb
|
228
|
+
- spec/typetalk/api/message_spec.rb
|
229
|
+
- spec/typetalk/api/notification_spec.rb
|
230
|
+
- spec/typetalk/api/topic_spec.rb
|
231
|
+
- spec/typetalk/api/user_spec.rb
|
232
|
+
- typetalk.gemspec
|
233
|
+
homepage: https://github.com/umakoz/typetalk
|
234
|
+
licenses:
|
235
|
+
- MIT
|
236
|
+
metadata: {}
|
237
|
+
post_install_message:
|
238
|
+
rdoc_options: []
|
239
|
+
require_paths:
|
240
|
+
- lib
|
241
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
242
|
+
requirements:
|
243
|
+
- - '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: 2.0.0
|
246
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - '>='
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
requirements: []
|
252
|
+
rubyforge_project:
|
253
|
+
rubygems_version: 2.0.14
|
254
|
+
signing_key:
|
255
|
+
specification_version: 4
|
256
|
+
summary: A Ruby wrapper for Typetalk
|
257
|
+
test_files:
|
258
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_authorization_code.yml
|
259
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials.yml
|
260
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials_when_scope_changed.yml
|
261
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_authorization_code_is_wrong.yml
|
262
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_id_is_wrong.yml
|
263
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_secret_is_wrong.yml
|
264
|
+
- spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_redirect_uri_mismatch.yml
|
265
|
+
- spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource.yml
|
266
|
+
- spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource_till_mention.yml
|
267
|
+
- spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_unread_resource.yml
|
268
|
+
- spec/cassettes/Typetalk_Api_Mention/_read_mention/should_get_the_correct_resource.yml
|
269
|
+
- spec/cassettes/Typetalk_Api_Mention/_read_mention/should_raise_error_when_mention_id_is_wrong.yml
|
270
|
+
- spec/cassettes/Typetalk_Api_Message/_get_message/should_get_the_correct_resource.yml
|
271
|
+
- spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_post_id_is_wrong.yml
|
272
|
+
- spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_topic_id_is_wrong.yml
|
273
|
+
- spec/cassettes/Typetalk_Api_Message/_like_message/should_get_the_correct_resource.yml
|
274
|
+
- spec/cassettes/Typetalk_Api_Message/_like_message/should_raise_error_when_post_id_is_wrong.yml
|
275
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource.yml
|
276
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_attachments.yml
|
277
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_reply.yml
|
278
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_talks.yml
|
279
|
+
- spec/cassettes/Typetalk_Api_Message/_post_message/should_raise_error_when_topic_id_is_wrong.yml
|
280
|
+
- spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource.yml
|
281
|
+
- spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource_till_post.yml
|
282
|
+
- spec/cassettes/Typetalk_Api_Message/_read_message/should_raise_error_when_post_id_is_wrong.yml
|
283
|
+
- spec/cassettes/Typetalk_Api_Message/_remove_message/should_get_the_correct_resource.yml
|
284
|
+
- spec/cassettes/Typetalk_Api_Message/_remove_message/should_raise_error_when_post_id_is_wrong.yml
|
285
|
+
- spec/cassettes/Typetalk_Api_Message/_unlike_message/should_get_the_correct_resource.yml
|
286
|
+
- spec/cassettes/Typetalk_Api_Message/_unlike_message/should_raise_error_when_post_id_is_wrong.yml
|
287
|
+
- spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_get_the_correct_resource.yml
|
288
|
+
- spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_raise_error_when_topic_id_is_wrong.yml
|
289
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_team/should_get_the_correct_resource.yml
|
290
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_invite_team_id_is_wrong.yml
|
291
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_team_id_is_wrong.yml
|
292
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_get_the_correct_resource.yml
|
293
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_invite_topic_id_is_wrong.yml
|
294
|
+
- spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_topic_id_is_wrong.yml
|
295
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_team/should_get_the_correct_resource.yml
|
296
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_invite_team_id_is_wrong.yml
|
297
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_team_id_is_wrong.yml
|
298
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_get_the_correct_resource.yml
|
299
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_invite_topic_id_is_wrong.yml
|
300
|
+
- spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_topic_id_is_wrong.yml
|
301
|
+
- spec/cassettes/Typetalk_Api_Notification/_get_notifications/should_get_the_correct_resource.yml
|
302
|
+
- spec/cassettes/Typetalk_Api_Notification/_get_notifications_status/should_get_the_correct_resource.yml
|
303
|
+
- spec/cassettes/Typetalk_Api_Notification/_read_notifications/should_get_the_correct_resource.yml
|
304
|
+
- spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_get_the_correct_resource.yml
|
305
|
+
- spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_raise_error_when_topic_id_is_wrong.yml
|
306
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_backward_resource.yml
|
307
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_forward_resource.yml
|
308
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_resource.yml
|
309
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic/should_raise_error_when_topic_id_is_wrong.yml
|
310
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_get_the_correct_resource.yml
|
311
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_raise_error_when_topic_id_is_wrong.yml
|
312
|
+
- spec/cassettes/Typetalk_Api_Topic/_get_topics/should_get_the_correct_resource.yml
|
313
|
+
- spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_get_the_correct_resource.yml
|
314
|
+
- spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_raise_error_when_topic_id_is_wrong.yml
|
315
|
+
- spec/cassettes/Typetalk_Api_User/_get_profile/should_get_the_correct_resource.yml
|
316
|
+
- spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_access_token_is_wrong.yml
|
317
|
+
- spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_scope_is_wrong.yml
|
318
|
+
- spec/fixtures/attachments/logo_cacoo.jpg
|
319
|
+
- spec/fixtures/attachments/logo_typetalk.jpg
|
320
|
+
- spec/spec_helper.rb
|
321
|
+
- spec/typetalk/api/auth_spec.rb
|
322
|
+
- spec/typetalk/api/mention_spec.rb
|
323
|
+
- spec/typetalk/api/message_spec.rb
|
324
|
+
- spec/typetalk/api/notification_spec.rb
|
325
|
+
- spec/typetalk/api/topic_spec.rb
|
326
|
+
- spec/typetalk/api/user_spec.rb
|