Class: ThetvdbMapper::Mapping::Series

Inherits:
Base
  • Object
show all
Defined in:
lib/thetvdb_mapper/mapping/series.rb

Class Method Summary collapse

Methods inherited from Base

convert_to_list, map

Class Method Details

.convert(data) ⇒ Object



30
31
32
33
34
35
# File 'lib/thetvdb_mapper/mapping/series.rb', line 30

def self.convert(data)
  data.merge({
    genres: convert_to_list(data[:genres]),
    last_updated_at: Time.at(data[:last_updated_at].to_i)
  })
end

.rulesObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/thetvdb_mapper/mapping/series.rb', line 2

def self.rules
  {
    'id' => :id,
    'Airs_DayOfWeek' => :airs_day_of_week,
    'Airs_Time' => :airs_time,
    'ContentRating' => :content_rating,
    'FirstAired' => :first_aired,
    'genre' => :genres,
    'IMDB_ID' => :imdb_id,
    'Language' => :language,
    'Network' => :network,
    'NetworkID' => :network_id,
    'Overview' => :overview,
    'Rating' => :rating,
    'RatingCount' => :rating_count,
    'Runtime' => :runtime,
    'SeriesName' => :name,
    'Status' => :status,
    'added' => :added_at,
    'added_by' => :added_by,
    'banner' => :banner_path,
    'fanart' => :fanart_path,
    'lastupdated' => :last_updated_at,
    'poster' => :poster_path,
    'zap2it_id' => :zap2it_id
  }
end