Class: Admincredible::Resources::Setting

Inherits:
Admincredible::Resource show all
Defined in:
lib/admincredible/resources/Setting.rb

Instance Attribute Summary

Attributes inherited from Admincredible::Resource

#client

Instance Method Summary collapse

Methods inherited from Admincredible::Resource

#config, #connection, #initialize

Constructor Details

This class inherits a constructor from Admincredible::Resource

Instance Method Details

#allObject



4
5
6
# File 'lib/admincredible/resources/Setting.rb', line 4

def all
  client.jget('settings', 'index')['data']
end

#create(*args) ⇒ Object



12
13
14
# File 'lib/admincredible/resources/Setting.rb', line 12

def create(*args)
  client.jpost('settings', 'create', args.extract_options!)['data']
end

#firstObject



8
9
10
# File 'lib/admincredible/resources/Setting.rb', line 8

def first
  client.jget('settings', 'read')['data']
end

#update(*args) ⇒ Object



16
17
18
# File 'lib/admincredible/resources/Setting.rb', line 16

def update(*args)
  client.jpost('settings', 'update', args.extract_options!)['data']
end