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/invitation_link.rb,
lib/chatwork/incoming_request.rb
Defined Under Namespace
Modules: Contacts, EntityMethods, File, IncomingRequest, InvitationLink, Me, Member, Message, MyStatus, MyTask, Room, Task, Token
Classes: APIConnectionError, APIError, AuthenticateError, BaseClient, ChatWorkError, Client, OAuthClient
Constant Summary
collapse
- VERSION =
"0.7.0".freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.api_base ⇒ Object
Returns the value of attribute api_base.
35
36
37
|
# File 'lib/chatwork.rb', line 35
def api_base
@api_base
end
|
.api_version ⇒ Object
Returns the value of attribute api_version.
39
40
41
|
# File 'lib/chatwork.rb', line 39
def api_version
@api_version
end
|
.oauth_api_base ⇒ Object
Returns the value of attribute oauth_api_base.
37
38
39
|
# File 'lib/chatwork.rb', line 37
def oauth_api_base
@oauth_api_base
end
|
Class Method Details
.access_token ⇒ Object
85
86
87
|
# File 'lib/chatwork.rb', line 85
def access_token
@access_token || ENV["CHATWORK_ACCESS_TOKEN"]
end
|
.access_token=(new_value) ⇒ Object
65
66
67
68
69
|
# File 'lib/chatwork.rb', line 65
def access_token=(new_value)
@api_key = nil
@access_token = new_value
@client = nil
end
|
.api_key ⇒ Object
81
82
83
|
# File 'lib/chatwork.rb', line 81
def api_key
@api_key || ENV["CHATWORK_API_TOKEN"]
end
|
.api_key=(new_value) ⇒ Object
59
60
61
62
63
|
# File 'lib/chatwork.rb', line 59
def api_key=(new_value)
@api_key = new_value
@access_token = nil
@client = nil
end
|
.client ⇒ Object
41
42
43
|
# File 'lib/chatwork.rb', line 41
def client
@client ||= Client.new(api_key, access_token, api_base, api_version)
end
|
.client_id ⇒ Object
89
90
91
|
# File 'lib/chatwork.rb', line 89
def client_id
@client_id || ENV["CHATWORK_CLIENT_ID"]
end
|
.client_id=(new_value) ⇒ Object
71
72
73
74
|
# File 'lib/chatwork.rb', line 71
def client_id=(new_value)
@client_id = new_value
@oauth_client = nil
end
|
.client_secret ⇒ Object
93
94
95
|
# File 'lib/chatwork.rb', line 93
def client_secret
@client_secret || ENV["CHATWORK_CLIENT_SECRET"]
end
|
.client_secret=(new_value) ⇒ Object
76
77
78
79
|
# File 'lib/chatwork.rb', line 76
def client_secret=(new_value)
@client_secret = new_value
@oauth_client = nil
end
|
.oauth_client ⇒ Object
45
46
47
|
# File 'lib/chatwork.rb', line 45
def oauth_client
@oauth_client ||= OAuthClient.new(client_id, client_secret, oauth_api_base)
end
|