Class: Kintone::Command::Apps

Inherits:
Kintone::Command show all
Defined in:
lib/kintone/command/apps.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Kintone::Command

#initialize

Constructor Details

This class inherits a constructor from Kintone::Command

Class Method Details

.pathObject



4
5
6
# File 'lib/kintone/command/apps.rb', line 4

def self.path
  'apps'
end

Instance Method Details

#get(params = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/kintone/command/apps.rb', line 8

def get(params = {})
  query = {}
  params.keys.each do |key|
    if params[key].is_a?(Array)
      params[key].each_with_index { |v, i| query["#{key}[#{i}]"] = v }
    else
      query[key] = params[key]
    end
  end
  response = @api.get(@url, query)
  response['apps']
end