SnowWeather 0.3.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c49c0058e207e354840f55d6d504536220b6381f
4
- data.tar.gz: 2ac36cd626277fc3d66eb1b8e50476a029c4d19c
3
+ metadata.gz: b1ce8aa4184029ffb5d550686b5a7e89f5c84a91
4
+ data.tar.gz: 4fe314ca18a0086b05f9755675072f56b0a37fc7
5
5
  SHA512:
6
- metadata.gz: eb3e42968a688e8493c765875236a00520b4b4d9221869c14661c8520e6dba1adc9818eca5915f0b770f7112b54a6947aac3b806812e1ae595135eeb4f705062
7
- data.tar.gz: dfae2bd06d2715579772c4a0fa7d8f3a65eeadff2bc8c82cdf8b1732a40e180c4845695ed7421a511816297baa2b488db760fc03de3b91e034adf28cf508ab17
6
+ metadata.gz: 99e5d2d51537dda54cf3992187561cc9e06e4c557d0e1ce604b3888a0fdbd346adee6cf1860d7a496b0f25c3e46fae8fdc1eb14df543b1f2e3ccbaf77d57563a
7
+ data.tar.gz: f91d94a3be764cb8b1467a5541916aa6e979fdf9e85e05602911828ce0c403562fbf254393ba6ef64a674f3da25f6c1d453f1fc1ee7646fe9966e326fbdd502d
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 TODO: Write your name
3
+ Copyright (c) 2016 Justin Snow
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -19,3 +19,69 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  THE SOFTWARE.
22
+
23
+
24
+
25
+ WEATHER UNDERGROUND API TERMS AND CONDITIONS OF USE
26
+
27
+ LAST UPDATED: April 18, 2013
28
+
29
+ The Weather Underground Application Programming Interface (the "API") is owned and operated by The Weather Underground, LLC ("WUL"). The API is a service that provides access to weather related data (“API Data”) from the non-public website of WUL pursuant to the terms and conditions of use set forth below (the "Terms").
30
+
31
+ ACCEPTANCE OF TERMS.
32
+ (a.)Acceptance. In order to use the API you must agree to these Terms. By clicking to accept the Terms on the API web pages, or by using, accessing, viewing, or otherwise exploiting the API or information on the API, you affirm that you have read and agree to be bound by these Terms. You acknowledge that if you violate these Terms, WUL has the right to terminate your use of the API and all other rights licensed to you hereunder and/or take legal action against you in its sole discretion.
33
+ (b.)Capacity. You represent and warrant that you have the legal capacity and authority to accept the Terms and to bind yourself and any other person or entity accessing or using the API as a result of your acceptance of these Terms. If you are accepting on behalf of a business entity, you represent and warrant that you have the full legal authority to bind the business entity to these Terms.
34
+ (c.)Updates. WUL may modify and update the Terms at any time in its sole discretion. WUL will indicate the last date on which the Terms were modified at the top of the webpage for the Terms. Your access or use of the API, the API Data and/or the WUL Marks after modification of the Terms constitutes your acceptance of, and agreement to be bound by, the modified terms and conditions. If you do not agree with any modifications of the Terms, you must cease all access and use of the API, the API Data and the WUL Mark and cease all exercise of any rights licensed to you by these Terms, which cessation shall constitute termination of the Terms by you, subject to the terms and conditions set forth in the Terms.
35
+
36
+ LICENSE. Subject to these Terms and to your remaining in compliance with these Terms, WUL licenses to you a limited, worldwide, non-exclusive, non-transferable, revocable license for your personal or commercial use:
37
+ (a.)to access, use and receive the API Data through the API, and to transmit, use and display API Data accessed through the API, for the purposes set forth in these Terms; and
38
+ (b.)to use and display those trademarks, service marks, domain names, logos and other proprietary indicia of WUL provided or indicated by WUL (collectively, the “WUL Marks”), solely for the purposes of indicating that the API Data is provided by WUL and otherwise to comply with the attribution requirements set forth in these Terms.
39
+
40
+ CONDITIONS & RESTRICTIONS. Notwithstanding anything to the contrary in these Terms, you agree that:
41
+ (a.)IN ALL USES OF THE API DATA, YOU WILL CREDIT WUL BY NAME AND BRAND LOGO AS THE SOURCE OF THE API DATA. You agree to comply with the WUL’s Logo Usage Guide located at http://www.wunderground.com/weather/api/d/docs?D=resources/logo-usage-guide.
42
+ (b.)You will not modify the API Data in any way.
43
+ (c.)You will not modify the link structure to the API.
44
+ (d.)You will not resell, sublicense, redistribute or provide access to the API to any third party, including, without limitation, by incorporating API access into chipsets of any kind.
45
+ (e.)You will not delete, obscure, or modify any WUL Marks that are included in the API Data, or in any way prevent them from appearing with the API Data as made available by WUL.
46
+ (f.)You will not display API Data or the WUL Marks in any manner that implies a relationship or affiliation with, sponsorship, or endorsement by WUL or that can be reasonably interpreted to suggest that content other than the API Data is provided, endorsed, sponsored, or approved by, or is otherwise associated with, WUL.
47
+ (g.)You will not use the API or the API Data to target or trigger advertising.
48
+ (h.)You will not use the API or the API Data in or in connection with any vehicle telematics or “connected car” applications, products or services. (Contact WUL if you are interested in a license that permits this type of use.)
49
+ (i.)You will not use the API in connection with any mission critical application, product, service or facility, such as for the operation of emergency services, nuclear facilities, air traffic control or life support systems, where the use or failure of the API could lead to death, personal injury, severe property damage or environmental damage. You understand that the API is not designed for such purposes and that their failure in such cases could lead to death, personal injury, or severe property or environmental damage for which WUL is not responsible to you or any third party or entity.
50
+ (j.)WUL may in its sole discretion choose to upgrade the current version of the API at any time without notice to you, which you acknowledge may make the version of the API that you are using obsolete.
51
+ (k.)You will not use the API Data to disparage WUL or its products.
52
+ (l.)You will not use the API Data in connection with any product, service, application or use (including advertising) that promotes or constitutes illegal activity, is adult-themed, contains sexual, violent or criminal content, relates to the sale of tobacco or alcohol to individuals under the age of legal consumption, gambling, “get-rich-quick” or similar schemes, or firearms, fireworks or ammunition, advocates violence or any act of intimidation, harassment, physical force or discrimination motivated by hostility to a person’s race, ethnic background, religious belief, sex, age, disability or sexual orientation, or violates any civil or criminal law.
53
+ (m.)You will not reverse engineer, decompile or otherwise attempt to extract the source code of the API or any part thereof, unless doing so is expressly permitted or required by applicable U.S. federal or state laws.
54
+ (n.)Upon request, you will provide WUL with information, access and means to evaluate your use of the API, the API Data and the WUL Marks free-of-charge in order to determine compliance with the Terms.
55
+ (o.)You grant WUL the limited right for WUL’s trade, promotional and marketing purposes to use your name and the name, URL, and other identifying indicia of any product, service, application or use of the API or API Data to indicate that you are a customer of WUL and that your product, service, application or use includes API Data.
56
+
57
+ PAYMENTS. The rights licensed to you under these Terms are contingent upon your payment of all amounts owed pursuant to the pricing page on the API website, unless your level of use does not require payment under our pricing policies. All payments are non-refundable. You agree to make sure that your credit card and other billing information are valid and up to date.
58
+ RATE LIMITS; OVERAGE POLICY.
59
+ (a.)KEY; MONITORING. There is a daily limit and minute rate limit to the number of requests that can be made to the API for free. You may exceed this threshold only if you are or become a fee paying subscriber. WUL will monitor your daily usage of the API to determine if you have exceeded the free-use threshold by using an application programming interface key (the “Key”). Refer to the “Key Settings” page for product pricing, package features, and rate limit levels.
60
+ (b.)DEFINITION OF A DAY AND MINUTE FOR RATE LIMITS. A day will be defined by the 24-hour period from Midnight to Midnight in New York City local time (either EDT or EST depending on the time of year). A minute will be defined by a 60-second period of time on the WUL servers’ internal clock.
61
+ (c.)RAINDROP FEATURE. As a customer service feature, WUL will grant forgiveness for rate limit overages by way of the ‘Raindrop’ tool. Raindrops are 'credits' that can be used to cover overages of use to avoid ‘denial of service’ responses.
62
+
63
+ Free raindrops Policy:
64
+ i. Each Key account will be initialized with 3 Raindrops.
65
+ ii. Each Key will have one new Raindrop added to its account every Sunday on Midnight, New York City Local Time (either EDT, or EST).
66
+ iii. If a minute or daily rate limit is exceeded then a Raindrop is deducted from the account of the Key to 'forgive' the overuse.
67
+ iv. If all of an API Key's raindrops have been depleted and a rate limit is exceeded, then "Request Denial - Surpassed rate limit" errors will occur for each overage for the remaining period of the day or minute where the rate limit was exceeded.
68
+
69
+ Raindrop Rewards:
70
+ i. A Key will be gifted one raindrop for every 2500 clicks-backs that a Key sends to a www.wunderground.com page. Refer to the WUL API technical documentation page for instructions for how to insert an API key into the URL that directs to www.wunderground.com.
71
+
72
+ OWNERSHIP/INTELLECTUAL PROPERTY RIGHTS. You acknowledge and agree that, as between WUL and you, WUL is the sole owner of all right, title and interest in and to the API, the API Data (excluding any public domain data provided through the API), and the WUL Marks. WUL reserves all right, title and interest in and to the API, the API Data (excluding any public domain data provided through the API), and the WUL Marks, including, without limitation, any and all worldwide copyright, patent, trademark, trade secret and other intellectual property rights therein, and, except for the rights and licenses expressly granted hereunder, neither these Terms nor WUL’s performance of its obligations hereunder shall be construed as conferring upon you any right or license in or to the API, the API Data, or the WUL Marks, by implication, estoppel or otherwise. All uses of the WUL Marks will inure solely to the benefit of WUL. Upon the expiration or termination of these Terms for any reason, you agree to delete and otherwise discontinue all uses of the API, the API Data, and the WUL Marks. You disclaim any right, title or interest in or to the WUL Marks and will not take any action to create a unitary composite mark involving a WUL Mark. You agree that you will not contest or impair the rights of WUL in and to the WUL Marks.
73
+ PRIVACY POLICY. The use of personal information is governed by our Privacy Statement located at http://www.wunderground.com/members/tos.asp#privacy.
74
+ LIMITATION OF LIABILITY.
75
+
76
+ WUL ASSUMES NO RESPONSIBILITY FOR, AND SHALL NOT BE LIABLE FOR, ANY DAMAGES OR EXPENSES YOU MAY INCUR AS A RESULT OF ANY INACCURACY, INCOMPLETENESS, UNTIMELINESS OR OBSOLESCENCE OF THE API OR THE API DATA. YOU ACKNOWLEDGE THAT REPORTS, FORECASTS, ALERTS, AND OTHER INFORMATION REGARDING WEATHER AND CLIMATIC CONDITIONS ARE UNCERTAIN. THE API AND THE API DATA ARE PROVIDED “AS IS”, WITH NO WARRANTIES WHATSOEVER. WUL DISCLAIMS ALL WARRANTIES REGARDING THE ACCURACY, COMPLETENESS, CURRENCY OR RELIABILITY OF THE API AND THE API DATA, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT OR OTHERWISE ARISING BY LAW OR STATUTE. YOU AGREE THAT YOUR USE OF, OR RELIANCE UPON, THE API AND THE API DATA IS AT YOUR OWN DISCRETION AND RISK.
77
+ WITHOUT LIMITING THE GENERALITY OF THE FORGOING, YOU AGREE THAT NEITHER WUL NOR ANY OF ITS PARENTS, AFFILIATES, DIRECTORS, SHAREHOLDERS, EMPLOYEES, REPRESENTATIVES OR AGENTS WILL BE LIABLE TO YOU OR TO ANY OTHER PARTY FOR ANY DIRECT OR INDIRECT DAMAGES, OR FOR ANY SPECIAL, EXEMPLARY, PUNITIVE, INCIDENTAL, CONSEQUENTIAL OR OTHER DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOST PROFITS OR LOST TIME), WHETHER BASED ON CONTRACT, TORT, STRICT LIABILITY OR OTHERWISE, WHICH ARISE OUT OF OR ARE IN ANY WAY CONNECTED WITH THESE TERMS, THE API, ANY API DATA, ANY WUL MARKS OR ANY CONTRACTUAL OR OTHER DEALINGS OR RELATIONSHIPS YOU MAY HAVE WITH THIRD PARTIES BASED UPON OR RELATED TO THE API OR THE API DATA. YOU ACKNOWLEDGE THAT THE LIMITATIONS IN THIS SECTION ARE REASONABLE AND APPROPRIATE.
78
+ YOU ACKNOWLEDGE AND AGREE THAT YOUR SOLE REMEDY IN THE EVENT OF A BREACH BY WUL OF THESE TERMS SHALL BE TO STOP USING THE API, THE API DATA, AND THE WUL MARKS AND TO TERMINATE THESE TERMS. IN THE EVENT THAT ANY COURT FINDS THE FOREGOING PROVISIONS TO BE UNENFORCEABLE OR DECIDES NOT TO ENFORCE THEM FOR ANY REASON, YOU AGREE THAT IN NO EVENT SHALL THE TOTAL LIABILITY OF WUL TO YOU UNDER THESE TERMS EXCEED THE GREATER OF (I) THE AMOUNTS PAID BY YOU TO WUL DURING THE THREE MONTHS PRECEDING THE DATE THAT WUL IS NOTIFIED OF ANY CLAIM BY YOU, OR (II) $500.
79
+ TRANSMISSION FAILURES. WUL will use commercially reasonable efforts to publish and transmit the API on a continuous and timely basis. WUL is not, however, responsible for any failure or malfunction in communications; for any failure or refusal of any third party transmission intermediaries to transmit any API; or for the failure to transmit any API resulting from any natural disasters, wars, labor strike or other events beyond the control of WUL. YOU ACKNOWLEDGE THAT, IN CIRCUMSTANCES INVOLVING NATURAL DISASTERS, FEDERAL, STATE AND MUNICIPAL GOVERNMENTAL AGENCIES MAY ISSUE OFFICIAL WEATHER WATCHES, WARNINGS, ADVISORIES, BULLETINS AND SIMILAR COMMUNICATIONS, AND THAT WUL DOES NOT COVENANT OR WARRANT TO TRANSMIT SUCH COMMUNICATIONS TO YOU THROUGH THE API OR OTHERWISE.
80
+ UNAUTHORIZED USE; NO INTERFERENCE. (a.)You agree that you will not use or attempt to use any method, device, software or routine to harm others or interfere with functioning of the API or to circumvent your rate limits, or use and/or monitor API Data or any information in or related to the API for any unauthorized purpose.
81
+ (b.)You will not make your API Key or login information available to any third party. You are responsible for all use of the API, API Data or the WUL API website that occurs through your API Key or login information. You agree to promptly notify WUL if you learn of a security breach related to your API Key or login information.
82
+ (c.)You will use commercially reasonable efforts to prevent any portion of the API Data from being collected or extracted from your computer systems and from your products, services, applications, websites or other uses of the API Data by means of “robots,” “spiders,” “web crawlers” or other automated processes, devices, programs, algorithms or methodology. You will provide WUL with prompt written notice thereof if you become aware that API Data is being collected or extracted in such a manner and will determine a commercially reasonable course of action to prevent or discourage such activity in the future. WUL reserves the right to suspend your access to the API until such time as reasonable steps are taken to protect the API and the API Data.
83
+ INDEMNIFICATION. In connection with your use of the API and/or the API Data in connection with applications, products, services, programs or other uses produced or provided by you or any third party (“Your Uses”), you agree to be solely liable for any damage resulting from any infringement of copyrights, patents, other proprietary rights, or any other harm (including but not limited to harm caused by spyware, malware, worms, Trojan horses and viruses) resulting from Your Uses. You agree to indemnify and hold harmless WUL and its parents, affiliates, directors, shareholders, representatives, employees and agents from and against any claim, demand, action or suit asserted by a third party, and all costs, liabilities, judgments, expenses and damages, including reasonable attorneys’ fees (collectively, “Losses”) suffered, sustained, incurred or paid in connection therewith, arising out of, resulting from or related to (i) your access to or use of the API or the API Data, including, without limitation, any claim that Your Uses infringe any proprietary, intellectual property or personal right of any third party or violates any law (excluding only claims that the API or the API Data as provided to all customers by WUL - and not as implemented by you or combined with Your Uses - independently and directly infringe the rights of such third party or violate any law); (ii) any breach by you of these Terms; or (iii) any violation by you of any applicable laws, rules, regulations or statutes. You will not enter into any settlement that imposes any liability or obligation on WUL, or contains any admission or acknowledgement of wrongdoing (whether in tort or otherwise), without WUL's prior written consent.
84
+ TERMINATION. Without limiting its other rights or remedies, WUL may immediately terminate these Terms, or discontinue, suspend, terminate or block your or any user's use of the API, the API Data and/or the WUL Marks at any time in its sole discretion. You may terminate these Terms by ceasing to use the API, the API Data and the WUL Marks. If you are a fee paying subscriber and you wish to terminate these Terms, you must cease using the API, the API Data and the WUL Marks and notify WUL of your termination of these Terms. You agree to pay all fees due for your use of the API up until the date of your notification. When these Terms come to an end, those terms and conditions that by their nature are intended to continue indefinitely will continue to apply, including but not limited to Sections 1.b., 3.m., 6, 7, 8, 11, 13 and 14.
85
+ GOVERNING LAW; JURISDICTION. These Terms and your access to and use of the API, the API Data, and the WUL Marks are governed by the laws of the State of Georgia and the laws of the United States of America without regard to conflicts of law principles. All disputes arising under or related to these Terms shall be resolved by the State or Superior Courts of Cobb County in the State of Georgia or in the United States District Court for the Northern District of Georgia. Each party consents to the exclusive jurisdiction of such courts and hereby waives any jurisdictional defenses, including, without limitation, forum non conveniens, the party may have to the institution of any such claim or action in any such court.
86
+ ENTIRE AGREEMENT. These Terms constitute the entire agreement between you and WUL regarding the subject matter hereof, supersedes any and all prior or contemporaneous agreements between the parties with respect to its subject matter, and does not give any third party any rights or remedies hereunder. Any waiver of any term or condition shall not be effective unless in a written document signed by an authorized representative of WUL. You and WUL agree that if any portion of these Terms is found to be illegal or unenforceable, such portion(s) shall be limited or excluded from these Terms to the minimum extent required and the balance of these Terms shall remain in full force and effect. You may not assign the rights and licenses granted herein without WUL’s prior written consent. Subject to the foregoing limitation, these Terms will be binding upon, inure to the benefit of and be enforceable by the parties and their respective successors and assigns.
87
+
data/README.md CHANGED
@@ -22,20 +22,48 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
26
25
 
27
- ## Development
26
+ Set the api_key whithin in a model or controller
28
27
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
28
+ ```ruby
29
+ SnowWeather.api_key(<'123456789123456789'>)
30
+ ```
30
31
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
32
 
33
- ## Contributing
33
+ Get current conditions
34
+
35
+
36
+ ```ruby
37
+ SnowWeather::Conditions.getConditions(<'state'>, <'city'>)
38
+ ```
39
+
40
+ Example
34
41
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/SnowWeather. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
42
+ ```ruby
43
+ SnowWeather.api_key(<'123456789123456789'>)
44
+
45
+ @data = SnowWeather::Conditions.getConditions('PA', 'Pittsburgh')
46
+ #gets the current temp in F
47
+ @temp = @data['current_observation']['temp_f']
48
+ #gets the current weather condition
49
+ @weather = @data['current_observation']['weather']
36
50
 
51
+ puts "The current weather is #{@weather} with a temperature of #{@temp}°F"
52
+
53
+
54
+ ```
55
+ Result
56
+
57
+ The current weather is cloudy with a temperature of 60°F
37
58
 
38
- ## License
39
59
 
40
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
60
+ Data is returned in JSON format.
61
+
62
+
63
+ ## Contributing
41
64
 
65
+ 1. Fork it ( https://github.com/Jrsnow8921/SnowWeatherGem/fork )
66
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
67
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
68
+ 4. Push to the branch (`git push origin my-new-feature`)
69
+ 5. Create a new Pull Request
@@ -1,3 +1,3 @@
1
1
  module SnowWeather
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SnowWeather
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Snow