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
Mercy Manrique
@mers89
@gothamknight so when the user is offline there is no access to the data using the same link
Ayush Bahuguna
@relentless-coder
Need some help with css
https://codepen.io/ayushb/pen/EverBx
I am trying to have the tiny dots before the links in the sub menu the way it appears on the main menu item
iso
@iso1048
@mers89 yeah
Jorge
@flawedLogic506
@adamfaraj what seems to be the problem?
Adam Faraj
@adamfaraj
@OrangeKulture i want to change the weather icon based on what the weather is, ie: clear, rain, clouds, etc
iso
@iso1048
@mers89 so when you make the first ajax call using the streams route, you can check if json.stream == null. If so, then make a new ajax call using the channels route (if you want to get data). If json.stream !== null, then you can access the data in the json of the first ajax call. That is just one way to do it. Does that make sense?
Mercy Manrique
@mers89
@jtan3 I was just tryng to see if my code was broken or if it was just an online/offline thing. Ir was working fine on friday
Adam Faraj
@adamfaraj
so i wanted to do an if else statement @OrangeKulture . ```if (dom.wthr[0].innerHTML == "Clear") { then change picture, etc etc}
console.log(dom.wthr) gives me the object
won't let me access the text within that div
iso
@iso1048
@adamfaraj can you not access the url for the image from the json?
Johnny
@jtan3
@mers89 if you provide your codepen it would easier to see the problem.
Mercy Manrique
@mers89
@gothamknight @jtan3 it's the section where it says "Free Code Camp is currently offline. Before I was able to click and it would take me to the URL of twitch TV for FCC
Ayush Bahuguna
@relentless-coder
@mers89 I think a good way to test your project is get more data, you can have more data from twitch's api. But I had worked on that problem a long time ago, and maybe things have changed.
Johnny
@jtan3
@mers89 you haven't linked the offline part to anything yet ?
Mercy Manrique
@mers89
@ayush but isnt a URL a URL link or does the API override that. Im not sure whether the channel being offline breaks the link'
Ayush Bahuguna
@relentless-coder
@mers89 @jtan3 twitch api works without client id??!!!
Johnny
@jtan3
@relentless-coder yes with the new https://wind-bow.glitch.me/twitch-api/streams/ESL_SC2
iso
@iso1048
@relentless-coder using a different endpoint, so yeah.
@mers89 Could you rephrase your question - I'm not sure what you are asking.
Adam Faraj
@adamfaraj
@gothamknight i don't have a url for the images
Ayush Bahuguna
@relentless-coder
@gothamknight but does this work if I want to fetch all the live streams?
iso
@iso1048
@adamfaraj so you want to have like a background image or something which changes based on the weather?
Mercy Manrique
@mers89
@gothamknight I was using var url= "https://wind-bow.glitch.me/twitch-api/streams/freecodecamp"; and it will create a link on my page that said "Free Code Camp is currently offline/online" and you can click on it and it would take you to the URL. Today that I looked at it that the channel was offline it just showed up at text on the page saying it was offline and it wasnt a link anymore
Jorge
@flawedLogic506
@adamfaraj sry.. spaced out for a sec .. looking now
@adamfaraj i see you do have the Clouds displayed... isnt that from the json?
Johnny
@jtan3
@mers89 you need use an a tag and provide the stream's url from the api's data.
Jorge
@flawedLogic506
@mers89 u also have to take into account that when u do set it up correctly, the link might take you to the channel within the twitch website, but it wont work .. only way it works is on debug mode
iso
@iso1048
@mers89 I am not sure what is happening there. You could try seeing what happens when you use a user who is online.
@relentless-coder I have only used that endpoint for what the fCC challenge required.
Adam Faraj
@adamfaraj
@OrangeKulture yes, but i hate those pictures. i have new pictures i want to use based on the weather
Jorge
@flawedLogic506
@adamfaraj right, i understand .. yeah i would handle the logic differently, u dont need to create all those dom nodes
u can just create one, and fill it with data depending on the weather
Mercy Manrique
@mers89
@jtan3 @gothamknight @OrangeKulture thanks. Ill try putting a user that is online like gotham said. Thanks for your help. I wasnt sure if I was trying to fix something that wasnt broken
CamperBot
@camperbot
mers89 sends brownie points to @jtan3 and @gothamknight and @orangekulture :sparkles: :thumbsup: :sparkles:
:cookie: 405 | @gothamknight |http://www.freecodecamp.com/gothamknight
:cookie: 448 | @orangekulture |http://www.freecodecamp.com/orangekulture
:cookie: 458 | @jtan3 |http://www.freecodecamp.com/jtan3
iso
@iso1048
@mers89 no problem. good luck!
Jorge
@flawedLogic506
@mers89 your call is actually good .. i just tested, u said you wanted it to be a link tho, right? it doesnt have an anchor tag or an event handler, thats why its not a link atm
Mercy Manrique
@mers89
@OrangeKulture really? yes that is what I was trying to do
Adam Faraj
@adamfaraj
@OrangeKulture right, but i want to fill it based on what the wthr is, and i can't even access what the weather is. haha. Clear, Clouds, etc
Jorge
@flawedLogic506
@mers89 yeah , i mean there is nothing binding to a link .. the Free Code Camp title is an h2 tag ..
u would need to either, create an anchor tag and wrap that h2, like so: <a href="www.fcctwitch.com target="_blank"><h2>FCC</h2></a>
something like that
@adamfaraj yeah the thing with your code is that you are using a promise for the ajax call, i kinda hate promises hahah.. so i dont use em as much .. but what i would do is, find the key value pair that'll give you the weather
iso
@iso1048
@adamfaraj you could check in the json itself for the description of the weather