Freecodecamp: Passthrough Endpoint for Weather API challenge

Created on 8 Jan 2016  Â·  14Comments  Â·  Source: freeCodeCamp/freeCodeCamp

Currently, campers have to find their own weather APIs and leave their API keys in their solutions.

We need to create an endpoint where campers can pass params and we'll go fetch the data for them using our unexposed API key, then return that data to them.

This will also make the challenge much easier, as they can focus on working with the data and presenting it, rather than having to figure out the API themselves.

Challenge Zipline: Show the Local Weather has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

help wanted

All 14 comments

The OpenWeather API isn't difficult to obtain. I'm not sure if you cover how to set environment variables in Heroku, but it seems like a good topic as people advance in building apps (if there were any chance of moving the hosting from Codepen to Heroku). I haven't looked at the actual limits, but I'd worry about maxing out calls to a shared API as more and more campers complete the challenge.

Open Weather App say that they will remove API limits for open source projects, in case that's useful / new information for you guys.

I've provided a screenshot of exactly what they say, and a link to where I found the information.

image

http://openweathermap.org/faq#error401

That's great, but that doesn't negate the fact that there information is
just downright erroneous. :(
On 03/08/2016 09:25 PM, Dawson DePretis wrote:

Open Weather App say that they will remove API limits for open source
projects, in case that's useful / new information for you guys.

I've provided a screenshot of exactly what they say, and a link to
where I found the information.

image
https://cloud.githubusercontent.com/assets/9157052/13623281/4c5f1a22-e55a-11e5-988d-e32147f6986e.png

http://openweathermap.org/faq#error401

—
Reply to this email directly or view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5965#issuecomment-194074620.

Yeah that's absolutely true. I was just hoping that knowing that a special non-restricted API key is possible to acquire might make a system where campers would go through a FCC server to get open weather map data more doable.

I used Weather Underground, and I'd recommend it to anyone. :)

On 03/08/2016 10:44 PM, Dawson DePretis wrote:

Yeah that's absolutely true. I was just hoping that knowing that a
special non-restricted API key is possible to acquire might make a
system where campers would go through a FCC server to get open weather
map data more doable.

—
Reply to this email directly or view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5965#issuecomment-194100476.

Does Weather Underground require an API key to use?

It does, but so does almost every other API. That said it's free for upto 500 calls per day, which for the most part is fine. It's unlikely an FCC project would need more than that.

Sent from my T-Mobile 4G LTE Device

-------- Original message --------
From: Dawson DePretis [email protected]
Date: 3/9/2016 5:51 PM (GMT-05:00)
To: FreeCodeCamp/FreeCodeCamp [email protected]
Cc: Krista Prenesti [email protected]
Subject: Re: [FreeCodeCamp] Passthrough Endpoint for Weather API challenge
(#5965)

Does Weather Underground require an API key to use?

—
Reply to this email directly or view it on GitHub.

That's very true, but having a publicly posted API key (in codepen) means that people could potentially find that API key and use it for their own purposes and max out that 500 calls per day or get the API key banned because it's abused. As a result, FCC is trying to find a way to allow campers to not have to expose an API key.

Easy. Use github to host the projects instead of codepen. Code should
be pushed to github sooner rather than later. I had learned github
myself before coming to FCC, but I don't understand why they wait so
long to teach it. With any github repo (for a static site), you need
only create a branch called gh-pages and push the code. That way you can
show off your site and the api key is not as easily seen. Besides,
Codepen is a nightmare to work with anyway.

On 03/09/2016 06:31 PM, Dawson DePretis wrote:

That's very true, but having a publicly posted API key (in codepen)
means that people could potentially find that API key and use it for
their own purposes and max out that 500 calls per day or get the API
key banned because it's abused. As a result, FCC is trying to find a
way to allow campers to not have to expose an API key.

—
Reply to this email directly or view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5965#issuecomment-194564434.

Still a public API key, even if it's slightly harder to find.
On Wed, Mar 9, 2016 at 3:39 PM Krista Prenesti [email protected]
wrote:

Easy. Use github to host the projects instead of codepen. Code should
be pushed to github sooner rather than later. I had learned github
myself before coming to FCC, but I don't understand why they wait so
long to teach it. With any github repo (for a static site), you need
only create a branch called gh-pages and push the code. That way you can
show off your site and the api key is not as easily seen. Besides,
Codepen is a nightmare to work with anyway.

On 03/09/2016 06:31 PM, Dawson DePretis wrote:

That's very true, but having a publicly posted API key (in codepen)
means that people could potentially find that API key and use it for
their own purposes and max out that 500 calls per day or get the API
key banned because it's abused. As a result, FCC is trying to find a
way to allow campers to not have to expose an API key.

—
Reply to this email directly or view it on GitHub
<
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5965#issuecomment-194564434
.

—
Reply to this email directly or view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5965#issuecomment-194568502
.

Is this still needed or was it handled elsewhere?
I've done a few basic node/express backend projects and think that I could handle this.

I think I understand the requirements.

Campers should be able to make a get request including latitude/longitude in the request url , and get back a response containing the daily forecast in json.

Is OpenWeather API data that bad? It seemed to provide the basic info I needed.

If a request/day limited API provides much better data then OpenWeather I could setup a check on the server. I would log out # of requests in a 24 hour period. If it turns out we are going over the limit for Weather Underground I could create additional api keys that are cycled through once we start getting request failures.

Any ideas on dealing with the geolocation issue in the same app? Chrome recently (~6 weeks maybe) removed support for HTML5 Geolocation on non secure origins, i.e free codepen. Some people are using API's for handling that also.

I am working on this.

Sorry we no longer need this.

Happy Coding

Hey this is Megan. Im going to lose my phone plan tomorrow. Do u know any
wi fi passcodes or any way i can access internet on LG phone?
On Jun 8, 2016 6:38 AM, "Andrew Schmidthuber" [email protected]
wrote:

Is this still needed or was it handled elsewhere?
I've done a few basic node/express backend projects and think that I could
handle this.

I think I understand the requirements.

Campers should be able to make a get request including latitude/longitude
in the request url , and get back a response containing the daily forecast
in json.

Is OpenWeather API data that bad? It seemed to provide the basic info I
needed.

If a request/day limited API provides much better data then OpenWeather I
could setup a check on the server. I would log out # of requests in a 24
hour period. If it turns out we are going over the limit for Weather
Underground I could create additional api keys that are cycled through once
we start getting request failures.

Any ideas on dealing with the geolocation issue in the same app? Chrome
recently (~6 weeks maybe) removed support for HTML5 Geolocation on non
secure origins, i.e free codepen. Some people are using API's for handling
that also.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/FreeCodeCamp/FreeCodeCamp/issues/5965#issuecomment-224590574,
or mute the thread
https://github.com/notifications/unsubscribe/ARoqChjsZX2Fgrf223BeG9WuuZXwILGtks5qJsXfgaJpZM4HA4Ak
.

Was this page helpful?
0 / 5 - 0 ratings