Ruby API for TheTVDB
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README
tv.rb

README

#
# Howto use:
#
require "tv"

#
# Find TV Show
#
series = Series.new
res = series.find "Dexter"
res.each do |s|
  puts "#{s[:id]} - #{s[:name]}"
end

#
# Get Data
#
serie = Serie.new 79349 # TheTvDB ID

puts serie.name
puts serie.first_aired.to_s

serie.seasons.each do |s|
  puts "Season: #{s.number}"
  s.each do |e|
    puts "  Episode: #{e.number} - #{e.name}"
  end
end

#
# Get Banners
#
serie.banners.each do |b|
  puts b.path
end


#
# License
#

 Copyright 2011 zerolith

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.