class Tvteka::Client
Public Class Methods
live(token, &block)
click to toggle source
# File lib/tvteka/client.rb, line 17 def self.live(token, &block) Tvteka::API.new.get(:live, "http://tvteka.com/live", {cookies: {"deviceToken" => token}}) do |response| block.call response end end
live_channel(token, channel, &block)
click to toggle source
# File lib/tvteka/client.rb, line 23 def self.live_channel(token, channel, &block) Tvteka::API.new.get(:live_channel, "http://tvteka.com/live/#{channel}", {cookies: {"deviceToken" => token}}) do |response| block.call response end end
request()
click to toggle source
# File lib/tvteka/client.rb, line 29 def self.request Tvteka::Request.new end
session(username, password, options = {}, &block)
click to toggle source
# File lib/tvteka/client.rb, line 3 def self.session(username, password, options = {}, &block) options = { "session[login]" => username, "session[password]" => password, "device[type]" => "xmbc", "device[id]" => "c0:3d:45:28:fc:ad" }.merge(options) Tvteka::API.new.get(:session, "http://tvteka.com/session/register", options) do |response| block.call response end end
verify(token, &block)
click to toggle source
# File lib/tvteka/client.rb, line 11 def self.verify(token, &block) Tvteka::API.new.get(:verify, "http://tvteka.com/session/verify", {cookies: {"deviceToken" => token}}) do |response| block.call response end end