summaryrefslogtreecommitdiffstats
path: root/include/cepis/client.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cepis/client.hpp')
-rw-r--r--include/cepis/client.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/cepis/client.hpp b/include/cepis/client.hpp
index 205ba85..3a0d863 100644
--- a/include/cepis/client.hpp
+++ b/include/cepis/client.hpp
@@ -15,7 +15,7 @@
namespace cepis {
/// The library version, as it appears in the default `User-Agent`.
-inline constexpr std::string_view kVersion = "0.1.0";
+inline constexpr std::string_view kVersion = "0.2.0";
/// Where the public API lives.
inline constexpr std::string_view kDefaultBaseUrl = "https://cep.is";
@@ -33,7 +33,7 @@ inline constexpr std::size_t kMaxBatch = 500;
/// trip for the server to say so wastes both sides' time.
std::string normalize_cep(std::string_view value);
-/// The default `User-Agent`, e.g. `cepis-cpp/0.1.0 (+https://cep.is)`.
+/// The default `User-Agent`, e.g. `cepis-cpp/0.2.0 (+https://cep.is)`.
std::string default_user_agent();
/// How a `Client` behaves. Every field has a working default; in practice only
@@ -108,6 +108,9 @@ class Client {
/// 5xx after every attempt; `NetworkError` when the request never
/// completed; `InvalidResponse` when a success status carries a body that
/// is not a JSON object.
+ ///
+ /// A `CepNotFound` often carries `faixa()`, the municipality the CEP would
+ /// have belonged to. It is context for the error, not an address.
[[nodiscard]] Address lookup(std::string_view cep) const;
/// Looks up many CEPs in one batch.