Module: ChatWork
- Defined in:
- lib/chatwork.rb,
lib/chatwork/me.rb,
lib/chatwork/file.rb,
lib/chatwork/room.rb,
lib/chatwork/task.rb,
lib/chatwork/token.rb,
lib/chatwork/client.rb,
lib/chatwork/member.rb,
lib/chatwork/message.rb,
lib/chatwork/my_task.rb,
lib/chatwork/version.rb,
lib/chatwork/contacts.rb,
lib/chatwork/my_status.rb,
lib/chatwork/base_client.rb,
lib/chatwork/oauth_client.rb,
lib/chatwork/chatwork_error.rb,
lib/chatwork/entity_methods.rb,
lib/chatwork/incoming_request.rb
Defined Under Namespace
Modules: Contacts, EntityMethods, File, IncomingRequest, Me, Member, Message, MyStatus, MyTask, Room, Task, Token
Classes: APIConnectionError, APIError, AuthenticateError, BaseClient, ChatWorkError, Client, OAuthClient
Constant Summary
collapse
- VERSION =
"0.6.1".freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.api_base ⇒ Object
Returns the value of attribute api_base.
33
34
35
|
# File 'lib/chatwork.rb', line 33
def api_base
@api_base
end
|
.api_version ⇒ Object
Returns the value of attribute api_version.
37
38
39
|
# File 'lib/chatwork.rb', line 37
def api_version
@api_version
end
|
.oauth_api_base ⇒ Object
Returns the value of attribute oauth_api_base.
35
36
37
|
# File 'lib/chatwork.rb', line 35
def oauth_api_base
@oauth_api_base
end
|
Class Method Details
.access_token ⇒ Object
83
84
85
|
# File 'lib/chatwork.rb', line 83
def access_token
@access_token || ENV["CHATWORK_ACCESS_TOKEN"]
end
|
.access_token=(new_value) ⇒ Object
63
64
65
66
67
|
# File 'lib/chatwork.rb', line 63
def access_token=(new_value)
@api_key = nil
@access_token = new_value
@client = nil
end
|
.api_key ⇒ Object
79
80
81
|
# File 'lib/chatwork.rb', line 79
def api_key
@api_key || ENV["CHATWORK_API_TOKEN"]
end
|
.api_key=(new_value) ⇒ Object
57
58
59
60
61
|
# File 'lib/chatwork.rb', line 57
def api_key=(new_value)
@api_key = new_value
@access_token = nil
@client = nil
end
|
.client ⇒ Object
39
40
41
|
# File 'lib/chatwork.rb', line 39
def client
@client ||= Client.new(api_key, access_token, api_base, api_version)
end
|
.client_id ⇒ Object
87
88
89
|
# File 'lib/chatwork.rb', line 87
def client_id
@client_id || ENV["CHATWORK_CLIENT_ID"]
end
|
.client_id=(new_value) ⇒ Object
69
70
71
72
|
# File 'lib/chatwork.rb', line 69
def client_id=(new_value)
@client_id = new_value
@oauth_client = nil
end
|
.client_secret ⇒ Object
91
92
93
|
# File 'lib/chatwork.rb', line 91
def client_secret
@client_secret || ENV["CHATWORK_CLIENT_SECRET"]
end
|
.client_secret=(new_value) ⇒ Object
74
75
76
77
|
# File 'lib/chatwork.rb', line 74
def client_secret=(new_value)
@client_secret = new_value
@oauth_client = nil
end
|
.oauth_client ⇒ Object
43
44
45
|
# File 'lib/chatwork.rb', line 43
def oauth_client
@oauth_client ||= OAuthClient.new(client_id, client_secret, oauth_api_base)
end
|