-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Weatherbit in the Weather Module #2187
Conversation
Adds support for Weatherbit.io API Key needed, based on existing classes for Dark Sky and Weather.gov
Generated by 🚫 dangerJS |
// Implement WeatherDay generator. | ||
generateWeatherDayFromCurrentWeather(currentWeatherData) { | ||
//Calculate TZ Offset and invert to convert Sunrise/Sunset times to Local | ||
var d = new Date(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be a const ?
generateWeatherDayFromCurrentWeather(currentWeatherData) { | ||
//Calculate TZ Offset and invert to convert Sunrise/Sunset times to Local | ||
var d = new Date(); | ||
var tzOffset = d.getTimezoneOffset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a let
As the bot says: Please include an entry for your PR in the Changelog. |
Also, you should run "npm run lint:prettier" to make sure your code adheres to the styleguides (and passes the travis tests) |
Like I said this is my first ever pull request... How do I include a CHANGELOG.md file? What should it include? Do I just take the one from my fork, add a line that says "Add support for Weatherbit" & attach? Do I create a new file named CHANGELOG.md with only a line that say "Adds support for Weatherbit"? How do I run @rejas I'll review your const/let comments when I get a chance (likely towards the end of the week). |
You should just add a new line to the already existing CHANGELOG.md file under the "Added" headline.
|
it's a commandline |
Post npm lint:prettier
Let me know if there is anything else |
Just fix that one merge-conflict and the PR seems good to go! |
I think I did it correctly & kept all changes (just removed the 3 conflict markers so that all info remained. |
Please run "npm run lint:prettier" to fix the style issues in the CHANGELOG. After those changes are pushed, this PR should be fine. |
Done.... Weird because my original CHANGELOG was OK, it was only after I resolved a conflict (by keeping both sets of changes - and using the GitHub website to do so) that this came up.... |
This is my first ever pull request, please let me know if I messed anything up.
Adds support for Weatherbit.io
Based on existing classes for Dark Sky and Weather.gov
API Key required
Config Options:
apiBase
https://api.weatherbit.io/v2.0
This value is REQUIREDweatherEndpoint
/current
,/forecast/daily
This value is REQUIREDapiKey
lat
lon