PeopleAggregator API: method metaWeblog.getPost

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

Method: metaWeblog.getPost

(metaWeblog API) Get detail of a post from a blog. [NOTE: DO NOT USE THE REST FORM OF THIS API CALL; THE METAWEBLOG API IS XML-RPC ONLY]

Arguments (see also Authentication)

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

postid

Type: string
ID of the post you wish to delete (in the form returned by metaWeblog.newPost).
Example: user:123:456

login

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

password

Type: string
User's password.
Example: testuser123

Return value (see also Exceptions)

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

title

Type: string
Post title
Example: This is a post

description

Type: string
Post content
Example: It really is.

link

Type: string
Link associated with this post
Example: marc

permaLink

Type: string
Permalink of this post
Example: http://example.org/content.php?cid=456

Example REST (XML) request

Request

Response

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

<response>
 <permaLink>http://example.org/content.php?cid=456</permaLink>
 <description>It really is.</description>
 <title>This is a post</title>
 <userid>marc</userid>
 <dateCreated>2006-05-20T12:34:56Z</dateCreated>
 <link>marc</link>
 <postid>user:123:456</postid>
</response>

Example REST (JSON) request

Request

Response

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

{"permaLink": "http://example.org/content.php?cid=456", "description": "It really is.", "title": "This is a post", "userid": "marc", "dateCreated": "2006-05-20T12:34:56Z", "link": "marc", "postid": "user:123:456"}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>metaWeblog.getPost</methodName>
  <params>
   <param>
    <value><string>user:123:456</string></value>
   </param>
   <param>
    <value><string>testme</string></value>
   </param>
   <param>
    <value><string>testuser123</string></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>permaLink</name>
      <value><string>http://example.org/content.php?cid=456</string></value>
     </member>
     <member>
      <name>description</name>
      <value><string>It really is.</string></value>
     </member>
     <member>
      <name>title</name>
      <value><string>This is a post</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>
     <member>
      <name>link</name>
      <value><string>marc</string></value>
     </member>
     <member>
      <name>postid</name>
      <value><string>user:123:456</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>