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 2fb26d8..72ca3f7 100644
--- a/include/api.hpp
+++ b/include/api.hpp
@@ -18,13 +18,13 @@
#define MASTODONPP_API_HPP
#include <map>
-#include <string>
+#include <string_view>
#include <variant>
namespace mastodonpp
{
-using std::string;
+using std::string_view;
using std::variant;
/*!
@@ -76,15 +76,15 @@ public:
*
* @since 0.1.0
*/
- explicit API(endpoint_type &endpoint);
+ explicit API(const endpoint_type &endpoint);
/*!
- * @brief Convert #endpoint_type to string.
+ * @brief Convert #endpoint_type to `std::string_view`.
*
* @since 0.1.0
*/
[[nodiscard]]
- string to_string() const;
+ string_view to_string_view() const;
private:
const endpoint_type _endpoint;