Hello all,

I'm using Google Feeds API to pull create a list of headlines from an RSS 
feed.

I'm using the "entry.link" attribute to get a URL for the href of an item 
in the list. According to documentation 
<https://developers.google.com/feed/v1/devguide#resultJson>this should 
return the <link> attribute in the RSS feed, but it is instead returning 
the <guid>, which is a different value (and not what I want).

An example feed, which validates per W3:

http://www.statesman.com/list/rss/news/crime-law/austin-homicide-project-recent-coverage/aKbD/

Here is an example of where this is used;
http://stage.host.coxmediagroup.com/aas/projects/homicides/

The "Recent stories from the Austin Homicide Project" list shows the 
returns. Note the href is something like:

https://identifiers.cmgdigital.com/medley1/news.medleystory/2552730/

which is the value for <guid>

instead of:

http://www.statesman.com/news/news/crime-law/police-guard-shot-man-when-his-car-was-damaged/ngkmZ/

which is the value for <link>

This is the script:
        <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
        <script type="text/javascript">
        var RSS_feed = 
"http://www.statesman.com/list/rss/news/crime-law/austin-homicide-project-recent-coverage/aKbD/";
            google.load("feeds", "1");
            function initialize() {
              var feed = new google.feeds.Feed(RSS_feed);
            feed.setNumEntries(20);
              feed.load(function(result) {
                if (!result.error) {
                  var container = document.getElementById("feed");
                  for (var i = 0; i < result.feed.entries.length; i++) {
              var entry = result.feed.entries[i];
              var li = document.createElement("li");
              li.innerHTML = '<a href="' + entry.link + '">' + entry.title 
+ '</a>';
              container.appendChild(li);
                  }
                }
              });
            }
            google.setOnLoadCallback(initialize);
        
        document.write("<h4>Recent stories from the Austin Homicide 
Project<\/h4>");
        document.write("<div id=\"medleycontent\">");
        document.write("  <ul id=\"feed\">");
        document.write("  <\/ul>");
        document.write("<\/div>");
        </script>

Any ideas how I can get the <link> instead of <guid>?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/e2dd19fa-bf1d-48f5-9e3b-79489bddbd35%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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to