PeopleAggregator API: method peopleaggregator.newBoardMessage

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

Method: peopleaggregator.newBoardMessage

Create a new topic in a group, or reply to an existing topic.

Arguments (see also Authentication)

If calling by XML-RPC, note that this method takes a single struct as input, with the following keys:

authToken

Type: string
An authentication token for the user creating the content (leave blank if posting anonymously - allowed for some topics).
Example: as9d867f234o7asdf:928734982734987234:298374982734987234
Default:

context

Type: string
ID of group in which to create the new topic, or the topic to reply to
Example: group:123

title

Type: string
Title of new topic
Example: This is a topic

content

Type: string
Content of new topic
Example: This is the main body of the new topic

allowAnonymous

Type: boolean
If creating a new topic, this flag defines whether anonymous posts to the topic will be permitted
Example: True
Default: True

Return value (see also Exceptions)

Type: hash

Attributes:

success

Type: boolean
true if the topic was successfully created, or false otherwise
Example: True

id

Type: string
ID of the newly created topic or message
Example: msg:123456

Example REST (XML) request

Request

POST /api/xml/peopleaggregator/newBoardMessage HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 178

authToken=as9d867f234o7asdf%3A928734982734987234%3A298374982734987234&content=This+is+the+main+body+of+the+new+topic&allowAnonymous=True&context=group%3A123&title=This+is+a+topic

Response

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

<response>
 <id>msg:123456</id>
 <success>true</success>
</response>

Example REST (JSON) request

Request

POST /api/json/peopleaggregator/newBoardMessage HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 178

authToken=as9d867f234o7asdf%3A928734982734987234%3A298374982734987234&content=This+is+the+main+body+of+the+new+topic&allowAnonymous=True&context=group%3A123&title=This+is+a+topic

Response

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

{"id": "msg:123456", "success": true}

Example XML-RPC call

Request

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

<?xml version='1.0'?>
 <methodCall>
  <methodName>peopleaggregator.newBoardMessage</methodName>
  <params>
   <param>
    <value><struct>
     <member>
      <name>authToken</name>
      <value><string>as9d867f234o7asdf:928734982734987234:298374982734987234</string></value>
     </member>
     <member>
      <name>content</name>
      <value><string>This is the main body of the new topic</string></value>
     </member>
     <member>
      <name>allowAnonymous</name>
      <value><boolean>1</boolean></value>
     </member>
     <member>
      <name>context</name>
      <value><string>group:123</string></value>
     </member>
     <member>
      <name>title</name>
      <value><string>This is a topic</string></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodCall>
 

Response

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

<?xml version='1.0'?>
 <methodResponse>
  <params>
   <param>
    <value><struct>
     <member>
      <name>id</name>
      <value><string>msg:123456</string></value>
     </member>
     <member>
      <name>success</name>
      <value><boolean>1</boolean></value>
     </member>
    </struct></value>
   </param>
  </params>
 </methodResponse>