Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
authorSergey Magidovich <mgsergio@mapswithme.com>2016-09-21 17:37:24 +0300
committerSergey Magidovich <mgsergio@mapswithme.com>2016-09-21 18:37:23 +0300
commit0fa97aa5f4f8a806807d393d2434db638fb10a7f (patch)
treecaee84fc18a5ce15dc4efb07f8d7aa5aef3008bf /map
parent384a3c7033f8c13fc8f4b52a7f1a4c43526811de (diff)
Add neutral review. And some more dummy comments.
Diffstat (limited to 'map')
-rw-r--r--map/booking_api.cpp84
-rw-r--r--map/booking_api.hpp42
2 files changed, 119 insertions, 7 deletions
diff --git a/map/booking_api.cpp b/map/booking_api.cpp
index 4985f7ab8d..1e3aef6e73 100644
--- a/map/booking_api.cpp
+++ b/map/booking_api.cpp
@@ -157,30 +157,102 @@ void BookingApi::GetHotelInfo(string const & hotelId, string const & /* lang */,
};
info.m_reviews = {
- {
+ HotelReview::CriticReview(
"Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
"Little bit noise from outside",
"Anonymous1",
"http://storage2.static.itmages.ru/i/16/0915/h_1473945375_5332083_b44af613bd.jpg",
9.2,
system_clock::now()
- },
- {
+ ),
+ HotelReview::CriticReview(
"Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
"Little bit noise from outside",
"Anonymous2",
"http://storage2.static.itmages.ru/i/16/0915/h_1473945375_7504873_be0fe246e3.jpg",
9.2,
system_clock::now()
- },
- {
+ ),
+ HotelReview::CriticReview(
"Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
"Little bit noise from outside",
"Anonymous2",
"http://storage1.static.itmages.ru/i/16/0915/h_1473945374_9397526_996bbca0d7.jpg",
9.2,
system_clock::now()
- }
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous1",
+ "http://storage2.static.itmages.ru/i/16/0915/h_1473945375_5332083_b44af613bd.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous2",
+ "http://storage2.static.itmages.ru/i/16/0915/h_1473945375_7504873_be0fe246e3.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous2",
+ "http://storage1.static.itmages.ru/i/16/0915/h_1473945374_9397526_996bbca0d7.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous1",
+ "http://storage2.static.itmages.ru/i/16/0915/h_1473945375_5332083_b44af613bd.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous2",
+ "http://storage2.static.itmages.ru/i/16/0915/h_1473945375_7504873_be0fe246e3.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous2",
+ "http://storage1.static.itmages.ru/i/16/0915/h_1473945374_9397526_996bbca0d7.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous1",
+ "http://storage2.static.itmages.ru/i/16/0915/h_1473945375_5332083_b44af613bd.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous2",
+ "http://storage2.static.itmages.ru/i/16/0915/h_1473945375_7504873_be0fe246e3.jpg",
+ 9.2,
+ system_clock::now()
+ ),
+ HotelReview::CriticReview(
+ "Interesting place among SoHo, Little Italy and China town. Modern design. Great view from roof. Near subway. Free refreshment every afternoon. The staff was very friendly.",
+ "Little bit noise from outside",
+ "Anonymous2",
+ "http://storage1.static.itmages.ru/i/16/0915/h_1473945374_9397526_996bbca0d7.jpg",
+ 9.2,
+ system_clock::now()
+ )
};
fn(info);
diff --git a/map/booking_api.hpp b/map/booking_api.hpp
index bec7c4f1ba..db9b9c41c4 100644
--- a/map/booking_api.hpp
+++ b/map/booking_api.hpp
@@ -29,12 +29,14 @@ public:
// But C++14 does.
HotelReview(string const & reviewPositive,
string const & reviewNegative,
+ string const & reviewNeutral,
string const & author,
string const & authorPictUrl,
float const rating,
time_point<system_clock> const date)
: m_reviewPositive(reviewPositive)
, m_reviewNegative(reviewNegative)
+ , m_reviewNeutral(reviewNeutral)
, m_author(author)
, m_authorPictUrl(authorPictUrl)
, m_rating(rating)
@@ -42,11 +44,49 @@ public:
{
}
+
+ static HotelReview CriticReview(string const & reviewPositive,
+ string const & reviewNegative,
+ string const & author,
+ string const & authorPictUrl,
+ float const rating,
+ time_point<system_clock> const date)
+ {
+ return {
+ reviewPositive,
+ reviewNegative,
+ "",
+ author,
+ authorPictUrl,
+ rating,
+ date
+ };
+ }
+
+ static HotelReview NeutralReview(string const & reviewNeutral,
+ string const & author,
+ string const & authorPictUrl,
+ float const rating,
+ time_point<system_clock> const date)
+ {
+ return {
+ "",
+ "",
+ reviewNeutral,
+ author,
+ authorPictUrl,
+ rating,
+ date
+ };
+ }
+
static auto constexpr kInvalidRating = numeric_limits<float>::max();
- /// Review text.
+ /// Review text. There can be either one or both positive/negative review or
+ /// a neutral one.
string m_reviewPositive;
string m_reviewNegative;
+ string m_reviewNeutral;
/// Review author name.
string m_author;
/// Url to a author's picture.