diff options
author | aunsane <aunsane@gmail.com> | 2017-04-09 17:38:37 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2017-04-09 17:39:06 +0300 |
commit | 6481053a2d97d73902b4ba86b7a06812cff48ae1 (patch) | |
tree | 903ba40ce35761b32084951aede67c6eee9dd2c1 /plugins/Dropbox/src/api | |
parent | 3f6bdf928ebf7e7e70d999905eb363386db2868a (diff) |
Dropbox: temporary url option
Diffstat (limited to 'plugins/Dropbox/src/api')
-rw-r--r-- | plugins/Dropbox/src/api/operations.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/Dropbox/src/api/operations.h b/plugins/Dropbox/src/api/operations.h index c451e4190c..d97dec731e 100644 --- a/plugins/Dropbox/src/api/operations.h +++ b/plugins/Dropbox/src/api/operations.h @@ -18,6 +18,40 @@ public: }
};
+class CreateSharedLinkRequest : public HttpRequest
+{
+public:
+ CreateSharedLinkRequest(const char *token, const char *path) :
+ HttpRequest(REQUEST_POST, DROPBOX_API_RPC "/sharing/create_shared_link_with_settings")
+ {
+ AddBearerAuthHeader(token);
+ AddHeader("Content-Type", "application/json");
+
+ JSONNode root(JSON_NODE);
+ root << JSONNode("path", path);
+
+ json_string data = root.write();
+ SetData(data.c_str(), data.length());
+ }
+};
+
+class GetSharedLinkRequest : public HttpRequest
+{
+public:
+ GetSharedLinkRequest(const char *token, const char *path) :
+ HttpRequest(REQUEST_POST, DROPBOX_API_RPC "/sharing/list_shared_links")
+ {
+ AddBearerAuthHeader(token);
+ AddHeader("Content-Type", "application/json");
+
+ JSONNode root(JSON_NODE);
+ root << JSONNode("path", path);
+
+ json_string data = root.write();
+ SetData(data.c_str(), data.length());
+ }
+};
+
class SearchRequest : public HttpRequest
{
public:
|