Skip to content

alaingilbert/Turntable-API

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

274 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turntable API

A simple ruby wrapper for the turntable API

Installation

gem install ttapi

Find your AUTH, USERID and ROOMID informations with that bookmarklet.

Examples

Chat bot

This bot responds to anybody who writes "/hello" in the chat.

require "ttapi"
$b = Bot.new(AUTH, USERID, ROOMID)

def speak(data)
   name = data["name"]
   text = data["text"]

   if /\/hello/.match(text)
      $b.speak("Hello %s" % name)
   end
end

$b.on("speak", method(:speak))

$b.start

About

Allows you to create bots for turntable.fm

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors