Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Andrew Aquino
360 PointsIf I push a weather app to the itunes app store with the forecast.io api, how do I deal with the pricing?
Do I really have all these API calls under my name? Or is there a way to have each user register for an API key of their own. How does it work in the real world?
Thank you so much.
Cheers, Andrew
2 Answers
Stone Preston
42,016 Pointsif you dont want to take the risk of going over the api request free limit and facing a fee you may not want to put this on the app store using the current api.
in the real world yes the developer/company pays for this since forecast is providing an api service to developers. you could push this cost onto the customer by charging for your app (you wouldnt want to make them get their own api keys though)
Chris Shaw
26,676 PointsHi Andrew,
It's perfectly fine to send the app out using your API keys as only you have the source for the app thus no one can see it from a consumer standpoint, if you forced users to get their own developer keys it would become a horrible experience and no one would want to use your app as the API keys are for developers only.
Hope that clears things up.
Stone Preston
42,016 PointsI dont think thats really what his question is concerning. the problem is that forecast charges the developer after a certain number of api requests.
Chris Shaw
26,676 PointsI know, but that is an issue for the developer to worry about, not the consumer.
Stone Preston
42,016 PointsYes... and hes the developer...and hes worried about it. his question is not asking if its ok for his api keys to be present in the code, its that if he puts it on the store hes going to have to pay for api requests if he indeed goes over the limit
Andrew Aquino
360 PointsThanks for the responses! Yeah my question is asking whether or not, I will be the one paying forecast.io for all the api calls. That means I would have to charge for my weather app, so I do not end up paying for everyone else's calls, correct?
Edit: nvm answered in the other comment!
Andrew Aquino
360 PointsAndrew Aquino
360 PointsAhh okay, thank you! That clears it up.
Stone Preston
42,016 PointsStone Preston
42,016 Pointsno problem.
you can charge for the app, however there is still a risk of you not bringing in enough sales to cover that. granted the api calls are relatively cheap, but still. there is risk.
forecast states:
Andrew Aquino
360 PointsAndrew Aquino
360 PointsOh, then followup. How do other developers of the massive amounts of weather applications deal with that. Do they just take the risk, or do they write the API themselves?
Stone Preston
42,016 PointsStone Preston
42,016 PointsI dont really know. maybe there is another api out there that is free to use. you could look into that.
writing the api yourself could be an option, but the weather data has to come from somewhere so there is that to think about as well
Andrew Aquino
360 PointsAndrew Aquino
360 PointsAlright. Thanks so much!
Stone Preston
42,016 PointsStone Preston
42,016 Pointsquick google search brings up http://openweathermap.org/api which is a free api (with paid plans as well). you get 3000 calls/min which you are unlikely to exceed as opposed to 1000/day limit that forecast imposes.