API Methods: forums.getPosts



Description

Returns a list of posts within a forum


Authentication

This method requires authentication without user credentials.

Required parameters

  • forum_id :
    the id number of the forum to which the posts belong. The list of forum ids is available from the forums.getList

Optional parameters

  • user_id :
    the id number of the user to whom this post belongs. The list of user ids is available from the users.getList
  • thread_id :
    the id number of the topic thread
  • post_id :
    the id number of the post
  • subject :
    the subject of the post
  • body :
    the body of the post
  • date_posted :
    the date and time of the post
  • rating :
    the average rating of the post

Example response

<?xml version="1.0"?>
<response status="ok" time="Mon, 21 Apr 2008 15:14:42 -0500">
    <forum_posts count="2" total="7">
        <forum_post>
            <thread_id>1</thread_id>
            <user_id>1</user_id>

            <subject>
                <![CDATA[yoyoyo]]>
            </subject>
            <body>
                <![CDATA[chekc check cehck <br />]]>

            </body>
            <date_posted>
                <![CDATA[2008-01-11 11:15:43]]>
            </date_posted>
            <post_id>4</post_id>

            <forum_id>5</forum_id>
            <rating>-1</rating>
        </forum_post>
        <forum_post>
            <thread_id>1</thread_id>

            <user_id>1</user_id>
            <subject>
                <![CDATA[RE: yoyoyo]]>
            </subject>
            <body>

                <![CDATA[yoyoo<br />]]>
            </body>
            <date_posted>
                <![CDATA[2008-01-11 11:17:38]]>
            </date_posted>

            <post_id>5</post_id>
            <forum_id>5</forum_id>
            <rating>0</rating>
        </forum_post>

    </forum_posts>
</response>