about summary refs log tree commit diff stats
path: root/data/maps/the_owl/rooms/R2C1 Left.txtpb
blob: 72e73311ed5b5b80107842dc970665d7186e72ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
name: "R2C1 Left"
panels {
  name: "VERB"
  path: "Panels/Bottom Left/owl_8"
  clue: "verb"
  answer: "subject"
  symbols: SUN
}
panels {
  name: "FOIL"
  path: "Panels/Bottom Left/owl_9"
  clue: "foil"
  answer: "oil"
  symbols: SPARKLES
}
panels {
  name: "DUSKY"
  path: "Panels/Colors/owl_3"
  clue: "dusky"
  answer: "sky"
  symbols: SPARKLES
}
n class="w"> "util.h" #include "codes.h" #include "client.h" namespace twitter { tweet::tweet(const client& tclient, std::string data) try : _client(tclient) { auto json = nlohmann::json::parse(data); _id = json["id"].get<tweet_id>(); _text = json["text"].get<std::string>(); _author = make_unique<user>(_client, json["user"].dump()); if (!json["retweeted_status"].is_null()) { _is_retweet = true; _retweeted_status = make_unique<tweet>(_client, json["retweeted_status"].dump()); } if (!json["entities"].is_null()) { auto entities = json["entities"]; if (!entities["user_mentions"].is_null()) { for (auto mention : entities["user_mentions"]) { _mentions.push_back(std::make_pair(mention["id"].get<user_id>(), mention["screen_name"].get<std::string>())); } } } } catch (const std::invalid_argument& error) { std::throw_with_nested(malformed_object("tweet", data)); } catch (const std::domain_error& error) { std::throw_with_nested(malformed_object("tweet", data)); } std::string tweet::generateReplyPrefill() const { std::ostringstream output; output << "@" << _author->getScreenName() << " "; for (auto mention : _mentions) { if ((mention.first != _author->getID()) && (mention.first != _client.getUser().getID())) { output << "@" << mention.second << " "; } } return output.str(); } tweet tweet::reply(std::string message, std::list<long> media_ids) const { return _client.replyToTweet(message, _id, media_ids); } bool tweet::isMyTweet() const { return *_author == _client.getUser(); } std::string tweet::getURL() const { std::ostringstream urlstr; urlstr << "https://twitter.com"; urlstr << _author->getScreenName(); urlstr << "/statuses/"; urlstr << _id; return urlstr.str(); } };