1
/* ============================================================
3
* This file is a part of kipi-plugins project
4
* http://www.kipi-plugins.org
7
* Description : a tool to export images to imgur.com
9
* Copyright (C) 2010-2012 by Marius Orcsik <marius at habarnam dot ro>
11
* This program is free software; you can redistribute it
12
* and/or modify it under the terms of the GNU General
13
* Public License as published by the Free Software Foundation;
14
* either version 2, or (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* ============================================================ */
23
#ifndef IMGURTALKER_COMMON_H
24
#define IMGURTALKER_COMMON_H
27
#define _IMGUR_API_ANONYMOUS_KEY "2da1cc4923f33dc72885aa32adede5c3";
30
#define _IMGUR_API_CONSUMER_KEY "9ad9d48124b7137d9cc9e0397219f52004fcba12a";
31
#define _IMGUR_API_CONSUMER_SECRET "26b83f19f6d045006d769869b9c623e0";
32
#endif //OAUTH_ENABLED
43
namespace KIPIImgurExportPlugin
49
static QString APIuploadURL() {return QString ("https://api.imgur.com/2/upload.json");}
50
static QString APIdeleteURL() {return QString ("https://api.imgur.com/2/delete.json");}
51
static QString OAuthTokenEndPoint() {return QString ("https://api.imgur.com/oauth/request_token");}
52
static QString OAuthAccessEndPoint() {return QString ("https://api.imgur.com/oauth/access_token");}
53
static QString OAuthAuthorizationEndPoint() {return QString ("https://api.imgur.com/oauth/authorize");}
55
static KUrl originalURL(QString imageHash) { return KUrl ("http://i.imgur.com/" + imageHash + ".jpg"); } // this is wrong
56
static KUrl pageURL(QString imageHash) { return KUrl ("http://imgur.com/" + imageHash);}
57
static KUrl deleteURL(QString deleteHash) { return KUrl ("http://imgur.com/delete/" + deleteHash);}
60
QString ImgurConnection::uploadURL = QString ("https://api.imgur.com/2/upload.json");
61
QString ImgurConnection::deleteURL = QString ("https://api.imgur.com/2/delete.json");
62
QString ImgurConnection::OAuthTokenEndPoint = QString ("https://api.imgur.com/oauth/request_token");
63
QString ImgurConnection::OAuthAccessEndPoint = QString ("https://api.imgur.com/oauth/access_token");
64
QString ImgurConnection::OAuthAuthorizationEndPoint = QString ("https://api.imgur.com/oauth/authorize");
87
// -----------------------------------------------------------------------------
89
struct ImgurUploadData
96
// -----------------------------------------------------------------------------
108
QString type; // maybe enum
114
qulonglong bandwidth;
123
KUrl large_thumbnail;
127
} // namespace KIPIImgurExportPlugin
129
#endif // IMGURTALKER_COMMON_H