Kgapi

post.h
1/*
2 * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
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 "kgapiblogger_export.h"
10#include "object.h"
11
12#include <QStringList>
13#include <QVariant>
14
15#include <QDateTime>
16
17namespace KGAPI2
18{
19namespace Blogger
20{
21
22class KGAPIBLOGGER_EXPORT Post : public KGAPI2::Object
23{
24public:
25 Post();
26 ~Post() override;
27
28 QString id();
29 void setId(const QString &id);
30
31 QString blogId();
32 void setBlogId(const QString &id);
33
34 QDateTime published() const;
35 void setPublished(const QDateTime &published);
36
37 QDateTime updated() const;
38 void setUpdated(const QDateTime &updated);
39
40 QUrl url() const;
41 void setUrl(const QUrl &url);
42
43 QString title() const;
44 void setTitle(const QString &title);
45
46 QString content() const;
47 void setContent(const QString &content);
48
49 QString authorId() const;
50 QString authorName() const;
51 QUrl authorUrl() const;
52 QUrl authorImageUrl() const;
53
54 uint commentsCount() const;
55
56 QStringList labels() const;
57 void setLabels(const QStringList &labels);
58
59 QVariant customMetaData() const;
60 void setCustomMetaData(const QVariant &metadata);
61
62 QString location() const;
63 void setLocation(const QString &location);
64
65 double latitude() const;
66 void setLatitude(double lat);
67
68 double longitude() const;
69 void setLongitute(double lng);
70
71 QList<QUrl> images() const;
72 void setImages(const QList<QUrl> &images);
73
74 QString status() const;
75
76 static PostPtr fromJSON(const QByteArray &json);
77 static ObjectsList fromJSONFeed(const QByteArray &json, FeedData &feedData);
78 static QByteArray toJSON(const PostPtr &post);
79
80private:
81 Q_DISABLE_COPY(Post)
82
83 class Private;
84 Private *const d;
85 friend class Private;
86};
87
88} // namespace Blogger
89} // namespace KGAPI2
Base class for all objects.
Definition object.h:31
Q_SCRIPTABLE CaptureState status()
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
QVariant location(const QVariant &res)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:11:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.