function blogapi_metaweblog_get_recent_posts in Blog API 8
Same name and namespace in other branches
- 7.2 modules/blogapi_metaweblog/blogapi_metaweblog.module \blogapi_metaweblog_get_recent_posts()
- 7 blogapi.module \blogapi_metaweblog_get_recent_posts()
Callback for metaWeblog.getRecentPosts.
Parameters
$ct: Content type machine name.
$username: Drupal username.
$pass: Drupal password.
int $number_of_posts: The number of recent posts to return.
Return value
array|object BlogAPI response.
1 string reference to 'blogapi_metaweblog_get_recent_posts'
- MetaweblogProvider::getMethods in modules/
blogapi_metaweblog/ src/ Plugin/ BlogapiProvider/ MetaweblogProvider.php - Returns implemented methods.
File
- modules/
blogapi_metaweblog/ blogapi_metaweblog.module, line 39 - Module file for blogapi_blogger.
Code
function blogapi_metaweblog_get_recent_posts($ct, $username, $pass, $number_of_posts = 10) {
$communicator = \Drupal::service('service.communicator.blogapi');
return $communicator
->getRecentPosts($ct, $username, $pass, $number_of_posts, TRUE);
}