KGAPI2::AccountInfo
#include <accountinfo.h>
Public Member Functions | |
AccountInfo () | |
AccountInfo (const AccountInfo &other) | |
~AccountInfo () override | |
QString | birthday () const |
QString | email () const |
QString | familyName () const |
QString | gender () const |
QString | givenName () const |
QString | id () const |
QString | link () const |
QString | locale () const |
QString | name () const |
bool | operator!= (const AccountInfo &other) const |
bool | operator== (const AccountInfo &other) const |
QString | photoUrl () const |
void | setBirthday (const QString &birthday) |
void | setEmail (const QString &email) |
void | setFamilyName (const QString &familyName) |
void | setGender (const QString &gender) |
void | setGivenName (const QString &givenName) |
void | setId (const QString &id) |
void | setLink (const QString &link) |
void | setLocale (const QString &locale) |
void | setName (const QString &name) |
void | setPhotoUrl (const QString &url) |
void | setTimezone (const QString &timezone) |
void | setVerifiedEmail (bool verified) |
QString | timezone () const |
bool | verifiedEmail () const |
Public Member Functions inherited from KGAPI2::Object | |
Object () | |
Object (const Object &other) | |
virtual | ~Object () |
QString | etag () const |
bool | operator== (const Object &other) const |
void | setEtag (const QString &etag) |
Static Public Member Functions | |
static AccountInfoPtr | fromJSON (const QByteArray &jsonData) |
Detailed Description
AccountInfo contains information about user's Google account.
It is possible to obtain only information about account to which we have access token.
Some information might be empty, but id and email are guaranteed to be always filled.
The accountInfo service provides read-only access.
- Since
- 0.2
Definition at line 31 of file accountinfo.h.
Constructor & Destructor Documentation
◆ AccountInfo() [1/2]
AccountInfo::AccountInfo | ( | ) |
Constructor.
Definition at line 67 of file accountinfo.cpp.
◆ AccountInfo() [2/2]
AccountInfo::AccountInfo | ( | const AccountInfo & | other | ) |
Copy constructor.
Definition at line 73 of file accountinfo.cpp.
◆ ~AccountInfo()
|
override |
destructor
Definition at line 79 of file accountinfo.cpp.
Member Function Documentation
◆ birthday()
|
nodiscard |
Returns user's birthday.
Definition at line 159 of file accountinfo.cpp.
◆ email()
|
nodiscard |
Returns account email address.
Note that address does not have to be @gmail.com.
Definition at line 119 of file accountinfo.cpp.
◆ familyName()
|
nodiscard |
Returns user's surname.
Definition at line 149 of file accountinfo.cpp.
◆ fromJSON()
|
static |
Parses raw JSON data into AccountInfo object.
- Parameters
-
jsonData JSON data to parse
Definition at line 224 of file accountinfo.cpp.
◆ gender()
|
nodiscard |
Returns user's gender.
Definition at line 169 of file accountinfo.cpp.
◆ givenName()
|
nodiscard |
Returns user's given name.
Definition at line 139 of file accountinfo.cpp.
◆ id()
|
nodiscard |
Returns account ID.
Definition at line 109 of file accountinfo.cpp.
◆ link()
|
nodiscard |
Returns link to user's profile.
Definition at line 179 of file accountinfo.cpp.
◆ locale()
|
nodiscard |
Returns user's preferred locales.
Definition at line 189 of file accountinfo.cpp.
◆ name()
|
nodiscard |
Returns user's real full name.
Definition at line 129 of file accountinfo.cpp.
◆ operator!=()
|
inline |
Definition at line 50 of file accountinfo.h.
◆ operator==()
bool AccountInfo::operator== | ( | const AccountInfo & | other | ) | const |
Definition at line 84 of file accountinfo.cpp.
◆ photoUrl()
|
nodiscard |
Returns URL of user's photo.
Definition at line 219 of file accountinfo.cpp.
◆ setBirthday()
void AccountInfo::setBirthday | ( | const QString & | birthday | ) |
◆ setEmail()
void AccountInfo::setEmail | ( | const QString & | ) |
◆ setFamilyName()
void AccountInfo::setFamilyName | ( | const QString & | familyName | ) |
Sets user's family name (surname).
- Parameters
-
familyName
Definition at line 144 of file accountinfo.cpp.
◆ setGender()
void AccountInfo::setGender | ( | const QString & | gender | ) |
◆ setGivenName()
void AccountInfo::setGivenName | ( | const QString & | givenName | ) |
◆ setId()
void AccountInfo::setId | ( | const QString & | id | ) |
◆ setLink()
void AccountInfo::setLink | ( | const QString & | link | ) |
◆ setLocale()
void AccountInfo::setLocale | ( | const QString & | locale | ) |
◆ setName()
void AccountInfo::setName | ( | const QString & | name | ) |
◆ setPhotoUrl()
void AccountInfo::setPhotoUrl | ( | const QString & | url | ) |
◆ setTimezone()
void AccountInfo::setTimezone | ( | const QString & | timezone | ) |
◆ setVerifiedEmail()
void AccountInfo::setVerifiedEmail | ( | bool | verified | ) |
Sets whether the email address is verified.
- Parameters
-
verified
Definition at line 204 of file accountinfo.cpp.
◆ timezone()
|
nodiscard |
Returns name of user's timezone.
Definition at line 199 of file accountinfo.cpp.
◆ verifiedEmail()
|
nodiscard |
Returns whether the email is verified.
Definition at line 209 of file accountinfo.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.