Sha256: c4e2b5373f090630064e5616f204d157f269aae757bc7e7dd8a12c8f9bee8528
Contents?: true
Size: 865 Bytes
Versions: 1
Compression:
Stored size: 865 Bytes
Contents
module Zelda class Omroep < Zelda::Base class << self # Find an omroep by slug, such as +kro+. def find(slug) attrs = Request.get("omroepen/#{slug}")['omroep'] rescue nil attrs ? new(attrs) : nil end # Find all omroepen. def all Request.get("omroepen")['omroepen'] end end def to_s name end # Return all Series for this Omroep. def series Zelda::Request.get("omroepen/#{slug}/series")['omroep']['series']['serie'].map do |attrs| Zelda::Serie.new(attrs) end end # Return Series for this Omroep that have broadcasts in the future. def current_series Zelda::Request.get("omroepen/#{slug}/current_series")['omroep']['current_series']['serie'].map do |attrs| Zelda::Serie.new(attrs) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zelda-1.2.1 | lib/zelda/omroep.rb |