typetalk 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -26
- data/lib/typetalk.rb +1 -1
- data/lib/typetalk/api/auth.rb +3 -3
- data/lib/typetalk/version.rb +1 -1
- data/spec/cassettes/Typetalk_Api/_access_token/should_get_access_token.yml +1 -1
- data/spec/cassettes/Typetalk_Api/_access_token/should_not_update_access_token.yml +1 -1
- data/spec/cassettes/Typetalk_Api/_access_token/should_update_access_token_when_access_token_is_expired.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_authorization_code.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_get_the_correct_resource_by_client_credentials_when_scope_changed.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_authorization_code_is_wrong.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_id_is_wrong.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_client_secret_is_wrong.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_get_access_token/should_raise_error_when_redirect_uri_mismatch.yml +1 -1
- data/spec/cassettes/Typetalk_Api_Auth/_update_access_token/should_get_the_correct_resource_by_client_credentials.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Auth/_update_access_token/should_raise_error_when_refresh_token_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource.yml +6 -6
- data/spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_correct_resource_till_mention.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Mention/_get_mentions/should_get_the_unread_resource.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Mention/_read_mention/should_get_the_correct_resource.yml +4 -4
- data/spec/cassettes/Typetalk_Api_Mention/_read_mention/should_raise_error_when_mention_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_get_message/should_get_the_correct_resource.yml +8 -8
- data/spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_post_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_get_message/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_like_message/should_get_the_correct_resource.yml +7 -7
- data/spec/cassettes/Typetalk_Api_Message/_like_message/should_raise_error_when_post_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource.yml +4 -4
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_attachments.yml +6 -6
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_reply.yml +7 -7
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_get_the_correct_resource_for_talks.yml +6 -6
- data/spec/cassettes/Typetalk_Api_Message/_post_message/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource.yml +8 -8
- data/spec/cassettes/Typetalk_Api_Message/_read_message/should_get_the_correct_resource_till_post.yml +8 -8
- data/spec/cassettes/Typetalk_Api_Message/_read_message/should_raise_error_when_post_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_remove_message/should_get_the_correct_resource.yml +10 -10
- data/spec/cassettes/Typetalk_Api_Message/_remove_message/should_raise_error_when_post_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_unlike_message/should_get_the_correct_resource.yml +9 -9
- data/spec/cassettes/Typetalk_Api_Message/_unlike_message/should_raise_error_when_post_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_get_the_correct_resource.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Message/_upload_attachment/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_accept_team/should_get_the_correct_resource.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_invite_team_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_accept_team/should_raise_error_when_team_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_get_the_correct_resource.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_invite_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_accept_topic/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_get_the_correct_resource.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_invite_team_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_decline_team/should_raise_error_when_team_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_get_the_correct_resource.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_invite_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_decline_topic/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_get_notifications/should_get_the_correct_resource.yml +12 -12
- data/spec/cassettes/Typetalk_Api_Notification/_get_notifications_status/should_get_the_correct_resource.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Notification/_read_notifications/should_get_the_correct_resource.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_get_the_correct_resource.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_favorite_topic/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_backward_resource.yml +7 -7
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_forward_resource.yml +5 -5
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_get_the_correct_resource.yml +10 -10
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_get_the_correct_resource.yml +3 -3
- data/spec/cassettes/Typetalk_Api_Topic/_get_topic_members/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_get_topics/should_get_the_correct_resource.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_get_the_correct_resource.yml +2 -2
- data/spec/cassettes/Typetalk_Api_Topic/_unfavorite_topic/should_raise_error_when_topic_id_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_User/_get_profile/should_get_the_correct_resource.yml +3 -3
- data/spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_access_token_is_wrong.yml +2 -2
- data/spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_scope_is_wrong.yml +2 -2
- data/spec/typetalk/api/auth_spec.rb +1 -1
- metadata +2 -2
data/spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_access_token_is_wrong.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://typetalk.
|
5
|
+
uri: https://typetalk.com/oauth2/access_token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post%2Cmy
|
@@ -39,7 +39,7 @@ http_interactions:
|
|
39
39
|
recorded_at: Thu, 15 May 2014 07:01:14 GMT
|
40
40
|
- request:
|
41
41
|
method: get
|
42
|
-
uri: https://typetalk.
|
42
|
+
uri: https://typetalk.com/api/v1/profile?access_token=(WRONG_ACCESS_TOKEN)
|
43
43
|
body:
|
44
44
|
encoding: US-ASCII
|
45
45
|
string: ''
|
data/spec/cassettes/Typetalk_Api_User/_get_profile/should_raise_error_when_scope_is_wrong.yml
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://typetalk.
|
5
|
+
uri: https://typetalk.com/oauth2/access_token
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: client_id=(CLIENT_ID)&client_secret=(CLIENT_SECRET)&grant_type=client_credentials&scope=topic.read%2Ctopic.post
|
@@ -39,7 +39,7 @@ http_interactions:
|
|
39
39
|
recorded_at: Thu, 15 May 2014 07:34:58 GMT
|
40
40
|
- request:
|
41
41
|
method: get
|
42
|
-
uri: https://typetalk.
|
42
|
+
uri: https://typetalk.com/api/v1/profile?access_token=(ACCESS_TOKEN)
|
43
43
|
body:
|
44
44
|
encoding: US-ASCII
|
45
45
|
string: ''
|
@@ -91,7 +91,7 @@ describe Typetalk::Api::Auth do
|
|
91
91
|
url = URI.parse(Typetalk::Api::Auth.authorize_url)
|
92
92
|
query = Hash[URI.decode_www_form(url.query)]
|
93
93
|
expect(url.scheme).to eq('https')
|
94
|
-
expect(url.host).to eq('typetalk.
|
94
|
+
expect(url.host).to eq('typetalk.com')
|
95
95
|
expect(url.path).to eq('/oauth2/authorize')
|
96
96
|
expect(query['client_id']).to eq('dummy_id')
|
97
97
|
expect(query['redirect_uri']).to eq('http://dummy/')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typetalk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- umakoz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hashie
|