Class: Lolcommits::Flowdock::Client
- Inherits:
-
Object
- Object
- Lolcommits::Flowdock::Client
- Defined in:
- lib/lolcommits/flowdock/client.rb
Constant Summary collapse
- API_HOST =
'api.flowdock.com'
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#flow ⇒ Object
Returns the value of attribute flow.
-
#organization ⇒ Object
Returns the value of attribute organization.
Instance Method Summary collapse
-
#create_message(organization: nil, flow: nil, params: {}) ⇒ Object
POST /flows/:organization/:flow/messages.
-
#flows ⇒ Object
GET /flows.
-
#initialize(access_token, organization: nil, flow: nil) ⇒ Client
constructor
A new instance of Client.
-
#organizations ⇒ Object
GET /organizations.
Constructor Details
#initialize(access_token, organization: nil, flow: nil) ⇒ Client
Returns a new instance of Client.
15 16 17 18 19 |
# File 'lib/lolcommits/flowdock/client.rb', line 15 def initialize(access_token, organization: nil, flow: nil) @access_token = access_token @organization = organization @flow = flow end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
11 12 13 |
# File 'lib/lolcommits/flowdock/client.rb', line 11 def access_token @access_token end |
#flow ⇒ Object
Returns the value of attribute flow.
11 12 13 |
# File 'lib/lolcommits/flowdock/client.rb', line 11 def flow @flow end |
#organization ⇒ Object
Returns the value of attribute organization.
11 12 13 |
# File 'lib/lolcommits/flowdock/client.rb', line 11 def organization @organization end |
Instance Method Details
#create_message(organization: nil, flow: nil, params: {}) ⇒ Object
POST /flows/:organization/:flow/messages
32 33 34 |
# File 'lib/lolcommits/flowdock/client.rb', line 32 def (organization: nil, flow: nil, params: {}) post((organization, flow), params) end |
#flows ⇒ Object
GET /flows
27 28 29 |
# File 'lib/lolcommits/flowdock/client.rb', line 27 def flows get(flows_url) end |
#organizations ⇒ Object
GET /organizations
22 23 24 |
# File 'lib/lolcommits/flowdock/client.rb', line 22 def organizations get(organizations_url) end |