tvteka

A native RubyMotion wrapper around the Tvteka API.

Installation

Gemfile

gem 'tvteka'

Rakefile

require 'tvteka'

then run bundle install and you should be good to go.

Tvteka relies on STHTTPRequest to run so you'll need to install the neccessary pods.

### First get Cocoapods up and running.
$ pod setup

### Now install the needed pods.
$ rake pod:install

Usage

Obtain device token

Tvteka::Client.register(your_username, your_password) do |response|
  if response.success?
    response.data # returns instance of Tvteka::Session with token
  else
    response.error
  end
end

Verify that device token is still valid

Tvteka::Client.verify(token) do |response|
  if response.success?
    response.data # returns instance of Tvteka::Session with authorized attribute
  else
    response.error
  end
end

Get list of live channels

Tvteka::Client.live(token) do |response|
  if response.success?
    response.data # returns array of Tvteka::Channel
  else
    response.error
  end
end

Get list of shows for single channel

Tvteka::Client.live_channel(token) do |response|
  if response.success?
    response.data # returns array of Tvteka::Show
  else
    response.error
  end
end