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
Kevin
@KevinBruland
let me look at a call, I used the actual twitch API... so mines a bit different
grantknaver
@grantknaver
ya now they are saying that is having problems so they recommend changing the url
thanks man I am at my wits end
Kevin
@KevinBruland
ah, I see now
so in this API, stream is an object that contains the logo
grantknaver
@grantknaver
yep
but if it comes back null it does not contain the logo
so I used the channel object, but there does not seem to be anthing I can build an if statement around using channel so... hence I am stuck
I have no idea
Kevin
@KevinBruland
well
the .fail you have on line 102,
grantknaver
@grantknaver
ya
Kevin
@KevinBruland
is it failing?
grantknaver
@grantknaver
nope
everything seems to be working
wait
what are you suggesting
Kevin
@KevinBruland
sorry, I think I am a bit confused by the layout
grantknaver
@grantknaver
lol its fine
Kevin
@KevinBruland
so your get offline is supposed to be a seperate API call, right?
grantknaver
@grantknaver
yes
I was going to use two diffent api calls to get the info I need
if you have a different idea on how I can generate the info for the different channels, I am open to suggestions
Kevin
@KevinBruland
where are you calling getOffline?
grantknaver
@grantknaver
I took it off. it was at the very bottom
it generates a very weird result
I figured the weird result was because I was not inferring what indexes of channels to apply getOffline to
Kevin
@KevinBruland
I am still looking, I am not really sure if I can help with this format, ive done them very differently
grantknaver
@grantknaver
what did you do
am I completely off the mark
Kevin
@KevinBruland
I don't think you are, but I wouldnt do a seperate API call
for offline channels
I didn't have access to logos within the stream call, so I did one call for all channels to /channels/ to get the logo, and then a different call to get the stream info
what I would do is have the offline function just take in one argument for the channel you need to do a separate call on
and then an else after the if(response.stream!=null) that will call that separate API call
if that makes sense
grantknaver
@grantknaver
hard part is to get to the response.stream you need to be in a request
Kevin
@KevinBruland
yeah
I had everything inside of the getJSON
grantknaver
@grantknaver
what do you mean all in everything inside getJSON
Kevin
@KevinBruland
give me a second and I can make an example
grantknaver
@grantknaver
thanks
helpful :)
Kevin
@KevinBruland
here we go
sorry that took so long
so you can see in that example, if data.stream is false, the if statement on line 11 wont fire
so it then goes to the else on line 14, and calls getChannel, passing the channel that did not have data.stream
grantknaver
@grantknaver
I like ajax alot more
Kevin
@KevinBruland
the way you did it?