Sha256: 4e61055ba1ecaaeb2f5f42f7dee0bd481f96397fa03ea4a3ed4f29ece842287e

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

# tv.rb

module TMDB
  class TV

    def self.search(options = {})
      options.merge!(api_key: TMDB::API.api_key)
      results = TMDB::API.get("/3/search/tv", query: options)['results']
      tv_shows = []
      results.each do |result|
        tv_shows.push(Hashie::Mash.new(result))
      end
    end

    def self.id(tv_id)
      options = { api_key: TMDB::API.api_key }
      Hashie::Mash.new(TMDB::API.get("/3/tv/#{tv_id}", query: options))
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tmdb-0.2.0 lib/tmdb/tv.rb