SyndicationDomination 0.0
An RSS/Atom parser, because there's nothing else out there.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FeedItem Class Reference

Represents a feed item or article. More...

#include <feed_item.hpp>

Public Member Functions

 FeedItem (xml_node item_node, std::string website_url)
 Constructs the FeedItem object from a pugi::xml_node representing a feed item.
 
std::string get_title ()
 
std::string get_content ()
 
std::string get_url ()
 
std::string get_media_url ()
 
std::string get_pub_date ()
 
std::string get_img_url ()
 
std::string get_author_name ()
 
std::string get_author_url ()
 
std::string to_json ()
 Represents the FeedItem object (itself) as a json, returned as a string.
 

Detailed Description

Represents a feed item or article.

Typically you won't need to manually initialzie FeedItem objects, you can instead create a Feed object and extract its FeedItems using Feed::get_items().

In case some value cannot be found, it will just contain an empty string.

Constructor & Destructor Documentation

◆ FeedItem()

FeedItem::FeedItem ( xml_node  item_node,
std::string  website_url 
)
inline

Constructs the FeedItem object from a pugi::xml_node representing a feed item.

The website base url should also be provided so that any eventual urls formed like "some/path" or "/some/absolute/path" can be appropriately completed.

Parameters
item_nodea pugi::xml_node object representing a feed item
website_urlthe base url of the website that the feed belongs to

Member Function Documentation

◆ get_author_name()

std::string FeedItem::get_author_name ( )
inline

◆ get_author_url()

std::string FeedItem::get_author_url ( )
inline

◆ get_content()

std::string FeedItem::get_content ( )
inline

◆ get_img_url()

std::string FeedItem::get_img_url ( )
inline

◆ get_media_url()

std::string FeedItem::get_media_url ( )
inline

◆ get_pub_date()

std::string FeedItem::get_pub_date ( )
inline

◆ get_title()

std::string FeedItem::get_title ( )
inline

◆ get_url()

std::string FeedItem::get_url ( )
inline

◆ to_json()

std::string FeedItem::to_json ( )

Represents the FeedItem object (itself) as a json, returned as a string.


The documentation for this class was generated from the following files: