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,81 @@
|
|
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 10:59:15 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 10:59:18 GMT
|
40
|
+
- request:
|
41
|
+
method: put
|
42
|
+
uri: https://typetalk.in/api/v1/notifications/open?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 10:59:15 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/"1995446ae626c04ba0ff5107e10244de"
|
74
|
+
Strict-Transport-Security:
|
75
|
+
- max-age=2592000
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"access":{"unopened":0}}'
|
79
|
+
http_version:
|
80
|
+
recorded_at: Fri, 16 May 2014 10:59:19 GMT
|
81
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,82 @@
|
|
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
|
+
- Thu, 15 May 2014 10:30:43 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: Thu, 15 May 2014 10:30:43 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/topics/5149/favorite?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
|
+
- Thu, 15 May 2014 10:30:44 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/"ab51fbfe9800e8f3f38ca9beffba1b99"
|
74
|
+
Strict-Transport-Security:
|
75
|
+
- max-age=2592000
|
76
|
+
body:
|
77
|
+
encoding: UTF-8
|
78
|
+
string: '{"name":"Test Topic 3","updatedAt":"2014-05-15T07:51:09Z","description":null,"id":5149,"lastPostedAt":"2014-05-15T09:58:01Z","createdAt":"2014-05-15T07:51:09Z","suggestion":"Test
|
79
|
+
Topic 3"}'
|
80
|
+
http_version:
|
81
|
+
recorded_at: Thu, 15 May 2014 10:30:44 GMT
|
82
|
+
recorded_with: VCR 2.9.0
|
data/spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_raise_error_when_topic_id_is_wrong.yml
ADDED
@@ -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
|
+
- Thu, 15 May 2014 10:30:45 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: Thu, 15 May 2014 10:30:45 GMT
|
40
|
+
- request:
|
41
|
+
method: post
|
42
|
+
uri: https://typetalk.in/api/v1/topics/dummy/favorite?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
|
+
- Thu, 15 May 2014 10:30:46 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: Thu, 15 May 2014 10:30:46 GMT
|
73
|
+
recorded_with: VCR 2.9.0
|
data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_backward_resource.yml
ADDED
@@ -0,0 +1,85 @@
|
|
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
|
+
- Thu, 15 May 2014 10:18:22 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: Thu, 15 May 2014 10:18:22 GMT
|
40
|
+
- request:
|
41
|
+
method: get
|
42
|
+
uri: https://typetalk.in/api/v1/topics/5149?access_token=(ACCESS_TOKEN)&count=3&direction=backward&from=278782
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message: OK
|
57
|
+
headers:
|
58
|
+
Server:
|
59
|
+
- nginx
|
60
|
+
Date:
|
61
|
+
- Thu, 15 May 2014 10:18:22 GMT
|
62
|
+
Content-Type:
|
63
|
+
- application/json; charset=utf-8
|
64
|
+
Transfer-Encoding:
|
65
|
+
- chunked
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
Cache-Control:
|
69
|
+
- no-cache
|
70
|
+
Etag:
|
71
|
+
- W/"e15e1a35271cabb8aa2ff40cf7088416"
|
72
|
+
Strict-Transport-Security:
|
73
|
+
- max-age=2592000
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"posts":[{"updatedAt":"2014-05-15T09:10:54Z","talks":[],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278765","topicId":5149,"likes":[{"topicId":5149,"id":46005,"postId":278765,"comment":"","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"}}],"links":[],"id":278765,"mention":null,"createdAt":"2014-05-15T09:10:54Z","message":"Test
|
77
|
+
Message 3 - 2","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:10:57Z","talks":[{"name":"Test
|
78
|
+
Summary 3 - 1","updatedAt":"2014-05-15T09:44:38Z","url":"https://typetalk.in/topics/5149/talks/3991","description":null,"topicId":5149,"id":3991,"createdAt":"2014-05-15T09:44:38Z"}],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278766","topicId":5149,"likes":[],"links":[],"id":278766,"mention":null,"createdAt":"2014-05-15T09:10:57Z","message":"Test
|
79
|
+
Message 3 - 3","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:16:09Z","talks":[],"replyTo":278693,"url":"https://typetalk.in/topics/5149/posts/278779","topicId":5149,"likes":[],"links":[],"id":278779,"mention":null,"createdAt":"2014-05-15T09:16:09Z","message":"Test
|
80
|
+
Message 3 - 4","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]}],"team":null,"topic":{"name":"Test
|
81
|
+
Topic 3","updatedAt":"2014-05-15T07:51:09Z","description":null,"id":5149,"lastPostedAt":"2014-05-15T09:58:01Z","createdAt":"2014-05-15T07:51:09Z","suggestion":"Test
|
82
|
+
Topic 3"},"bookmark":{"postId":278693,"updatedAt":"2014-05-15T09:09:42Z"},"hasNext":true}'
|
83
|
+
http_version:
|
84
|
+
recorded_at: Thu, 15 May 2014 10:18:22 GMT
|
85
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,84 @@
|
|
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
|
+
- Thu, 15 May 2014 10:18:23 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: Thu, 15 May 2014 10:18:23 GMT
|
40
|
+
- request:
|
41
|
+
method: get
|
42
|
+
uri: https://typetalk.in/api/v1/topics/5149?access_token=(ACCESS_TOKEN)&count=2&direction=forward&from=278765
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message: OK
|
57
|
+
headers:
|
58
|
+
Server:
|
59
|
+
- nginx
|
60
|
+
Date:
|
61
|
+
- Thu, 15 May 2014 10:18:24 GMT
|
62
|
+
Content-Type:
|
63
|
+
- application/json; charset=utf-8
|
64
|
+
Transfer-Encoding:
|
65
|
+
- chunked
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
Cache-Control:
|
69
|
+
- no-cache
|
70
|
+
Etag:
|
71
|
+
- W/"01b1ccf4f8e47e7232baa5ea411b864b"
|
72
|
+
Strict-Transport-Security:
|
73
|
+
- max-age=2592000
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"posts":[{"updatedAt":"2014-05-15T09:10:57Z","talks":[{"name":"Test
|
77
|
+
Summary 3 - 1","updatedAt":"2014-05-15T09:44:38Z","url":"https://typetalk.in/topics/5149/talks/3991","description":null,"topicId":5149,"id":3991,"createdAt":"2014-05-15T09:44:38Z"}],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278766","topicId":5149,"likes":[],"links":[],"id":278766,"mention":null,"createdAt":"2014-05-15T09:10:57Z","message":"Test
|
78
|
+
Message 3 - 3","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:16:09Z","talks":[],"replyTo":278693,"url":"https://typetalk.in/topics/5149/posts/278779","topicId":5149,"likes":[],"links":[],"id":278779,"mention":null,"createdAt":"2014-05-15T09:16:09Z","message":"Test
|
79
|
+
Message 3 - 4","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]}],"team":null,"topic":{"name":"Test
|
80
|
+
Topic 3","updatedAt":"2014-05-15T07:51:09Z","description":null,"id":5149,"lastPostedAt":"2014-05-15T09:58:01Z","createdAt":"2014-05-15T07:51:09Z","suggestion":"Test
|
81
|
+
Topic 3"},"bookmark":{"postId":278693,"updatedAt":"2014-05-15T09:09:42Z"},"hasNext":true}'
|
82
|
+
http_version:
|
83
|
+
recorded_at: Thu, 15 May 2014 10:18:24 GMT
|
84
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,88 @@
|
|
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
|
+
- Thu, 15 May 2014 10:00:04 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: Thu, 15 May 2014 10:00:04 GMT
|
40
|
+
- request:
|
41
|
+
method: get
|
42
|
+
uri: https://typetalk.in/api/v1/topics/5149?access_token=(ACCESS_TOKEN)
|
43
|
+
body:
|
44
|
+
encoding: US-ASCII
|
45
|
+
string: ''
|
46
|
+
headers:
|
47
|
+
Accept:
|
48
|
+
- application/json; charset=utf-8
|
49
|
+
User-Agent:
|
50
|
+
- Typetalk Rubygem 0.0.1
|
51
|
+
Accept-Encoding:
|
52
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
53
|
+
response:
|
54
|
+
status:
|
55
|
+
code: 200
|
56
|
+
message: OK
|
57
|
+
headers:
|
58
|
+
Server:
|
59
|
+
- nginx
|
60
|
+
Date:
|
61
|
+
- Thu, 15 May 2014 10:00:05 GMT
|
62
|
+
Content-Type:
|
63
|
+
- application/json; charset=utf-8
|
64
|
+
Transfer-Encoding:
|
65
|
+
- chunked
|
66
|
+
Connection:
|
67
|
+
- keep-alive
|
68
|
+
Cache-Control:
|
69
|
+
- no-cache
|
70
|
+
Etag:
|
71
|
+
- W/"aa42497e6e368980c1c891428f5f9a61"
|
72
|
+
Strict-Transport-Security:
|
73
|
+
- max-age=2592000
|
74
|
+
body:
|
75
|
+
encoding: UTF-8
|
76
|
+
string: '{"posts":[{"updatedAt":"2014-05-15T08:54:30Z","talks":[],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278693","topicId":5149,"likes":[],"links":[],"id":278693,"mention":null,"createdAt":"2014-05-15T08:54:30Z","message":"Test
|
77
|
+
Message 3 - 1","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:10:54Z","talks":[],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278765","topicId":5149,"likes":[{"topicId":5149,"id":46005,"postId":278765,"comment":"","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"}}],"links":[],"id":278765,"mention":null,"createdAt":"2014-05-15T09:10:54Z","message":"Test
|
78
|
+
Message 3 - 2","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:10:57Z","talks":[{"name":"Test
|
79
|
+
Summary 3 - 1","updatedAt":"2014-05-15T09:44:38Z","url":"https://typetalk.in/topics/5149/talks/3991","description":null,"topicId":5149,"id":3991,"createdAt":"2014-05-15T09:44:38Z"}],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278766","topicId":5149,"likes":[],"links":[],"id":278766,"mention":null,"createdAt":"2014-05-15T09:10:57Z","message":"Test
|
80
|
+
Message 3 - 3","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:16:09Z","talks":[],"replyTo":278693,"url":"https://typetalk.in/topics/5149/posts/278779","topicId":5149,"likes":[],"links":[],"id":278779,"mention":null,"createdAt":"2014-05-15T09:16:09Z","message":"Test
|
81
|
+
Message 3 - 4","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:17:16Z","talks":[],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278782","topicId":5149,"likes":[],"links":[],"id":278782,"mention":{"id":35823,"readAt":null},"createdAt":"2014-05-15T09:17:16Z","message":"Test
|
82
|
+
Message 3 - 5 @typetalk-rubygem-tester ","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[]},{"updatedAt":"2014-05-15T09:53:52Z","talks":[],"replyTo":null,"url":"https://typetalk.in/topics/5149/posts/278852","topicId":5149,"likes":[],"links":[],"id":278852,"mention":null,"createdAt":"2014-05-15T09:53:52Z","message":"Test
|
83
|
+
Message 3 - 6","account":{"name":"umakoz","updatedAt":"2014-05-15T00:44:58Z","fullName":"umakoz","id":921,"createdAt":"2013-12-09T23:47:12Z","suggestion":"umakoz","imageUrl":"https://typetalk.in/accounts/921/profile_image.png?t=1400114698595"},"attachments":[{"fileName":"logo.jpg","webUrl":"https://typetalk.in/topics/5149/posts/278852/attachments/1/logo.jpg","apiUrl":"https://typetalk.in/api/v1/topics/5149/posts/278852/attachments/1/logo.jpg"}]}],"team":null,"topic":{"name":"Test
|
84
|
+
Topic 3","updatedAt":"2014-05-15T07:51:09Z","description":null,"id":5149,"lastPostedAt":"2014-05-15T09:58:01Z","createdAt":"2014-05-15T07:51:09Z","suggestion":"Test
|
85
|
+
Topic 3"},"bookmark":{"postId":278693,"updatedAt":"2014-05-15T09:09:42Z"},"hasNext":false}'
|
86
|
+
http_version:
|
87
|
+
recorded_at: Thu, 15 May 2014 10:00:05 GMT
|
88
|
+
recorded_with: VCR 2.9.0
|