Sha256: e050d5e8baa8ac379b99312f49236bad0e34f6fb35bd49ac68c546e745e6b818
Contents?: true
Size: 524 Bytes
Versions: 13
Compression:
Stored size: 524 Bytes
Contents
# frozen_string_literal: true module ShotgunApiRuby class Preferences def initialize(connection) @connection = connection.dup @connection.url_prefix = "#{@connection.url_prefix}/preferences" end attr_reader :connection 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 end end
Version data entries
13 entries across 13 versions & 1 rubygems