5 messages in com.googlegroups.bloggerdevRe: [bloggerDev] Re: How do I retriev...
FromSent OnAttachments
TheDoor16 Feb 2007 03:13 
Pete Hopkins ☠16 Feb 2007 09:55 
TheDoor20 Feb 2007 01:50 
Pete Hopkins ☠20 Feb 2007 09:47 
TheDoor22 Feb 2007 02:24 
Subject:Re: [bloggerDev] Re: How do I retrieve a blog entry content?
From:Pete Hopkins ☠ (phop@google.com)
Date:02/20/2007 09:47:07 AM
List:com.googlegroups.bloggerdev

What does the feed look like? Does it seem correct?

Can you describe what you mean by getContent() "not working"?

-- Pete

On 2/20/07, TheDoor <deep@gmail.com> wrote:

Hey Pete

I tried getting both the summary and the content, but the summary is null and the getContent() method only prints out the string representation of the TextContent object.

Here's the constructor which fetches the XML Feed.

private Feed blogFeed = null;

public FeedUtils() { try { URL feedUrl = new URL("http://bubblare.blogspot.com/feeds/posts/ default"); GoogleService myService = new GoogleService("blogger", "bpr"); blogFeed = myService.getFeed(feedUrl, Feed.class); } catch (Exception e) { throw new FeedException("Could not connect to Google Service", e); } }

On 16 Feb, 18:55, "Pete Hopkins ☠" <phop@google.com> wrote:

Use a combination of getContent and getSummary, I believe, since which one is presend depends on on whether the blog feed is set to full or summary by an admin.

What feed URL are you using?

-- Pete

On 2/16/07, TheDoor <deep@gmail.com> wrote:

Hey all

How do I retrieve blog entry content with the Google Api? I can read the blog entry titles but I'm having a hard time retrieving the entry content. My first guess was to use Entry#getContent() but that doesn't work either.

public Map<String, String> getBlogEntries() { if(blogFeed == null) throw new NullPointerException("Blog feed is null");

for(Entry blogEntry : blogFeed.getEntries()) { System.out.println(blogEntry.getTitle().getPlainText()); }

return blogEntries; }