Hello, please add my changes #3

Merged
merged 5 commits into from Oct 11, 2016

Conversation

Projects
None yet
2 participants
@PaulMaly

PaulMaly commented Jul 8, 2016

Changes includes ability to get more complex result's object, in format unified for all providers. So, you'll be able to do this:

result.getFullResults()

and get something like this:

{ lat: 56.31, lon: 44.02, temp: 20.51, max: 21, min: 20, code: 802, summary: 'Clouds', humidity: 68, pressure: 1006, sunrise: 1467937676, sunset: 1468000169, windSpeed: 4, windDir: 160 }

object with identical fields regardless of provider. Thanks!

@bhdouglass

This comment has been minimized.

Show comment
Hide comment
@bhdouglass

bhdouglass Jul 8, 2016

Owner

I like the idea, but I would rather see the CODE returned be one of the internal codes rather than whatever the provider returns. That way people will get what they expect even when switching providers. Also it would be nice to have a units passed in like the other functions, so everything gets normalized. Additionally FEELS_LIKE could be entirely arbitrary, I'd rather see both heat index and wind chill in there.

After having said all that, I'm starting to wonder if this function really fits..

Owner

bhdouglass commented Jul 8, 2016

I like the idea, but I would rather see the CODE returned be one of the internal codes rather than whatever the provider returns. That way people will get what they expect even when switching providers. Also it would be nice to have a units passed in like the other functions, so everything gets normalized. Additionally FEELS_LIKE could be entirely arbitrary, I'd rather see both heat index and wind chill in there.

After having said all that, I'm starting to wonder if this function really fits..

@PaulMaly

This comment has been minimized.

Show comment
Hide comment
@PaulMaly

PaulMaly Jul 8, 2016

This code solves my own problem - I really need to get access to initial data. So, I think someone needs too. So, if a need to get normalized code value I already have result.getCondition() method.

PaulMaly commented Jul 8, 2016

This code solves my own problem - I really need to get access to initial data. So, I think someone needs too. So, if a need to get normalized code value I already have result.getCondition() method.

@bhdouglass

This comment has been minimized.

Show comment
Hide comment
@bhdouglass

bhdouglass Jul 8, 2016

Owner

Out of curiosity, why do you need access to the initial data?

So if that's the usecase, I would prefer the function be called something like, getRawResult, that way it indicates that this data isn't the nice formatted stuff.

Owner

bhdouglass commented Jul 8, 2016

Out of curiosity, why do you need access to the initial data?

So if that's the usecase, I would prefer the function be called something like, getRawResult, that way it indicates that this data isn't the nice formatted stuff.

@bhdouglass bhdouglass merged commit 63384a5 into bhdouglass:master Oct 11, 2016

@bhdouglass

This comment has been minimized.

Show comment
Hide comment
@bhdouglass

bhdouglass Oct 11, 2016

Owner

I merged, but changed the function to getRawResults. It's up on npm as v2.0.11.

Owner

bhdouglass commented Oct 11, 2016

I merged, but changed the function to getRawResults. It's up on npm as v2.0.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment