0

Hi guys
I am trying to buld an rss reader for random rss feeds in javascript. I need to catch the data in an event as I am going to pass around that event. I tried realtime.co or firebase and feedthefire but, there is no result so far. If someone has a relevant link that would be great
Thanks in advance

3
Contributors
6
Replies
36
Views
4 Years
Discussion Span
Last Post by llgms
0
var sites = [...]; //list of all the sites you need - choose one at random
var site = sites[Math.floor(Math.random() * sites.length)];

var yql = 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from xml where url="' + site + '"') + '&format=xml&callback=?';

// Request that YSQL string, and run a callback function.
// Pass a defined function to prevent cache-busting.
$.getJSON(yql, function (data) {
    console.log(data.results[0]);
    //open console to see results
});

From: http://jsfiddle.net/sMavF/

Well, that's the reader returning XML data now in more manageable json format ;)

0

Thanks very much for the reply, I really appreciate it. I am not sure if this is a real time though. I need one with the server pushing when there is an update rather than the client pulling. I guess I need token and a backend service

0

OK, when you said event, I assumed it was some 'event' like a 'gig' in the data content. I didn't realise that you meant 'event' coding-wise. Sorry.

Yeah, so for that you probably do need a service.

0

I need one with the server pushing

Unless your server runs something like node.js, pushing to the client is impossible. Long polling is the way to go.

0

yeah I exactly need the server service, I tried node.js as well but no luck. I mean I need a ready service as I don t have time for testing etc.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.