PeopleAggregator API: method blogger.newPost

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

Method: blogger.newPost

(Blogger API) Creates a new content item. (DEPRECATED - use metaWeblog.newPost 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 6 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

content

Type: string
Post content.
Example:

This is a test post.

publish

Type: boolean
true if the post should be published immediately, or false if it should be kept as a draft.
Example: True

Return value (see also Exceptions)

Type: string
The post ID of the created post (suitable for sending back to metaWeblog.editPost and metaWeblog.getPost).
Example: user:123:456

Example REST (XML) request

Request

POST /api/xml/blogger/newPost HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 122

appkey=none&content=%3Cp%3EThis+is+a+test+post.%3C%2Fp%3E&login=testme&password=testuser123&blogid=user%3A123&publish=True

Response

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

<response>user:123:456</response>

Example REST (JSON) request

Request

POST /api/json/blogger/newPost HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 122

appkey=none&content=%3Cp%3EThis+is+a+test+post.%3C%2Fp%3E&login=testme&password=testuser123&blogid=user%3A123&publish=True

Response

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

"user:123:456"

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>blogger.newPost</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><string>&lt;p&gt;This is a test post.&lt;/p&gt;</string></value>
   </param>
   <param>
    <value><boolean>1</boolean></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><string>user:123:456</string></value>
   </param>
  </params>
 </methodResponse>