# get_unread_topic

# Function

Function Name Description Level
get_unread_topic Returns a list of unread topics ordered by date. 3,4

Input Parameters:

Name Type Required? Description Level
start_num Int For pagination. If start_num = 0 & last_num = 9, it returns first 10 posts from the topic, sorted by date (last-in-first-out). If both are not presented, return first 20 posts. if start_num = 0 and last_num = 0, return the first post only, and so on (e.g. 1,1; 2,2). If start_num smaller than last_num returns null. If last_num - start_num > 50, returns only first 50 posts starting from start_num 3
last_num Int 3
search_id String for caching and for pagination support
filters Array of Hash table A set of filtering rules to filter the search result. E.g. user can specify only to display topics under certain sub-forums, or can exclude topis from certain sub-forums. Format of the filters: "only_in" = { array of sub-forum ID }. "not_in" = {array of sub-forum ID}. 4

Output Parameters:

Name Type Required? Description Level
result Boolean yes return true if the action is executed successfully. 3
result_text byte[] 3
search_id String return the search id so the app can send the same id back to the server for pagination support
total_topic_num Int yes total number of unread topics 3
topics Array of Hash table yes an array contains a list of unread topics 3
forum_id String yes 3
forum_name byte[] yes 3
topic_id String yes 3
topic_title byte[] yes Remove all BBCode in title 3
prefix byte[] 4
post_author_name byte[] yes return display name if it has in API level 4 3,4
post_author_id Int yes 4
is_subscribed Boolean return true if this thread has been subscribed by this user. 3
can_subscribe Boolean returns false if the subscription feature is turned off 3
is_closed Boolean return true if this thread has been closed. 3
icon_url String Return the last reply author avatar URL 3
participated_uids Array of String Return a list of uids of the users who participated in this topic. It does not need to return all the uids of whoever participated, instead returns not more than 10, preferrably ordered by the "importance" - it can be determined by the number of posts the user contributed to this topic etc. Plugin should check HTTP Header "Mobiquoid". If it is ="11", return this key, otherwise do not return it. 4
timestamp String yes Timestamp of topic last reply
post_time Date yes dateTime.iso8601 format. If this topic has no reply, use the topic creation time. 3
reply_number Int yes total number of reply in this topic. If this is no reply in this return, return 0. 3
new_post Boolean yes return true if this topic contains new post since user last login 3
view_number Int yes total number of view in this topic 3
short_content byte[] Characters display rules (should follow this sequence): 1) Remove all BBCode except [ur], [img]. 2) Convert "[url http://...]http://…..[/url]" to "[url]". 3) Convert "[img]http://…..[/img]" to "[img]". 4) Remove "Last edited by..." tag at the end. 5) Remove all non-displayable characters (e.g. \n, \t, etc). 6) Remove all whitespace, /n and /r at the beginning and ending of the content. 7) return only first 200 characters 3