summaryrefslogtreecommitdiffstats
path: root/examples/oauth/twittertimeline/twitter.h
blob: 9fbd7d06c9a3c8460c130bdb1c7ecb7d2596aba0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

#ifndef TWITTERTIMELINE_TWITTER_H
#define TWITTERTIMELINE_TWITTER_H

#include <QtCore>
#include <QtNetwork>
#include <QtNetworkAuth>

class Twitter : public QOAuth1
{
    Q_OBJECT

public:
    Twitter(QObject *parent = nullptr);
    Twitter(const QPair<QString, QString> &clientCredentials, QObject *parent = nullptr);
    Twitter(const QString &screenName,
            const QPair<QString, QString> &clientCredentials,
            QObject *parent = nullptr);

signals:
    void authenticated();

private:
    Q_DISABLE_COPY(Twitter)

    QOAuthHttpServerReplyHandler *replyHandler = nullptr;
};

#endif // TWITTERTIMELINE_TWITTER_H