Class: Thanos::Item::Series

Inherits:
Object
  • Object
show all
Defined in:
lib/thanos/resources/item/series.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Series

Returns a new instance of Series.



6
7
8
9
# File 'lib/thanos/resources/item/series.rb', line 6

def initialize(data)
  @name = data['name']
  @resource_uri = data['resourceURI']
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/thanos/resources/item/series.rb', line 4

def name
  @name
end

#resource_uriObject (readonly)

Returns the value of attribute resource_uri.



4
5
6
# File 'lib/thanos/resources/item/series.rb', line 4

def resource_uri
  @resource_uri
end

Instance Method Details

#completeObject



11
12
13
14
15
# File 'lib/thanos/resources/item/series.rb', line 11

def complete
  response = Thanos::API::Response.new(RestClient.get(@resource_uri))
  results = Thanos::ResponseHolder.new(response).results
  Thanos::Factory::Series.new(results).build
end