Sha256: bc68ad63ba08a2ceacd2471660ebfbf8353b78d490fdc496db4359d86506a25f

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

module FilmOn

  module Services

    def channel(id, opts={})
      return @channel[id] if @channel[id]
      json = get("channel/#{id}")
      if opts[:json]
        @channel[id] = json
        return json
      end
      @channel[id] = convert_channel(id, json)
    end

    def channels(opts={})
      return @channels if @channels
      json = get("channels")
      if opts[:json]
        @channels = json
        return json
      end
      @channels = convert_channels(json)
    end

    def groups(opts={})
      return @groups if @groups
      json = get("groups")
      if opts[:json]
        @groups = json
        return json
      end
      @groups = convert_groups(json)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
film_on-0.0.6 lib/film_on/services.rb
film_on-0.0.5 lib/film_on/services.rb