Filtering PrivateMsg types by "sent" or "inbox"
From the page that you linked to:

// Replace 'inbox' with 'sent' to display sent messages or 'list' to display all messages.
$query = _privatemsg_assemble_query('list', $user, 'inbox');


Note that the privatemsg_filter module needs to be enabled for that to work.