Sha256: 812753be43eaeff8bc66385c448d2bc023e627c06fcecdafd2ee4a60b9c736f5

Contents?: true

Size: 574 Bytes

Versions: 114

Compression:

Stored size: 574 Bytes

Contents

module Sportradar
  module Api
    class Content::ArticleList < Data
      attr_accessor :response, :provider, :sport, :start_time, :end_time, :articles

      def initialize(data)
        @response = data
        @sport = data["sport"]
        @provider = data["provider"]
        @start_time = Time.parse(data["start_time"]) if data["start_time"]
        @end_time = Time.parse(data["end_time"]) if data["end_time"]
        @articles = parse_into_array(selector: response["item"], klass: Sportradar::Api::Content::Article) if response["item"]
      end

    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
sportradar-api-0.9.34 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.33 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.32 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.31 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.30 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.29 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.28 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.27 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.26 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.25 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.24 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.23 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.22 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.21 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.20 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.19 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.18 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.17 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.16 lib/sportradar/api/content/article_list.rb
sportradar-api-0.9.15 lib/sportradar/api/content/article_list.rb