summaryrefslogtreecommitdiffstats
path: root/include/api.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/api.hpp')
-rw-r--r--include/api.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/api.hpp b/include/api.hpp
index 00a6dc3..e508fa1 100644
--- a/include/api.hpp
+++ b/include/api.hpp
@@ -302,7 +302,7 @@ public:
*
* @since 0.1.0
*/
- explicit API();
+ explicit API(const endpoint_type &endpoint);
/*!
* @brief Convert #endpoint_type to `std::string_view`.
@@ -310,14 +310,14 @@ public:
* @since 0.1.0
*/
[[nodiscard]]
- inline string_view endpoint_to_string_view(const endpoint_type &endpoint)
- const
+ inline string_view to_string_view() const
{
- return _endpoint_map.at(endpoint).data();
+ return _endpoint_map.at(_endpoint).data();
}
private:
- const map<endpoint_type,string_view> _endpoint_map;
+ const endpoint_type _endpoint;
+ static const map<endpoint_type,string_view> _endpoint_map;
};
} // namespace mastodonpp