farmsense_wrapper 1.0.0 → 1.0.1

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: 28205b673a80fff3d4564a94af458d1fd05eea61
4
- data.tar.gz: e1c3b9d562292412c8f1ac28c70b65c2e9b28f38
3
+ metadata.gz: e1e99c8e9baa43dcc0f13ffc60b3c557b5362773
4
+ data.tar.gz: 3d1c74d098aba8d7657be062becfe8f625d6cbbe
5
5
  SHA512:
6
- metadata.gz: 9994e3d734f6df512b9c0648f617947830e419a6117362e5d16af231693d4f0b1564d7b3a0cd6f09a0854e6557178ae6df51350715769c4a448a8350a4387783
7
- data.tar.gz: 65f907130932bf041ff8563a95a526af73909dfb518f46af982152f77d5d949f1f27d6d5ab912a64b35f93d875659d8cdcb907266ec7a3cfebe8ae2fd68389dd
6
+ metadata.gz: 8d25962b19944b00acad38d1809f40e390ccd85ae8055760d988ac34366d1cc2596252516cb864ea1f7935b10cfd951bdf1812c9b6d7405d3914f1789f2d990c
7
+ data.tar.gz: 481575d97b4b87bff92780e84c93f62c790ed83e67204ccd10be9204f7477e97d2fb138aaecbbbb2e55142ba8f09922de640abfd2c801e4eb5b2bb0069131035
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # FarmsenseWrapper
2
2
 
3
- TODO: Write a gem description
3
+ This gem is a lightweight wrapper for the Farmsense API [Farmsense.net]. This wrapper returns a JSON object of nearest weather stations to the input latitude and longitude and a JSON object of frost probabilities for spring or fall.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,11 +18,52 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ FarmSenseWrapper.stations(latitude, longitude)
22
+
23
+ Return's a JSON object of closest stations. To find the probabilities of frost for a station use the id provided.
24
+
25
+
26
+ ```
27
+ $FarmSenseWrapper.stations(42, -112)
28
+
29
+ > [{
30
+ "id" => "506586",
31
+ "name" => "NORTHW AY AP",
32
+ "elevation" => "1",
33
+ "lat" => "62.966667",
34
+ "lon" => "-141.933334",
35
+ "distance" => "664.584783026827"
36
+ }]
37
+ ```
38
+
39
+ FarmSenseWrapper.dates(id, season)
40
+ - spring: 1
41
+ - fall: 2
42
+
43
+ ```
44
+ FarmSenseWrapper.dates(506586, 2)
45
+
46
+ > [{
47
+ "season_id" => "2",
48
+ "temperature_threshold" => "36",
49
+ "prob_90" => "1016",
50
+ "prob_80" => "1012",
51
+ "prob_70" => "1008",
52
+ "prob_60" => "1005",
53
+ "prob_50" => "1003",
54
+ "prob_40" => "0930",
55
+ "prob_30" => "0927",
56
+ "prob_20" => "0924",
57
+ "prob_10" => "0919"
58
+ }]
59
+ ```
60
+
61
+
62
+
22
63
 
23
64
  ## Contributing
24
65
 
25
- 1. Fork it ( https://github.com/[my-github-username]/farmsense_wrapper/fork )
66
+ 1. Fork it
26
67
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
68
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
69
  4. Push to the branch (`git push origin my-new-feature`)
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["cohart"]
10
10
  spec.email = ["me@colin-hart.com"]
11
11
  spec.summary = %q{A wrapper for the Farmsense API, which provides day lengths, frost dates, and moon phases}
12
- spec.description = %q{This wrapper currently only provides methods for retunring nearest whether stations and frostdates in json format}
12
+ spec.description = %q{This wrapper currently only provides methods for returning nearest weather stations and frostdates for said stations in json format}
13
13
  spec.homepage = "https://github.com/cohart/farmsense_wrapper"
14
14
  spec.license = "MIT"
15
15
 
@@ -1,3 +1,3 @@
1
1
  module FarmsenseWrapper
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farmsense_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - cohart
@@ -80,8 +80,8 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: This wrapper currently only provides methods for retunring nearest whether
84
- stations and frostdates in json format
83
+ description: This wrapper currently only provides methods for returning nearest weather
84
+ stations and frostdates for said stations in json format
85
85
  email:
86
86
  - me@colin-hart.com
87
87
  executables: []