PeopleAggregator API: method blogger.getRecentPosts

Arguments | Return value | REST (XML) example | REST (JSON) example | XML-RPC example

Method: blogger.getRecentPosts

(Blogger API) Get a number of recent posts from a blog. (DEPRECATED - use metaWeblog.getRecentPosts if possible). [NOTE: DO NOT USE THE REST FORM OF THIS API CALL; THE BLOGGER API IS XML-RPC ONLY]

Arguments (see also Authentication)

If calling by XML-RPC, note that this method takes 5 arguments, NOT a single struct, like most other methods in this API.

appkey

Type: string
Appkey - not required.
Example: none

blogid

Type: string
Identifier for the 'blog' container you wish to publish to (blogids can be obtained by calling blogger.getUsersBlogs() and looking for the 'blogid' parameter in the array items in the returned data).
Example: user:123

login

Type: string
User's login name.
Example: testme

password

Type: string
User's password.
Example: testuser123

n_posts

Type: int
The number of posts to retrieve
Example: 10
Maximum: 50

Return value (see also Exceptions)

Type: array

Content of each item:

item

Type: hash

Attributes:

dateCreated

Type: datetime
The post's timestamp
Example: 2006-05-20T12:34:56Z

userid

Type: string
The user ID for the user who created this post
Example: marc

postid

Type: string
The ID of this post
Example: user:123:456

content

Type: string
Post content
Example: It really is.

Example REST (XML) request

Request

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 335

<response>
 <item>
  <content>It really is.</content>
  <postid>user:123:456</postid>
  <userid>marc</userid>
  <dateCreated>2006-05-20T12:34:56Z</dateCreated>
 </item>
</response>

Example REST (JSON) request

Request

Response

HTTP/1.1 200 OK
Content-Type: application/x-javascript
Content-Length: 113

[{"content": "It really is.", "postid": "user:123:456", "userid": "marc", "dateCreated": "2006-05-20T12:34:56Z"}]

Example XML-RPC call

Request

POST /api/xmlrpc HTTP/1.1
Content-Type: text/xml
Content-Length: 1051

<?xml version='1.0'?>
 <methodCall>
  <methodName>blogger.getRecentPosts</methodName>
  <params>
   <param>
    <value><string>none</string></value>
   </param>
   <param>
    <value><string>user:123</string></value>
   </param>
   <param>
    <value><string>testme</string></value>
   </param>
   <param>
    <value><string>testuser123</string></value>
   </param>
   <param>
    <value><int>10</int></value>
   </param>
  </params>
 </methodCall>
 

Response

HTTP/1.1 200 OK
Content-Type: text/xml
Content-Length: 1727

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><array><data>
     <value><struct>
      <member>
       <name>content</name>
       <value><string>It really is.</string></value>
      </member>
      <member>
       <name>postid</name>
       <value><string>user:123:456</string></value>
      </member>
      <member>
       <name>userid</name>
       <value><string>marc</string></value>
      </member>
      <member>
       <name>dateCreated</name>
       <value><string>2006-05-20T12:34:56Z</string></value>
      </member>
     </struct></value>
    </data></array></value>
   </param>
  </params>
 </methodResponse>