darksky_ruby_client 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e465eb949a63a9ad1e90ba1465e57c9a8f2eae23
4
- data.tar.gz: da2bc0d0149ad03dbf6cf52a7749f600d6c9334f
3
+ metadata.gz: f50f7c621b6b8bf0ba6ff2dbd55bc3e1cc4d0df6
4
+ data.tar.gz: 1d29c79687153daafca6a546d6b14c8e75ee17a7
5
5
  SHA512:
6
- metadata.gz: 815c7adfdd5ca12e8ffcc9bf27e0ab14beab1f02216460286e89f50eab3075351bffe989102ece06b895eb68525fead36e66506e668be48f17265e6f22c40277
7
- data.tar.gz: '008aa7d52f32ff62883228b9e94f449b2fdf5f2af43334a8d0ec362826cdb5bd28dd322ced2cfbafe29c77e19d0ef267f499c4e5827d3b7a0f29464d814531bc'
6
+ metadata.gz: a5a4d5ce1039eaca500bc06ce5093b97bf35ee79e24227f3ef7dc83cafa5e5d2684650e76b12052273e53c68ab3d9bd8ed0f744947c911bda8042edfbfafecae
7
+ data.tar.gz: 3bdd10f63e4527afb8cf383c4e3ffab991b93f7a97ce87331f4bd85b88935a4f7439f6bcf73eb7b9457badecd4c8ceb1a2dc227a64f06377c139a7e38864c97e
data/README.md CHANGED
@@ -23,7 +23,14 @@ Or install it yourself as:
23
23
 
24
24
  ## Usage
25
25
 
26
- TODO: Write usage instructions here
26
+ ```ruby
27
+ require 'darksky_ruby_client'
28
+ options = {
29
+ :extend => "hourly"
30
+ }
31
+ client = DarkskyRubyClient::Client.new('your Dark Sky secret key')
32
+ client.weather_forecast('latitude', 'longitude', options).run
33
+ ```
27
34
 
28
35
  ## Development
29
36
 
@@ -66,15 +66,15 @@ module DarkskyRubyClient
66
66
  # * si: SI units
67
67
  # Please check with https://darksky.net/dev/docs#forecast-request for available SI units.
68
68
  def weather_forecast(lat, long, options = {})
69
- @request_url << @@base_url + @secret_key + '/' + lat + ',' + long + '/'
69
+ @request_url = @@base_url + @secret_key + '/' + lat + ',' + long + '/'
70
70
  unless options.empty? then
71
71
  options.each {|key, value|
72
72
  if [:exclude, :extend, :lang, :units].include?(key)
73
73
  p @request_url[-1]
74
74
  if @request_url[-1] == '/'
75
- @request_url << '?' + key.to_s + '=' + value
75
+ @request_url = '?' + key.to_s + '=' + value
76
76
  else
77
- @request_url << '&' + key.to_s + '=' + value
77
+ @request_url = '&' + key.to_s + '=' + value
78
78
  end
79
79
  else
80
80
  @log.warn("invalid options key \"#{key}\".")
@@ -1,3 +1,3 @@
1
1
  module DarkskyRubyClient
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: darksky_ruby_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - appcot