SyndicationDomination 0.0
An RSS/Atom parser, because there's nothing else out there.
|
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. | |
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.
|
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.
item_node | a pugi::xml_node object representing a feed item |
website_url | the base url of the website that the feed belongs to |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::string FeedItem::to_json | ( | ) |
Represents the FeedItem object (itself) as a json, returned as a string.