Sha256: b078f2f4e350653a2b3aef5814839e315308053b01a33d320242fcdbd267ee11

Contents?: true

Size: 576 Bytes

Versions: 126

Compression:

Stored size: 576 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["items"], klass: Sportradar::Api::Content::Article) if response["items"]
      end

    end
  end
end

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/content/article_list.rb
sportradar-api-0.20.1 lib/sportradar/api/content/article_list.rb
sportradar-api-0.20.0 lib/sportradar/api/content/article_list.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/content/article_list.rb
sportradar-api-0.20.0.pre lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.6 lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.5 lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.4 lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.3 lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.2 lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.1 lib/sportradar/api/content/article_list.rb
sportradar-api-0.19.0 lib/sportradar/api/content/article_list.rb
sportradar-api-0.18.1 lib/sportradar/api/content/article_list.rb
sportradar-api-0.18.0 lib/sportradar/api/content/article_list.rb
sportradar-api-0.17.6 lib/sportradar/api/content/article_list.rb
sportradar-api-0.17.5 lib/sportradar/api/content/article_list.rb
sportradar-api-0.17.5.pre lib/sportradar/api/content/article_list.rb
sportradar-api-0.17.4 lib/sportradar/api/content/article_list.rb
sportradar-api-0.17.3 lib/sportradar/api/content/article_list.rb
sportradar-api-0.17.2 lib/sportradar/api/content/article_list.rb