API – Application Programming Interface available

Although YEL is currently still in ßeta (beta), there is a simple API available (currently in JSON format). With the API you can integrate your business / model with (live) YEL data. (which is a bit of a pleonasm, because the L in YEL stands for live).

How to use the API?
It is just a plain http-request. You can test it in your browser or with any http/AJAX get request.

Example(s)
Royal wedding - Kate MiddletonDetails about a program?

ProgramId is 19691795 which belongs to ‘The Royal Wedding day – Kate and William’

http://yeltv.com/19691795

and click details.

The list of API calls has been pre-formatted.
http://api.yeltv.com/19691795
And it will return this JSON data.
You can see it has 413 YELS, so you can filter al programs with data and build your own apps arround the YEL database/API.

Detailed YELs can be found with the /y/ parameter.  http://api.yeltv.com/y/19691795 will show the available YEL’s. It contains the following objects:
- id – (bigint) – a yel sequence number for this event.
- u – the username who yelled
- s – the second (relative to the start of the program)
- y – the yelbutton / emotion used. (enum – 1 to 8) where on a 2 buttons system: 2 = negative, 3 = positive
- c – the text comment (optional)

Limit live data to latest … 100 yels?

Ofcourse, when integrating live results you don’t want to handle all the data. So there is a another switch which will return only the ‘latest’ / top number of yels. It includes the unique id, username, the second (relative to start of program/event), the yelbutton (1 to 8) corresponding to the emotion. And the optional comment.

Last 5 yels: http://api.yeltv.com/y/19691795/5
Last 25 yels: http://api.yeltv.com/y/19691795/25

This (below) is another example from the popular show ‘Boer Zoekt Vrouw’ with currently ‘fake’ data, because that program ran in winter 2010 when YEL didn’t yet exist.

 

 

Suggest other API calls:
Need more or other API calls / suggest a feature / or facing any problems with the JSON format? Let us know.
You can use the comment form  or the contact page

This entry was posted in API, Blog, Support, Tutorial. Bookmark the permalink.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>