KGAPI2::AccountInfo

Search for usage in LXR

#include <accountinfo.h>

Inheritance diagram for KGAPI2::AccountInfo:

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.

Author
Daniel Vrátil dvrat.nosp@m.il@r.nosp@m.edhat.nosp@m..com
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()

AccountInfo::~AccountInfo ( )
override

destructor

Definition at line 79 of file accountinfo.cpp.

Member Function Documentation

◆ birthday()

QString AccountInfo::birthday ( ) const
nodiscard

Returns user's birthday.

Definition at line 159 of file accountinfo.cpp.

◆ email()

QString AccountInfo::email ( ) const
nodiscard

Returns account email address.

Note that address does not have to be @gmail.com.

Definition at line 119 of file accountinfo.cpp.

◆ familyName()

QString AccountInfo::familyName ( ) const
nodiscard

Returns user's surname.

Definition at line 149 of file accountinfo.cpp.

◆ fromJSON()

AccountInfoPtr AccountInfo::fromJSON ( const QByteArray & jsonData)
static

Parses raw JSON data into AccountInfo object.

Parameters
jsonDataJSON data to parse

Definition at line 224 of file accountinfo.cpp.

◆ gender()

QString AccountInfo::gender ( ) const
nodiscard

Returns user's gender.

Definition at line 169 of file accountinfo.cpp.

◆ givenName()

QString AccountInfo::givenName ( ) const
nodiscard

Returns user's given name.

Definition at line 139 of file accountinfo.cpp.

◆ id()

QString AccountInfo::id ( ) const
nodiscard

Returns account ID.

Definition at line 109 of file accountinfo.cpp.

◆ link()

QString AccountInfo::link ( ) const
nodiscard

Returns link to user's profile.

Definition at line 179 of file accountinfo.cpp.

◆ locale()

QString AccountInfo::locale ( ) const
nodiscard

Returns user's preferred locales.

Definition at line 189 of file accountinfo.cpp.

◆ name()

QString AccountInfo::name ( ) const
nodiscard

Returns user's real full name.

Definition at line 129 of file accountinfo.cpp.

◆ operator!=()

bool KGAPI2::AccountInfo::operator!= ( const AccountInfo & other) const
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()

QString AccountInfo::photoUrl ( ) const
nodiscard

Returns URL of user's photo.

Definition at line 219 of file accountinfo.cpp.

◆ setBirthday()

void AccountInfo::setBirthday ( const QString & birthday)

Sets user's birthday.

Parameters
birthday

Definition at line 154 of file accountinfo.cpp.

◆ setEmail()

void AccountInfo::setEmail ( const QString & email)

Sets account email.

Parameters
email

Definition at line 114 of file accountinfo.cpp.

◆ 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)

Sets user's gender.

Parameters
gender

Definition at line 164 of file accountinfo.cpp.

◆ setGivenName()

void AccountInfo::setGivenName ( const QString & givenName)

Sets user's given name.

Parameters
givenName

Definition at line 134 of file accountinfo.cpp.

◆ setId()

void AccountInfo::setId ( const QString & id)

Sets an account ID.

Parameters
id

Definition at line 104 of file accountinfo.cpp.

◆ setLink()

void AccountInfo::setLink ( const QString & link)

Sets link to user's profile.

Parameters
link

Definition at line 174 of file accountinfo.cpp.

◆ setLocale()

void AccountInfo::setLocale ( const QString & locale)

Sets users locale settings.

Parameters
locale

Definition at line 184 of file accountinfo.cpp.

◆ setName()

void AccountInfo::setName ( const QString & name)

Sets user's real full name.

Parameters
name

Definition at line 124 of file accountinfo.cpp.

◆ setPhotoUrl()

void AccountInfo::setPhotoUrl ( const QString & url)

Sets URL of user's photo.

Parameters
url

Definition at line 214 of file accountinfo.cpp.

◆ setTimezone()

void AccountInfo::setTimezone ( const QString & timezone)

Sets user's timezone name.

Parameters
timezone

Definition at line 194 of file accountinfo.cpp.

◆ setVerifiedEmail()

void AccountInfo::setVerifiedEmail ( bool verified)

Sets whether the email address is verified.

Parameters
verified

Definition at line 204 of file accountinfo.cpp.

◆ timezone()

QString AccountInfo::timezone ( ) const
nodiscard

Returns name of user's timezone.

Definition at line 199 of file accountinfo.cpp.

◆ verifiedEmail()

bool AccountInfo::verifiedEmail ( ) const
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:
This file is part of the KDE documentation.
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.