Class: FavroApi::Driver

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

Instance Method Summary collapse

Instance Method Details

#cards(params = {}) ⇒ Object



6
7
8
9
10
# File 'lib/favro_api/driver.rb', line 6

def cards(params = {})
  response = paginated_request(:cards, params).fetch

  response.parse(type: FavroApi::DataTypes::Card)
end

#collections(params = {}) ⇒ Object



12
13
14
15
16
# File 'lib/favro_api/driver.rb', line 12

def collections(params = {})
  response = paginated_request(:collections, params).fetch

  response.parse(type: FavroApi::DataTypes::Collection)
end

#comments(params = {}) ⇒ Object



18
19
20
21
22
# File 'lib/favro_api/driver.rb', line 18

def comments(params = {})
  response = paginated_request(:comments, params).fetch

  response.parse(type: FavroApi::DataTypes::Comment)
end

#custom_fields(params = {}) ⇒ Object



24
25
26
27
28
# File 'lib/favro_api/driver.rb', line 24

def custom_fields(params = {})
  response = paginated_request(:custom_fields, params).fetch

  response.parse
end

#organizations(params = {}) ⇒ Object



30
31
32
33
34
# File 'lib/favro_api/driver.rb', line 30

def organizations(params = {})
  response = paginated_request(:organizations, params).fetch

  response.parse(type: FavroApi::DataTypes::Organization)
end

#tasklists(params = {}) ⇒ Object



42
43
44
45
46
# File 'lib/favro_api/driver.rb', line 42

def tasklists(params = {})
  response = paginated_request(:tasklists, params).fetch

  response.parse(type: FavroApi::DataTypes::Tasklist)
end

#tasks(params = {}) ⇒ Object



36
37
38
39
40
# File 'lib/favro_api/driver.rb', line 36

def tasks(params = {})
  response = paginated_request(:tasks, params).fetch

  response.parse(type: FavroApi::DataTypes::Task)
end

#users(params = {}) ⇒ Object



48
49
50
51
52
# File 'lib/favro_api/driver.rb', line 48

def users(params = {})
  response = paginated_request(:users, params).fetch

  response.parse(type: FavroApi::DataTypes::User)
end

#widgets(params = {}) ⇒ Object



54
55
56
57
58
# File 'lib/favro_api/driver.rb', line 54

def widgets(params = {})
  response = paginated_request(:widgets, params).fetch

  response.parse(type: FavroApi::DataTypes::Widget)
end