Module: Slackr
- Extended by:
- Slackr
- Included in:
- Slackr
- Defined in:
- lib/slackr.rb,
lib/slackr/errors.rb,
lib/slackr/channel.rb,
lib/slackr/version.rb,
lib/slackr/connection.rb,
lib/slackr/file_uploader.rb,
lib/slackr/webhooks/incoming.rb
Overview
Defined Under Namespace
Modules: Channel, IncomingWebhook
Classes: ArgumentError, Connection, FileUploader, ServiceError, Webhook
Constant Summary
collapse
- VERSION =
"0.0.6"
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
16
17
18
|
# File 'lib/slackr.rb', line 16
def connection
@connection
end
|
Instance Method Details
#channels ⇒ Object
34
35
36
|
# File 'lib/slackr.rb', line 34
def channels
Slackr::Channel.init(connection)
end
|
#connect(team, token, options = {}) ⇒ Object
#say(text, options = {}) ⇒ Object
26
27
28
|
# File 'lib/slackr.rb', line 26
def say(text, options = {})
Slackr::IncomingWebhook.say(connection, text, options)
end
|
#upload(filepath, options = {}) ⇒ Object
30
31
32
|
# File 'lib/slackr.rb', line 30
def upload(filepath, options = {})
Slackr::FileUploader.new(connection, filepath, options).upload
end
|