public static function importCategory($categorySitemap, $limit = 10, $mostRecent = true)
 {
     $postUrls = Sitemap::getPostsFromCategory($categorySitemap);
     $response = new stdClass();
     $response->posts = [];
     if ($limit !== -1) {
         $postUrls = array_slice($postUrls, 0, $limit);
     }
     foreach ($postUrls as $postUrl) {
         if ($post = Post::getPostFromUrl($postUrl)) {
             $postResponse = new stdClass();
             $postResponse->id = $post->ID;
             $postResponse->url = $postUrl;
             $response->posts[] = $postResponse;
         }
     }
     return $response;
 }
 /**
  * @Given /^the category sitemap "([^"]*)"$/
  */
 public function theCategorySitemap($categorySitemap)
 {
     self::$categoryPosts = Sitemap::getPostsFromCategory($categorySitemap);
 }