class ShotgunApiRuby::Preferences
Attributes
connection[R]
Public Class Methods
new(connection)
click to toggle source
# File lib/shotgun_api_ruby/preferences.rb, line 5 def initialize(connection) @connection = connection.dup @connection.url_prefix = "#{@connection.url_prefix}/preferences" end
Public Instance Methods
all()
click to toggle source
# File lib/shotgun_api_ruby/preferences.rb, line 12 def all resp = @connection.get resp_body = JSON.parse(resp.body) if resp.status >= 300 raise "Error while getting server preferences: #{resp_body['errors']}" end data = resp_body['data'] OpenStruct.new(data) end