Kgapi

peopleservice.h
1/*
2 SPDX-FileCopyrightText: 2022 Claudio Cambra <claudio.cambra@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "types.h"
10#include "kgapipeople_export.h"
11
12#include <QUrl>
13
14namespace KGAPI2::People
15{
16
17/**
18 * @brief Additional methods for implementing support for Google People service
19 *
20 * You should never need to use these methods, unless implementing your own Job
21 */
22
23namespace PeopleService
24{
25
26[[nodiscard]] KGAPIPEOPLE_EXPORT QString allPersonFields();
27[[nodiscard]] KGAPIPEOPLE_EXPORT QString allUpdatablePersonFields();
28[[nodiscard]] KGAPIPEOPLE_EXPORT QString allContactGroupRecentlyCreatedAvailableFields();
29
30[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl fetchAllContactsUrl(const QString &syncToken = {});
31[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl fetchContactUrl(const QString &resourceName);
32[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl createContactUrl();
33[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl updateContactUrl(const QString &resourceName, const QString &personFields);
34[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl deleteContactUrl(const QString &resourceName);
35[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl updateContactPhotoUrl(const QString &resourceName);
36[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl deleteContactPhotoUrl(const QString &resourceName, const QString &personFields);
37
38[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl fetchAllContactGroupsUrl();
39[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl fetchContactGroupUrl(const QString &resourceName);
40[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl createContactGroupUrl();
41[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl updateContactGroupUrl(const QString &resourceName);
42[[nodiscard]] KGAPIPEOPLE_EXPORT QUrl deleteContactGroupUrl(const QString &resourceName, const bool deleteContacts);
43
44[[nodiscard]] KGAPIPEOPLE_EXPORT ObjectsList parseConnectionsJSONFeed(FeedData &feedData, const QByteArray &jsonFeed, const QString &syncToken = {});
45[[nodiscard]] KGAPIPEOPLE_EXPORT ObjectsList parseContactGroupsJSONFeed(FeedData &feedData, const QByteArray &jsonFeed);
46}
47
48namespace PeopleUtils
49{
50 void addValueToJsonObjectIfValid(QJsonObject &object, const QByteArray &key, const int value);
51 void addValueToJsonObjectIfValid(QJsonObject &object, const QByteArray &key, const bool value);
52 void addValueToJsonObjectIfValid(QJsonObject &object, const QByteArray &key, const QString &value);
53 void addValueToJsonObjectIfValid(QJsonObject &object, const QByteArray &key, const QJsonValue &value);
54}
55
56}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:12 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.