Class: Statium::Opta::Resource::Venue

Inherits:
CommonResource show all
Defined in:
lib/statium/opta/resource/venue.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CommonResource

#build_uri, #common_url_options

Constructor Details

#initialize(uuid) ⇒ Venue

Returns a new instance of Venue



7
8
9
# File 'lib/statium/opta/resource/venue.rb', line 7

def initialize(uuid)
  @uuid = uuid
end

Instance Attribute Details

#uuidObject

Returns the value of attribute uuid



5
6
7
# File 'lib/statium/opta/resource/venue.rb', line 5

def uuid
  @uuid
end

Instance Method Details

#parse(response_body) ⇒ Object



18
19
20
# File 'lib/statium/opta/resource/venue.rb', line 18

def parse response_body
  Statium::Opta::Model::Venue.build response_body
end

#uri(auth_key, lang = 'en') ⇒ Object



11
12
13
14
15
16
# File 'lib/statium/opta/resource/venue.rb', line 11

def uri(auth_key, lang = 'en')
  specific_options = {
    venue: @uuid
  }
  build_uri('venues', auth_key, nil, common_url_options(lang).merge(specific_options))
end