getLastPosts

Description

Fetches and returns information about a particular number of most recent posts (that you can see).

Syntax

array getLastPosts (array $latestPostOptions)



Parameter $latestPostOptions

Expected type: Array
Description:

Array Elements of $latestPostOptions
Key Optional Expected type Description
number_posts no Integer The number of posts to fetch



Return value

Expected type: Array
Description: Returns an array of arrays with info about the latest posts. Each array contains the following keys

Array Elements
Key Optional Expected type Description
board no Array An array of info about the board this post is in. Keys are: id (board ID), name, href (url to board) and link (HTML link to this board)
href no String URL to the post
link no String HTML link to the post
poster no Array An array of info about the poster. Keys are: id (member ID), name, link (url to profile [if they aren't a guest]), href (HTML link to the profile)
preview no String The first 128 characters of the post with "..." appended, or the entire post if it's less than 128 characters long. Can be used to show a preview of the post.
raw_timestamp no Integer The raw timestamp corresponding to when the post was made
short_subject no String The first 24 characters of the subject with "..." appended, or the entire subject if it's less than 26 characters long
subject no String The subject of this post
time no String The formatted string indicating when the post was made
topic no Integer The ID of the topic


Notes

  • Exactly like getLastPost except it gets multiple posts
Advertisement: