Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Working with the result. #7

Open
kruug opened this issue May 27, 2015 · 5 comments
Open

Working with the result. #7

kruug opened this issue May 27, 2015 · 5 comments

Comments

@kruug
Copy link

kruug commented May 27, 2015

How would one work with the result object to get data out?

@trimzulu
Copy link

You need to add the ForecastIOPortable.Models namespace to your project in order to use the Forecast class.

@kruug
Copy link
Author

kruug commented Jun 18, 2015

Right, I get that. I'm asking more about how to get the data out. Like, there's a screenshot that shows a partial glimpse at what's available, but nothing more than that.

@trimzulu
Copy link

Sorry if this isn't helpful but unfortunately the author seems to offer little in the way of documentation.

The best I can say is in his readme he references translating the JSON fields documented on the forecast.io website to more .NET convention-friendly names. An example was precipIntensityMax VS MaxPrecipitationIntensity.

Forecast.io themselves do have very nice documentation that you can check here:
https://developer.forecast.io/docs/v2

Again, I apologize if this isn't anything you don't already know.

@jcheng31
Copy link
Owner

Yeah, the documentation is pretty bad (read: non-existent) right now - sorry! I'll get something more concrete up soon. For now, the forecast.io documentation is your best bet, since the library was designed to be a one-to-one mapping to the raw API results just with the fields renamed.

In summary, though: the main result object contains current weather conditions (Currently property, shown in the README), minute-by-minute conditions for the next hour (Minutely property), hour-by-hour for the next two days (Hourly property), and day-by-day for the next week (Daily property). The actual data points in Minutely, Hourly, and Daily are retrievable from an IList (Minutes, Hours, or Days, respectively).

You can also open up the source for the various classes in the Models namespace - there are comments on each property explaining what they are, and the DataMember attributes give the name of the JSON field they correspond to.

Hope this helps for now. I'll try get something up over the weekend.

@aaronhoffman
Copy link

link to current documentation https://developer.forecast.io/docs/v2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants