File indexing completed on 2024-05-12 05:22:10

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 
0007 #pragma once
0008 
0009 #include "kgapiblogger_export.h"
0010 #include "object.h"
0011 
0012 #include <QDateTime>
0013 
0014 namespace KGAPI2
0015 {
0016 namespace Blogger
0017 {
0018 
0019 class KGAPIBLOGGER_EXPORT Comment : public KGAPI2::Object
0020 {
0021 public:
0022     explicit Comment();
0023     ~Comment() override;
0024 
0025     QString id() const;
0026     void setId(const QString &id);
0027 
0028     QString postId() const;
0029     void setPostId(const QString &postId);
0030 
0031     QString blogId() const;
0032     void setBlogId(const QString &blogId);
0033 
0034     QDateTime published() const;
0035     void setPublished(const QDateTime &published);
0036 
0037     QDateTime updated() const;
0038     void setUpdated(const QDateTime &updated);
0039 
0040     QString content() const;
0041     void setContent(const QString &content);
0042 
0043     QString authorId() const;
0044     void setAuthorId(const QString &authorId);
0045 
0046     QString authorName() const;
0047     void setAuthorName(const QString &authorName);
0048 
0049     QUrl authorUrl() const;
0050     void setAuthorUrl(const QUrl &url);
0051 
0052     QUrl authorImageUrl() const;
0053     void setAuthorImageUrl(const QUrl &authorImageUrl);
0054 
0055     QString inReplyTo() const;
0056     void setInReplyTo(const QString &inReplyTo);
0057 
0058     QString status() const;
0059     void setStatus(const QString &status);
0060 
0061     static CommentPtr fromJSON(const QByteArray &rawData);
0062     static ObjectsList fromJSONFeed(const QByteArray &rawData, FeedData &feedData);
0063 
0064 private:
0065     Q_DISABLE_COPY(Comment)
0066 
0067     class Private;
0068     Private *const d;
0069     friend class Private;
0070 };
0071 }
0072 }