Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Garo
@Garabed96
I'm trying to find out how to even call the info from the json file, I tried using xml but I got an Access-control allow origin error
so I switched to darksky
Zachary
@Bazill03
@Garabed96 Also you might want to disable ad blockers. Otherwise your browser might block the request.
Jorge
@flawedLogic506
@Bazill03 there has been some issues with codepen lately .. so to be honest, I am not 100% sure what the correct way to get it would be, in theory, now should work better since it's always served over HTTPS, so it means that geolocation should in theory work
@Bazill03 u dont need to move the variables lat and long inside if you dont want to, but u need to be able to modify them on the geolocation call and inside that if statement, you would make the API request
@Garabed96 yeah that's probably because you are using chrome ..
Zachary
@Bazill03
@OrangeKulture The geolocation I'm using does work. However when I assign the lat and long variables in the location function they don't assign. Instead I get the weather for (0,0)
Garo
@Garabed96
ya I get the lat and long, it even sent it to openweather network but they're not compatible because geolocation uses https and openweather uses http
Jorge
@flawedLogic506
@Bazill03 i think you now have to pass in header params to the request, no so sure ..
Zachary
@Bazill03
@Garabed96 Yeah, use darksky. Openweather not accepting https makes it unusable.
Jorge
@flawedLogic506
i have to debug mine .. it was working fine and now it's not, i do have a proxy for https on openweather, so that must be the problem
Zachary
@Bazill03
@OrangeKulture lol, that's exactly what I'm doing. Damned thing used to work.
Garo
@Garabed96
@Bazill03 can you link me anything that would help, I believe I need to use JSONP
Jorge
@flawedLogic506
yeah .. it has something to do with that, most likely .. i think we need to switch over to dark sky
and @Garabed96 .. sry forgot to follow up, so u mean the JSON call for the .. weather app?
Garo
@Garabed96
ya
Zachary
@Bazill03
You'll have to sign up.
Jorge
@flawedLogic506
@Garabed96 whats the code you are using for the API call?
Zachary
@Bazill03
This works, but is much messier than I wanted since everything is crammed into a single function. https://codepen.io/Bazill/pen/MbmpaB?editors=1111
Garo
@Garabed96
@Bazill03 @OrangeKulture I'm already signed up, I have the api key in my codepen, Im looking at the example code on its github
looking at timeMachineRequest Callbacks
Zachary
@Bazill03
@Garabed96 Link your pen.
has nothing in it lol
Zachary
@Bazill03
@Garabed96 Put your request in a function, not a variable.
Garo
@Garabed96
is that the error?
Gulsvi
@gulsvi
@Garabed96 You're getting a cross origin error. Use your browser's debug console to see the error (Ctrl+Shift+J). When using $.getJSON, the way to work around that issue in most cases is to add callback=? as a parameter to your API URL:
var url = "https://api.darksky.net/forecast/" + api_key + "/" + lat + "," + long + "?callback=?";
Paradox5
@Paradox5
Pin
Corri Taylor
@corritaylor
@Bazill03 That is great!
Chasen Bettinger
@chasen-bettinger
Has anyone completed the Weather App front end project recently? I need help
Corri Taylor
@corritaylor
Before I pull my hair out, do we go back to our portofolio after we finish the basic training. I’m not feeling how it looks, but it meets all the requirements. My Portfolio
the0ffh
@the0ffh
@chasen-bettinger I did. What is your problem?
Chasen Bettinger
@chasen-bettinger
@the0ffh did you use OWM?
for your API calls
the0ffh
@the0ffh
no, yahoo
keyless ;)
Chasen Bettinger
@chasen-bettinger
@the0ffh okay thank you. Every time I made an API call to OWM I'd get a 404 from codepen
CamperBot
@camperbot
chasen-bettinger sends brownie points to @the0ffh :sparkles: :thumbsup: :sparkles:
:cookie: 317 | @the0ffh |http://www.freecodecamp.com/the0ffh
the0ffh
@the0ffh
@chasen-bettinger Do you have CORS related issue?
@chasen-bettinger hold on a moment
can you post the full url you are using?
Chasen Bettinger
@chasen-bettinger
ya
'api.openweathermap.org/data/2.5/weather?lat=' + latitude + '&lon=' + longitude + '&APPID=
the0ffh
@the0ffh
damn.. it needs a key. One moment.
btw did you check it directly in a browser?
Chasen Bettinger
@chasen-bettinger
yea