Module: Skittles::Client::Setting

Included in:
Skittles::Client
Defined in:
lib/skittles/client/setting.rb

Overview

Define methods related to settings.

See Also:

Instance Method Summary (collapse)

Instance Method Details

- (Hashie::Mash) all_settings

Returns all settings of the active user.

See Also:

Requires Acting User:

  • Yes



11
12
13
# File 'lib/skittles/client/setting.rb', line 11

def all_settings
  get('settings/all').settings
end

- (Hashie::Mash) set_setting(id, value)

Change a setting for the given user.

See Also:

Requires Acting User:

  • Yes



22
23
24
# File 'lib/skittles/client/setting.rb', line 22

def set_setting(id, value)
  post("settings/#{id}/set", { :value => value }).settings
end

- (Hashie::Mash) setting(id)

Returns a setting for the acting user.



32
33
34
# File 'lib/skittles/client/setting.rb', line 32

def setting(id)
  get("settings/#{id}").value
end