Class: Lolcommits::Flowdock::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/lolcommits/flowdock/client.rb

Constant Summary collapse

API_HOST =
'api.flowdock.com'

Instance Attribute Summary collapse

Instance Method Summary collapse

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_tokenObject

Returns the value of attribute access_token.



11
12
13
# File 'lib/lolcommits/flowdock/client.rb', line 11

def access_token
  @access_token
end

#flowObject

Returns the value of attribute flow.



11
12
13
# File 'lib/lolcommits/flowdock/client.rb', line 11

def flow
  @flow
end

#organizationObject

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 create_message(organization: nil, flow: nil, params: {})
  post(messages_url(organization, flow), params)
end

#flowsObject

GET /flows



27
28
29
# File 'lib/lolcommits/flowdock/client.rb', line 27

def flows
  get(flows_url)
end

#organizationsObject

GET /organizations



22
23
24
# File 'lib/lolcommits/flowdock/client.rb', line 22

def organizations
  get(organizations_url)
end