RSS feed code

225 views
Skip to first unread message

Jac1475

unread,
Jul 6, 2015, 7:42:41 AM7/6/15
to google-ajax...@googlegroups.com
Hi all.
I need to include a script for more than four rss feed entries.  What do i need to do?
here if my function;

<script type="text/javascript">
function load() {

 
new GFdynamicFeedControl(feed, "feedControl");


}
    
google.load("feeds", "1"); 
google.setOnLoadCallback(load);
</script>

Please do help.
Rgds

Jeremy Geerdes

unread,
Jul 6, 2015, 8:53:34 PM7/6/15
to google-ajax...@googlegroups.com
Two thoughts for you. First and most important, the Feeds API TOS allows Google to shut down the service at time, with or without warning. It is for this reason that I would strongly recommend AGAINST utilizing the Feeds API for any mission-critical projects. And I would hesitate to invest significant amounts of time or energy in making any new development work.

Second, I believe the solution you're looking for is this:

new GFdynamicFeedControl(feed, 'feedControl', {numResults:8});

jg




--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/b33c739b-8134-463b-9a4f-9a4cd3a63a62%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

M McCullough

unread,
Aug 27, 2015, 5:05:30 PM8/27/15
to Google AJAX APIs
Jeremy (or anyone else who can help) - I searched a bit but couldn't find the answer, so I thought I'd post here to see if you can help ... I'm using the Google RSS feed API to call a feed to my page, but when the feed has no items (it's a daily events feed), I'd like to present an error message like "There are no events scheduled for today." But looking at the API, I can't figure out how to go about that ... Any ideas?

Thanks,
Matt McCullough

To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/b33c739b-8134-463b-9a4f-9a4cd3a63a62%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-search-api+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jeremy Geerdes

unread,
Aug 27, 2015, 5:18:12 PM8/27/15
to google-ajax...@googlegroups.com
If you're writing your own custom control, this isn't all that tough. When you loop through the .entries array, add an if statement that checks the length of the array, as below:

if(feed.entries.length == 0 ){
    ...
} else {
    for(var i=0; i<feed.entries.length; i++){
        ...
    }
}

That said, you will want to take heed of this warning: the Feeds API has been deprecated. Not only that, but the TOS declares explicitly that it may be shut down at any time, with or without warning. I would be extremely reluctant to spend time and/or energy developing an app based on it, and I would avoid at all costs basing a mission-critical app on its functionality. I would strongly recommend that you consider developing your own solution.

jg


To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/b33c739b-8134-463b-9a4f-9a4cd3a63a62%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to

To view this message on the web, visit

For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages