Skip to content

Commit

Permalink
Document the new method and initializer option.
Browse files Browse the repository at this point in the history
  • Loading branch information
darrencauthon committed Oct 11, 2012
1 parent a4e3f6f commit cd5baa9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/yahoo_weatherman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class Client
#
# +lang+: the language used in the response
#
# +app_id+: your yahoo app id (necessary for searching by location).
#
def initialize(options = {})
@options = options
@uri = options[:url] || URI
Expand All @@ -49,6 +51,9 @@ def lookup_by_woeid(woeid)
Response.new(raw, options[:lang])
end

#
# Just pass in a +location+ and it will return a Weatherman::Response object:w
#
def lookup_by_location(location)
lookup = WoeidLookup.new(@app_id)
woeid = lookup.get_woeid(location)
Expand Down

0 comments on commit cd5baa9

Please sign in to comment.