diff --git a/cache.cpp b/cache.cpp index e363527..b196549 100644 --- a/cache.cpp +++ b/cache.cpp @@ -13,7 +13,7 @@ static float degtorad(float x) { void Cache::show() const { std::cout << "Cache:\t" << code << ' ' << name << " (type: " << type << ", owned by " << owner << ")\n"; - std::cout << '\t' << pos.lat << " " << pos.lon << "\t\tD/T: " << diff << '/' << terr << "\t\tFound on " << date() << '\n'; + std::cout << '\t' << pos.lat << " " << pos.lon << "\t\tD/T: " << diff << '/' << terr << "\t\tSize: " << size << "\t\tFound on " << date() << '\n'; } std::string Cache::link() const { diff --git a/geostat.cpp b/geostat.cpp index 7580011..a2cb035 100644 --- a/geostat.cpp +++ b/geostat.cpp @@ -307,6 +307,7 @@ int main(int argc, char** argv) { if ((show_types || show_html) && !get_not_found) { show_histogram(&cc, &Cache::type, "Cache types", show_html); + show_histogram(&cc, &Cache::size, "Cache sizes", show_html); if (!show_html) show_histogram(&cc, &Cache::origin, "Services", 0); show_histogram(&cc, &Cache::region, "Regions", show_html); } diff --git a/okapi.cpp b/okapi.cpp index 7d8a830..a706445 100644 --- a/okapi.cpp +++ b/okapi.cpp @@ -75,7 +75,7 @@ std::string Okapi::get_user_caches_json(std::string uuid, int count, int offset) std::string Okapi::get_caches_json(std::string codes) { std::string service = url + OKAPI_caches; - std::string query = "consumer_key=" + key + "&cache_codes=" + codes + "&fields=code|name|location|type|status|difficulty|terrain|owner|region"; + std::string query = "consumer_key=" + key + "&cache_codes=" + codes + "&fields=code|name|location|type|status|difficulty|terrain|owner|region|size2"; return curl_post(service, query); } @@ -125,6 +125,7 @@ Caches Okapi::get_caches(std::vector> codes) { c.code = el.value()["code"]; c.name = el.value()["name"]; c.type = el.value()["type"]; + c.size = el.value()["size2"]; c.region = el.value()["region"]; c.diff = el.value()["difficulty"]; c.terr = el.value()["terrain"];