32 std::string description;
34 std::string last_update;
38 std::vector<FeedItem> feed_items{};
50 xml_node get_feed_node();
56 void fix_url(std::string &s);
61 std::string extract_url();
63 static inline const std::vector<ExtractionParam> __LAST_UPDATE_PARAMS{
73 std::string extract_last_update();
75 static inline const std::vector<ExtractionParam> __IMG_URL_PARAMS{
86 std::string extract_img_url();
92 std::string extract_rss_url();
94 static inline const std::vector<ExtractionParam> __DESCRIPTION_PARAMS{
102 void extract_feed_data();
108 void extract_feed_items();
125 Feed(std::string path) : path{path} {
136 std::vector<FeedItem>
get_items() {
return feed_items; }
141 std::string
to_json(
bool no_items=
false);
Represents an RSS/Atom feed.
Definition feed.hpp:22
std::string get_last_update()
Definition feed.hpp:132
std::string get_url()
Definition feed.hpp:131
Feed(std::string path)
Constructs the Feed object from a valid RSS/Atom file path.
Definition feed.hpp:125
std::vector< FeedItem > get_items()
Definition feed.hpp:136
std::string get_img_url()
Definition feed.hpp:133
std::string to_json(bool no_items=false)
Represents the Feed object (itself) as a json, returned as a string.
Definition feed.cpp:146
std::string get_title()
Definition feed.hpp:129
std::string get_rss_url()
Definition feed.hpp:134
std::string get_description()
Definition feed.hpp:130
FeedType
Definition feed_type.hpp:3
@ INVALID
Definition feed_type.hpp:4