Class: Tickspot

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

Constant Summary collapse

VERSION =
'0.1.0'

Instance Method Summary collapse

Constructor Details

#initialize(domain, email, password) ⇒ Tickspot



10
11
12
13
14
# File 'lib/tickspot.rb', line 10

def initialize(domain, email, password)
  @domain = domain
  @email = email
  @password = password
end

Instance Method Details

#entries(start_date, end_date, params = {}) ⇒ Object



31
32
33
34
# File 'lib/tickspot.rb', line 31

def entries(start_date, end_date, params={})
  te = request("entries", params.merge({:start_date => start_date, :end_date => end_date}))
  te.empty? ? [] : te.entries 
end

#projectsObject



21
22
23
24
# File 'lib/tickspot.rb', line 21

def projects
  te = request("projects")
  te.empty? ? [] : te.projects
end

#tasks(project_id) ⇒ Object



26
27
28
29
# File 'lib/tickspot.rb', line 26

def tasks(project_id)
  te = request("tasks", :project_id => project_id)
  te.empty? ? [] : te.tasks
end

#users(params = {}) ⇒ Object



16
17
18
19
# File 'lib/tickspot.rb', line 16

def users(params={})
  te = request("users", params)
  te.empty? ? [] : te.users
end