Change signature of Instance.
This commit is contained in:
parent
a6bd081280
commit
6663cca653
|
@ -50,7 +50,8 @@ public:
|
||||||
*
|
*
|
||||||
* @since 0.1.0
|
* @since 0.1.0
|
||||||
*/
|
*/
|
||||||
explicit Instance(string hostname, string access_token);
|
explicit Instance(const string_view &hostname,
|
||||||
|
const string_view &access_token);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the hostname.
|
* @brief Returns the hostname.
|
||||||
|
|
|
@ -18,18 +18,15 @@
|
||||||
#include "log.hpp"
|
#include "log.hpp"
|
||||||
#include "return_types.hpp"
|
#include "return_types.hpp"
|
||||||
|
|
||||||
#include <utility>
|
|
||||||
|
|
||||||
namespace mastodonpp
|
namespace mastodonpp
|
||||||
{
|
{
|
||||||
|
|
||||||
using std::stoull;
|
using std::stoull;
|
||||||
using std::move;
|
|
||||||
|
|
||||||
Instance::Instance(string hostname, string access_token)
|
Instance::Instance(const string_view &hostname, const string_view &access_token)
|
||||||
: _hostname{move(hostname)}
|
: _hostname{hostname}
|
||||||
, _baseuri{"https://" + _hostname}
|
, _baseuri{"https://" + _hostname}
|
||||||
, _access_token{move(access_token)}
|
, _access_token{access_token}
|
||||||
, _max_chars{500}
|
, _max_chars{500}
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
Loading…
Reference in New Issue
Block a user