From c3cc76301d64320791f7097709ffcd36d7206266 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 12 Jun 2016 10:26:36 -0400 Subject: Added method to Tweet to get URL --- src/tweet.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/tweet.cpp') 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 { return _mentions; } + std::string tweet::getURL() const + { + return "https://twitter.com/" + _author.getScreenName() + "/statuses/" + std::to_string(_id); + } + tweet::operator bool() const { return _valid; -- cgit 1.4.1