Class: DoorLoop::Tasks

Inherits:
Object
  • Object
show all
Defined in:
lib/doorloop/tasks.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Tasks

Returns a new instance of Tasks.



5
6
7
# File 'lib/doorloop/tasks.rb', line 5

def initialize(client)
  @client = client
end

Instance Method Details

#create(params) ⇒ Object



13
14
15
# File 'lib/doorloop/tasks.rb', line 13

def create(params)
  @client.post('tasks', params)
end

#delete(id) ⇒ Object



25
26
27
# File 'lib/doorloop/tasks.rb', line 25

def delete(id)
  @client.delete("tasks/#{id}")
end

#find(id) ⇒ Object



17
18
19
# File 'lib/doorloop/tasks.rb', line 17

def find(id)
  @client.get("tasks/#{id}")
end

#list(options = {}) ⇒ Object



9
10
11
# File 'lib/doorloop/tasks.rb', line 9

def list(options = {})
  @client.get('tasks', options)
end

#post_update(params) ⇒ Object



29
30
31
# File 'lib/doorloop/tasks.rb', line 29

def post_update(params)
  @client.post('tasks/update', params)
end

#update(id, params) ⇒ Object



21
22
23
# File 'lib/doorloop/tasks.rb', line 21

def update(id, params)
  @client.put("tasks/#{id}", params)
end