diff options
Diffstat (limited to 'src/apiuseraccount.cpp')
| -rw-r--r-- | src/apiuseraccount.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/apiuseraccount.cpp b/src/apiuseraccount.cpp index 4b908df0..e9785b40 100644 --- a/src/apiuseraccount.cpp +++ b/src/apiuseraccount.cpp @@ -19,12 +19,17 @@ APIUserAccount::APIUserAccount() : m_type(APIUserAccountTypes::None) {} bool APIUserAccount::isValid() const { - return !m_key.isEmpty(); + return !m_accessToken.isEmpty() || !m_apiKey.isEmpty(); +} + +const QString& APIUserAccount::accessToken() const +{ + return m_accessToken; } const QString& APIUserAccount::apiKey() const { - return m_key; + return m_apiKey; } const QString& APIUserAccount::id() const @@ -47,9 +52,15 @@ const APILimits& APIUserAccount::limits() const return m_limits; } -APIUserAccount& APIUserAccount::apiKey(const QString& key) +APIUserAccount& APIUserAccount::accessToken(const QString& token) +{ + m_accessToken = token; + return *this; +} + +APIUserAccount& APIUserAccount::apiKey(const QString& apiKey) { - m_key = key; + m_apiKey = apiKey; return *this; } |
