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