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
data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_get_the_correct_resource.yml
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://typetalk.in/oauth2/access_token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post%2Cmy
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Typetalk Rubygem 0.0.1
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 16 May 2014 11:30:24 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=2592000
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"access_token":"(ACCESS_TOKEN)","expires_in":3600,"scope":"topic.read,topic.post,my","refresh_token":"(REFRESH_TOKEN)","token_type":"Bearer"}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 16 May 2014 11:30:28 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/topics/5170/members/invite/1778/accept?access_token=(ACCESS_TOKEN)
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Content-Length:
|
52
|
+
- '0'
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
Server:
|
61
|
+
- nginx
|
62
|
+
Date:
|
63
|
+
- Fri, 16 May 2014 11:30:25 GMT
|
64
|
+
Content-Type:
|
65
|
+
- application/json; charset=utf-8
|
66
|
+
Transfer-Encoding:
|
67
|
+
- chunked
|
68
|
+
Connection:
|
69
|
+
- keep-alive
|
70
|
+
Cache-Control:
|
71
|
+
- no-cache
|
72
|
+
Etag:
|
73
|
+
- W/"4157af1f547be35987f311f9faca1115"
|
74
|
+
Strict-Transport-Security:
|
75
|
+
- max-age=2592000
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"invite":{"updatedAt":"2014-05-16T11:30:25Z","id":1778,"createdAt":"2014-05-16T10:33:49Z","sender":{"name":"umakoz","updatedAt":"2014-05-16T09:59:47Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400234387555"},"message":"Test
|
79
|
+
Topic Invitation 4","topic":{"name":"Test Topic 4","updatedAt":"2014-05-16T10:33:49Z","description":null,"id":5170,"lastPostedAt":null,"createdAt":"2014-05-16T10:33:49Z","suggestion":"Test
|
80
|
+
Topic 4"},"account":{"name":"typetalk-rubygem-tester","updatedAt":"2014-05-16T08:58:31Z","fullName":"Rubygem
|
81
|
+
Tester","id":3865,"createdAt":"2014-05-14T09:09:44Z","suggestion":"Rubygem
|
82
|
+
Tester","imageUrl":"https://typetalk.in/accounts/3865/profile_image.png?t=1400230711958"}}}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 16 May 2014 11:30:28 GMT
|
85
|
+
- request:
|
86
|
+
method: post
|
87
|
+
uri: https://typetalk.in/api/v1/topics/5170/members/invite/1778/accept?access_token=(ACCESS_TOKEN)
|
88
|
+
body:
|
89
|
+
encoding: UTF-8
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
Accept:
|
93
|
+
- application/json; charset=utf-8
|
94
|
+
User-Agent:
|
95
|
+
- Typetalk Rubygem 0.0.1
|
96
|
+
Content-Length:
|
97
|
+
- '0'
|
98
|
+
Accept-Encoding:
|
99
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 400
|
103
|
+
message: Bad Request
|
104
|
+
headers:
|
105
|
+
Server:
|
106
|
+
- nginx
|
107
|
+
Date:
|
108
|
+
- Fri, 16 May 2014 11:30:26 GMT
|
109
|
+
Content-Type:
|
110
|
+
- text/plain; charset=utf-8
|
111
|
+
Content-Length:
|
112
|
+
- '6'
|
113
|
+
Connection:
|
114
|
+
- keep-alive
|
115
|
+
body:
|
116
|
+
encoding: UTF-8
|
117
|
+
string: accept
|
118
|
+
http_version:
|
119
|
+
recorded_at: Fri, 16 May 2014 11:30:29 GMT
|
120
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://typetalk.in/oauth2/access_token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post%2Cmy
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Typetalk Rubygem 0.0.1
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 16 May 2014 11:30:28 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=2592000
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"access_token":"(ACCESS_TOKEN)","expires_in":3600,"scope":"topic.read,topic.post,my","refresh_token":"(REFRESH_TOKEN)","token_type":"Bearer"}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 16 May 2014 11:30:31 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/topics/5170/members/invite/dummy/accept?access_token=(ACCESS_TOKEN)
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Content-Length:
|
52
|
+
- '0'
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 400
|
58
|
+
message: Bad Request
|
59
|
+
headers:
|
60
|
+
Server:
|
61
|
+
- nginx
|
62
|
+
Date:
|
63
|
+
- Fri, 16 May 2014 11:30:29 GMT
|
64
|
+
Content-Length:
|
65
|
+
- '0'
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: ''
|
71
|
+
http_version:
|
72
|
+
recorded_at: Fri, 16 May 2014 11:30:32 GMT
|
73
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://typetalk.in/oauth2/access_token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post%2Cmy
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Typetalk Rubygem 0.0.1
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 16 May 2014 11:30:27 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=2592000
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"access_token":"(ACCESS_TOKEN)","expires_in":3600,"scope":"topic.read,topic.post,my","refresh_token":"(REFRESH_TOKEN)","token_type":"Bearer"}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 16 May 2014 11:30:30 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/topics/dummy/members/invite/dummy/accept?access_token=(ACCESS_TOKEN)
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Content-Length:
|
52
|
+
- '0'
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 400
|
58
|
+
message: Bad Request
|
59
|
+
headers:
|
60
|
+
Server:
|
61
|
+
- nginx
|
62
|
+
Date:
|
63
|
+
- Fri, 16 May 2014 11:30:27 GMT
|
64
|
+
Content-Length:
|
65
|
+
- '0'
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: ''
|
71
|
+
http_version:
|
72
|
+
recorded_at: Fri, 16 May 2014 11:30:31 GMT
|
73
|
+
recorded_with: VCR 2.9.0
|
data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_get_the_correct_resource.yml
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://typetalk.in/oauth2/access_token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post%2Cmy
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Typetalk Rubygem 0.0.1
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 16 May 2014 11:20:53 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=2592000
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"access_token":"(ACCESS_TOKEN)","expires_in":3600,"scope":"topic.read,topic.post,my","refresh_token":"(REFRESH_TOKEN)","token_type":"Bearer"}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 16 May 2014 11:20:56 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/teams/1039/members/invite/2053/decline?access_token=(ACCESS_TOKEN)
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Content-Length:
|
52
|
+
- '0'
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 200
|
58
|
+
message: OK
|
59
|
+
headers:
|
60
|
+
Server:
|
61
|
+
- nginx
|
62
|
+
Date:
|
63
|
+
- Fri, 16 May 2014 11:20:53 GMT
|
64
|
+
Content-Type:
|
65
|
+
- application/json; charset=utf-8
|
66
|
+
Transfer-Encoding:
|
67
|
+
- chunked
|
68
|
+
Connection:
|
69
|
+
- keep-alive
|
70
|
+
Cache-Control:
|
71
|
+
- no-cache
|
72
|
+
Etag:
|
73
|
+
- W/"0565bcf1b9ca8469e1ff88c36a6d2f79"
|
74
|
+
Strict-Transport-Security:
|
75
|
+
- max-age=2592000
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"updatedAt":"2014-05-16T11:20:53Z","role":"member","id":2053,"team":{"name":"Test
|
79
|
+
Team 4","updatedAt":"2014-05-16T10:32:43Z","description":null,"id":1039,"createdAt":"2014-05-16T10:32:43Z","imageUrl":"https://typetalk.in/teams/1039/image.png?t=1400236363878"},"createdAt":"2014-05-16T10:32:43Z","sender":{"name":"umakoz","updatedAt":"2014-05-16T09:59:47Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400234387555"},"message":"Test
|
80
|
+
Team Invitation 4","account":{"name":"typetalk-rubygem-tester","updatedAt":"2014-05-16T08:58:31Z","fullName":"Rubygem
|
81
|
+
Tester","id":3865,"createdAt":"2014-05-14T09:09:44Z","suggestion":"Rubygem
|
82
|
+
Tester","imageUrl":"https://typetalk.in/accounts/3865/profile_image.png?t=1400230711958"}}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Fri, 16 May 2014 11:20:57 GMT
|
85
|
+
- request:
|
86
|
+
method: post
|
87
|
+
uri: https://typetalk.in/api/v1/teams/1039/members/invite/2053/decline?access_token=(ACCESS_TOKEN)
|
88
|
+
body:
|
89
|
+
encoding: UTF-8
|
90
|
+
string: ''
|
91
|
+
headers:
|
92
|
+
Accept:
|
93
|
+
- application/json; charset=utf-8
|
94
|
+
User-Agent:
|
95
|
+
- Typetalk Rubygem 0.0.1
|
96
|
+
Content-Length:
|
97
|
+
- '0'
|
98
|
+
Accept-Encoding:
|
99
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
100
|
+
response:
|
101
|
+
status:
|
102
|
+
code: 400
|
103
|
+
message: Bad Request
|
104
|
+
headers:
|
105
|
+
Server:
|
106
|
+
- nginx
|
107
|
+
Date:
|
108
|
+
- Fri, 16 May 2014 11:10:47 GMT
|
109
|
+
Content-Length:
|
110
|
+
- '0'
|
111
|
+
Connection:
|
112
|
+
- keep-alive
|
113
|
+
body:
|
114
|
+
encoding: UTF-8
|
115
|
+
string: ''
|
116
|
+
http_version:
|
117
|
+
recorded_at: Fri, 16 May 2014 11:20:57 GMT
|
118
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://typetalk.in/oauth2/access_token
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post%2Cmy
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json; charset=utf-8
|
12
|
+
User-Agent:
|
13
|
+
- Typetalk Rubygem 0.0.1
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
Date:
|
26
|
+
- Fri, 16 May 2014 11:20:56 GMT
|
27
|
+
Content-Type:
|
28
|
+
- application/json; charset=utf-8
|
29
|
+
Transfer-Encoding:
|
30
|
+
- chunked
|
31
|
+
Connection:
|
32
|
+
- keep-alive
|
33
|
+
Strict-Transport-Security:
|
34
|
+
- max-age=2592000
|
35
|
+
body:
|
36
|
+
encoding: UTF-8
|
37
|
+
string: '{"access_token":"(ACCESS_TOKEN)","expires_in":3600,"scope":"topic.read,topic.post,my","refresh_token":"(REFRESH_TOKEN)","token_type":"Bearer"}'
|
38
|
+
http_version:
|
39
|
+
recorded_at: Fri, 16 May 2014 11:20:59 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/teams/1039/members/invite/dummy/decline?access_token=(ACCESS_TOKEN)
|
43
|
+
body:
|
44
|
+
encoding: UTF-8
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Content-Length:
|
52
|
+
- '0'
|
53
|
+
Accept-Encoding:
|
54
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
55
|
+
response:
|
56
|
+
status:
|
57
|
+
code: 400
|
58
|
+
message: Bad Request
|
59
|
+
headers:
|
60
|
+
Server:
|
61
|
+
- nginx
|
62
|
+
Date:
|
63
|
+
- Fri, 16 May 2014 11:20:57 GMT
|
64
|
+
Content-Length:
|
65
|
+
- '0'
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
body:
|
69
|
+
encoding: UTF-8
|
70
|
+
string: ''
|
71
|
+
http_version:
|
72
|
+
recorded_at: Fri, 16 May 2014 11:21:00 GMT
|
73
|
+
recorded_with: VCR 2.9.0
|