diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2016-02-22 21:12:25 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2016-02-22 21:12:25 +0000 |
commit | 0b82b879821c7e73b86f189be747c5634c8b46b7 (patch) | |
tree | 28c7e3b06c25a7b9fbd49a33972e7fae07dd2e56 /plugins/Dropbox/src/api/account.h | |
parent | 477664ed5c4b018562e9419428175ae938cf2761 (diff) |
Dropbox:
- updated api to v2
- version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@16326 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/api/account.h')
-rw-r--r-- | plugins/Dropbox/src/api/account.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/plugins/Dropbox/src/api/account.h b/plugins/Dropbox/src/api/account.h index 9c8bf20e7e..2842804dcc 100644 --- a/plugins/Dropbox/src/api/account.h +++ b/plugins/Dropbox/src/api/account.h @@ -5,30 +5,31 @@ class GetAccessTokenRequest : public HttpRequest {
public:
GetAccessTokenRequest(const char *requestToken) :
- HttpRequest(REQUEST_POST, DROPBOX_API_URL "/oauth2/token")
+ HttpRequest(REQUEST_POST, DROPBOX_API_OLD "/oauth2/token")
{
- AddBasicAuthHeader(DROPBOX_APP_KEY, DROPBOX_API_SECRET);
AddHeader("Content-Type", "application/x-www-form-urlencoded");
- CMStringA data(CMStringDataFormat::FORMAT, "grant_type=authorization_code&code=%s", requestToken);
+ CMStringA data(CMStringDataFormat::FORMAT,
+ "client_id=%s&client_secret=%s&grant_type=authorization_code&code=%s",
+ DROPBOX_APP_KEY, DROPBOX_API_SECRET, requestToken);
SetData(data.GetBuffer(), data.GetLength());
}
};
-class DisableAccessTokenRequest : public HttpRequest
+/*class DisableAccessTokenRequest : public HttpRequest
{
public:
DisableAccessTokenRequest() :
- HttpRequest(REQUEST_POST, DROPBOX_API_URL "/disable_access_token")
+ HttpRequest(REQUEST_POST, DROPBOX_API_OLD "/disable_access_token")
{
}
-};
+};*/
-class GetAccountInfoRequest : public HttpRequest
+class GetCurrentAccountRequest : public HttpRequest
{
public:
- GetAccountInfoRequest(const char *token) :
- HttpRequest(REQUEST_GET, DROPBOX_API_URL "/account/info")
+ GetCurrentAccountRequest(const char *token) :
+ HttpRequest(REQUEST_POST, DROPBOX_API_RPC "/users/get_current_account")
{
AddBearerAuthHeader(token);
}
|