diff options
| -rw-r--r-- | src/tweet.cpp | 5 | ||||
| -rw-r--r-- | src/tweet.h | 1 |
2 files changed, 6 insertions, 0 deletions
| diff --git a/src/tweet.cpp b/src/tweet.cpp index 2927018..193df6e 100644 --- a/src/tweet.cpp +++ b/src/tweet.cpp | |||
| @@ -126,6 +126,11 @@ namespace twitter { | |||
| 126 | return _mentions; | 126 | return _mentions; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | std::string tweet::getURL() const | ||
| 130 | { | ||
| 131 | return "https://twitter.com/" + _author.getScreenName() + "/statuses/" + std::to_string(_id); | ||
| 132 | } | ||
| 133 | |||
| 129 | tweet::operator bool() const | 134 | tweet::operator bool() const |
| 130 | { | 135 | { |
| 131 | return _valid; | 136 | return _valid; |
| diff --git a/src/tweet.h b/src/tweet.h index 387f73a..74d73d2 100644 --- a/src/tweet.h +++ b/src/tweet.h | |||
| @@ -27,6 +27,7 @@ namespace twitter { | |||
| 27 | bool isRetweet() const; | 27 | bool isRetweet() const; |
| 28 | tweet getRetweet() const; | 28 | tweet getRetweet() const; |
| 29 | std::vector<std::pair<user_id, std::string>> getMentions() const; | 29 | std::vector<std::pair<user_id, std::string>> getMentions() const; |
| 30 | std::string getURL() const; | ||
| 30 | 31 | ||
| 31 | operator bool() const; | 32 | operator bool() const; |
| 32 | 33 | ||
