diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/api.hpp | 10 | ||||
-rw-r--r-- | include/connection.hpp | 1 |
2 files changed, 5 insertions, 6 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 diff --git a/include/connection.hpp b/include/connection.hpp index 1a6c11f..a26120c 100644 --- a/include/connection.hpp +++ b/include/connection.hpp @@ -74,7 +74,6 @@ public: private: Instance &_instance; const string_view _baseuri; - const API _api; }; } // namespace mastodonpp |