yahoo-local 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/README.md +41 -0
  2. metadata +75 -0
@@ -0,0 +1,41 @@
1
+ # YahooLocal
2
+
3
+ This is a Ruby wrapper for the Yahoo Local Search API [http://developer.yahoo.com/search/local/V3/localSearch.html](http://developer.yahoo.com/search/local/V3/localSearch.html).
4
+
5
+ ## Installation
6
+
7
+ As a gem:
8
+
9
+ sudo gem install yahoo-local
10
+
11
+ As a plugin (in your Rails directory):
12
+
13
+ script/plugin install git://github.com/phuphighter/yahoo_local.git
14
+
15
+ ## Get a Yahoo API key
16
+
17
+ Sign up for a Yahoo API key: [http://developer.yahoo.com/wsregapp/](http://developer.yahoo.com/wsregapp/)
18
+
19
+ ## Usage
20
+
21
+ ### Instantiate a client
22
+
23
+ >> yahoo = YahooLocal::Client.new(:api_key => 'your_api_key')
24
+
25
+ ### or configure once
26
+
27
+ >> YahooLocal.configure do |config|
28
+ >> config.api_key = 'your_api_key'
29
+ >> end
30
+ >> yahoo = YahooLocal::Client.new
31
+
32
+ #### Example
33
+
34
+ >> yahoo.search(:query => "pizza", :zip => "90210", :results => 1)
35
+ => {"ResultSet"=>{"firstResultPosition"=>"1", "totalResultsAvailable"=>"1571", "ResultSetMapUrl"=>"http://maps.yahoo.com/broadband/?q1=Beverly+Hills%2C+CA+90210&tt=pizza&tp=1", "Result"=>{"MapUrl"=>"http://maps.yahoo.com/maps_result?q1=231+N+Beverly+Dr+Beverly+Hills+CA&gid1=31216257", "Distance"=>"1.87", "Longitude"=>"-118.3998", "City"=>"Beverly Hills", "Url"=>"http://local.yahoo.com/info-31216257-pizza-rustica-beverly-hills", "Title"=>"Pizza Rustica", "Latitude"=>"34.067488", "Phone"=>"(310) 550-7499", "id"=>"31216257", "Categories"=>{"Category"=>{"id"=>"96926243", "content"=>"Pizza"}}, "BusinessUrl"=>"http://www.pizzarusticala.com/", "ClickUrl"=>"http://local.yahoo.com/info-31216257-pizza-rustica-beverly-hills", "Rating"=>{"TotalReviews"=>"3", "AverageRating"=>"5", "TotalRatings"=>"4", "LastReviewIntro"=>"Rustica but good!", "LastReviewDate"=>"1158242113"}, "Address"=>"231 N Beverly Dr", "State"=>"CA", "BusinessClickUrl"=>"http://www.pizzarusticala.com/"}, "totalResultsReturned"=>"1"}}
36
+
37
+ ## Copyright
38
+
39
+ Contact me if you have any suggestions and feel free to fork it!
40
+
41
+ Copyright (c) 2009 Johnny Khai Nguyen, released under the MIT license
metadata ADDED
@@ -0,0 +1,75 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yahoo-local
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 0
9
+ version: 0.1.0
10
+ platform: ruby
11
+ authors:
12
+ - Johnny Khai Nguyen
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-05-25 00:00:00 -05:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: httparty
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 5
30
+ - 0
31
+ version: 0.5.0
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ description: Ruby wrapper for the Yahoo! Local Search API
35
+ email: johnnyn@gmail.com
36
+ executables: []
37
+
38
+ extensions: []
39
+
40
+ extra_rdoc_files:
41
+ - README.md
42
+ files:
43
+ - README.md
44
+ has_rdoc: true
45
+ homepage: http://github.com/phuphighter/yahoo_local
46
+ licenses: []
47
+
48
+ post_install_message:
49
+ rdoc_options:
50
+ - --charset=UTF-8
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ segments:
65
+ - 0
66
+ version: "0"
67
+ requirements: []
68
+
69
+ rubyforge_project:
70
+ rubygems_version: 1.3.6
71
+ signing_key:
72
+ specification_version: 3
73
+ summary: Ruby wrapper for the Yahoo! Local Search API
74
+ test_files: []
75
+