Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add started_at for a stream object in /streams #196

Closed
Eksrow opened this issue May 11, 2014 · 20 comments
Closed

Add started_at for a stream object in /streams #196

Eksrow opened this issue May 11, 2014 · 20 comments

Comments

@Eksrow
Copy link

Eksrow commented May 11, 2014

There doesn't seem to be an obvious way to find out when a stream started, except by polling the API every X seconds for new streams and marking those down.

@Eksrow Eksrow changed the title Add time_started for a stream object in /streams Add started_at for a stream object in /streams May 11, 2014
@night
Copy link
Contributor

night commented May 22, 2014

A lot of people want this, but it's not in kraken.

You can use the JTV API in the meantime (since it still accepts Twitch streams for some reason).

http://api.justin.tv/api/stream/list.json?channel=CHANNEL

Look for the up_time key.

@dustin-lennon
Copy link

Night, how would one grab that value using node.js?

or wouldn't using the updated_at in the /streams in kraken work as well?

@night
Copy link
Contributor

night commented May 22, 2014

updated_at lets you know when the stream object was last updated, not when the stream began.

As for grabbing that using node.js, a "request" module exists to make external http calls easier. Check out https://github.com/mikeal/request for info on that.

@dustin-lennon
Copy link

The issue I am having is that fact that up_time is nested in an empty key name and don't know how to retrieve the key because of it.

@night
Copy link
Contributor

night commented May 23, 2014

The issue I am having is that fact that up_time is nested in an empty key name and don't know how to retrieve the key because of it.

It's the first object in an array, so in Javascript that'd be

if(data.length > 0) {
    var stream = data[0];
    // stream.up_time
}

if you assigned data to the data returned by the API.

@FugiTech
Copy link
Contributor

Other than an !uptime command, what would you use this data for?

@FugiTech FugiTech added Feature and removed Planning labels May 27, 2014
@bashtech
Copy link
Contributor

bashtech commented Aug 5, 2014

+1

@bashtech bashtech mentioned this issue Aug 6, 2014
@dustin-lennon
Copy link

+1

2 similar comments
@thinkpad4
Copy link

+1

@CommanderRoot
Copy link

+1

@Farcrada
Copy link

Farcrada commented Aug 7, 2014

For a "!highlight" command.

@Eksrow
Copy link
Author

Eksrow commented Aug 13, 2014

Is there an ETA for this?

@night
Copy link
Contributor

night commented Aug 13, 2014

Is there an ETA for this?

There is not an ETA, but for everything Twitch it's generally soon™ unless it's a major priority.

@amclay
Copy link

amclay commented Aug 15, 2014

+1 fugi pls

@FugiTech
Copy link
Contributor

+1 QA pls

s1mpl3x added a commit to JanStrauss/skadi that referenced this issue Mar 11, 2015
@vav17
Copy link

vav17 commented Aug 9, 2015

Indeed, I think this is a really basic function that should be added!

@FugiTech
Copy link
Contributor

FugiTech commented Aug 9, 2015

As you can see by the referenced commit, created_at was added last year. Enjoy!

@vav17
Copy link

vav17 commented Aug 9, 2015

Oh I oversaw this, Sorry! okay so I have "created_at":"2015-08-09T17:21:14Z" so how is this formatted? Year-month-day-??-hour-minutes-seconds?-?? and what timezone is this based on or does either the T or the Z tell me this?
-vav17

@night
Copy link
Contributor

night commented Aug 9, 2015

@vav17
Copy link

vav17 commented Aug 9, 2015

Thanks for the quick responces!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants