API Methods: groups.getPosts

Description

Returns a list of posts within a group or groups


Authentication

This method requires authentication without user credentials.

API Version

Version 1&2

Required parameters

  • group_id :
    a comma-separated list of group ids. The list of group ids is available from the groups.getList call.

Optional parameters

  • user_id :
    the id number of the user to whom the post belongs. The list of user ids is available from the users.getList call.
  • thread_id :
    the id number of the thread to which this post belongs
  • post_id :
    the id number of the post
  • subject :
    the subject of the post
  • body :
    the body of the post
  • date_posted :
    the date on which the post was made formatted to RFC 822 standards

Example response

<?xml version="1.0"?>
<response status="ok" time="Wed, 30 Apr 2008 15:57:02 -0500">
    <group_posts count="3" total="3">
        <group_post>
            <post_id>5</post_id>
            <group_id>6</group_id>
            <thread_id>1</thread_id>
            <user_id>6</user_id>
            <subject>
                <![CDATA[test message]]>
            </subject>
            <body>
                <![CDATA[test message in closed group.<br>]]>
            </body>
            <date_posted>
                <![CDATA[Wed, 30 Apr 2008 20:01:29 -0500]]>
            </date_posted>
        </group_post>
        <group_post>
            <post_id>6</post_id>
            <group_id>6</group_id>
            <thread_id>6</thread_id>
            <user_id>30</user_id>
            <subject>
                <![CDATA[test api post edit]]>
            </subject>
            <body>
                <![CDATA[This is a test post from the API]]>
            </body>
            <date_posted>
                <![CDATA[Wed, 30 Apr 2008 15:25:36 -0500]]>
            </date_posted>
        </group_post>
        <group_post>
            <post_id>9</post_id>
            <group_id>6</group_id>
            <thread_id>9</thread_id>
            <user_id>30</user_id>
            <subject>
                <![CDATA[test api post 4]]>
            </subject>
            <body>
                <![CDATA[This is a test post from the API]]>
            </body>
            <date_posted>
                <![CDATA[Wed, 30 Apr 2008 15:35:19 -0500]]>
            </date_posted>
        </group_post>
    </group_posts>
</response>