poundie-ffm 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/poundie-ffm.rb +3 -1
  2. metadata +3 -3
@@ -5,8 +5,10 @@ class PoundieFfm < Poundie::Plugin
5
5
 
6
6
  prefix %r/poundie ffm\s+/ do |term|
7
7
  response = JSON.parse(`curl http://farthestfromme.com/api/antipodal_property.js?q=#{CGI.escape(term)}`)
8
+ location = response["response"]["location"]
8
9
  property = response["response"]["antipodal_property"]
9
- speak "The antipodal restaurant to #{term} is #{property["name"]} @ #{property["lat"]}, #{property["lng"]}"
10
+ speak "The antipodal restaurant to #{location["name"]} is #{property["name"]} @ #{property["lat"]}, #{property["lng"]}."
11
+ speak "http://maps.google.com/maps/api/staticmap?size=512x512&maptype=roadmap&markers=color:green|label:A|#{location["lat"]},#{location["lng"]}&markers=color:red|label:B|#{property["lat"]},#{property["lng"]}&path=color:0x0000ff|weight:5|#{location["lat"]},#{location["lng"]}|#{property["lat"]},#{property["lng"]}&sensor=false"
10
12
  end
11
13
  end
12
14
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poundie-ffm
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael "Bad Dog" Haddad