ttapi 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/.document +5 -0
  2. data/README.md +27 -14
  3. data/Rakefile +1 -1
  4. data/VERSION +1 -1
  5. metadata +5 -4
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/README.md CHANGED
@@ -1,19 +1,32 @@
1
- = ttapi
1
+ # Turntable API
2
2
 
3
- Description goes here.
3
+ A simple ruby wrapper for the turntable API
4
4
 
5
- == Contributing to ttapi
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
- * Fork the project.
10
- * Start a feature/bugfix branch.
11
- * Commit and push until you are happy with your contribution.
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
5
+ ## Installation
6
+ gem install ttapi
14
7
 
15
- == Copyright
8
+ Find your `AUTH`, `USERID` and `ROOMID` informations with [that bookmarklet](http://alaingilbert.github.com/Turntable-API/bookmarklet.html).
16
9
 
17
- Copyright (c) 2012 alaingilbert. See LICENSE.txt for
18
- further details.
10
+ ## Examples
19
11
 
12
+ ### Chat bot
13
+
14
+ This bot responds to anybody who writes "/hello" in the chat.
15
+
16
+ ```rb
17
+ require "ttapi"
18
+ $b = Bot.new(AUTH, USERID, ROOMID)
19
+
20
+ def speak(data)
21
+ name = data["name"]
22
+ text = data["text"]
23
+
24
+ if /\/hello/.match(text)
25
+ $b.speak("Hello %s" % name)
26
+ end
27
+ end
28
+
29
+ $b.on("speak", method(:speak))
30
+
31
+ $b.start
32
+ ```
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ require 'jeweler'
15
15
  Jeweler::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "ttapi"
18
- gem.homepage = "http://github.com/alaingilbert/Turntable-API"
18
+ gem.homepage = "http://github.com/alaingilbert/Turntable-API/tree/master/ruby_ttapi"
19
19
  gem.license = "MIT"
20
20
  gem.summary = %Q{Turntable-API}
21
21
  gem.description = %Q{A simple ruby wrapper for the turntable API}
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ttapi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - alaingilbert
@@ -28,6 +28,7 @@ extensions: []
28
28
  extra_rdoc_files:
29
29
  - README.md
30
30
  files:
31
+ - .document
31
32
  - .gitignore
32
33
  - Gemfile
33
34
  - README.md
@@ -39,7 +40,7 @@ files:
39
40
  - test/helper.rb
40
41
  - test/test_ttapi.rb
41
42
  has_rdoc: true
42
- homepage: http://github.com/alaingilbert/Turntable-API
43
+ homepage: http://github.com/alaingilbert/Turntable-API/tree/master/ruby_ttapi
43
44
  licenses:
44
45
  - MIT
45
46
  post_install_message: