Package com.fussuchalice.bot.controllers
Class DropboxController
java.lang.Object
com.fussuchalice.bot.controllers.DropboxController
The `DropboxController` class provides methods for interacting with Dropbox through the Dropbox API.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
handleAuthCommand
(DropboxUnofficialBot bot, long chatId, Properties languagePack) Handles the authorization command by sending an instruction message to the user.static void
handleGetAccountInfo
(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey) Retrieves the Dropbox client using the provided access key.static void
handleListDirCommand
(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String path) Handles the command to list files and folders in a given path on Dropbox.static void
handleMoveCommand
(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String srcPath, String dstPath) Handles the command to move a file or folder in Dropbox to a specified destination.static void
handleShareCommand
(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String path) Handles the command to share a file or folder in Dropbox.static void
handleUploadFiles
(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String localFilePath, String remotePath) Handles the command to upload a local file to Dropbox.
-
Constructor Details
-
DropboxController
public DropboxController()
-
-
Method Details
-
handleAuthCommand
public static void handleAuthCommand(DropboxUnofficialBot bot, long chatId, Properties languagePack) Handles the authorization command by sending an instruction message to the user.- Parameters:
bot
- The bot instance.chatId
- The chat ID where the message will be sent.languagePack
- The language pack containing text messages.
-
handleGetAccountInfo
public static void handleGetAccountInfo(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey) Retrieves the Dropbox client using the provided access key.- Parameters:
bot
- The bot instance.accessKey
- The Dropbox access key.
-
handleListDirCommand
public static void handleListDirCommand(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String path) Handles the command to list files and folders in a given path on Dropbox.- Parameters:
bot
- The bot instance.chatId
- The chat ID where the messages will be sent.languagePack
- The language pack containing text messages.accessKey
- The Dropbox access key.path
- The path to list files and folders from.
-
handleMoveCommand
public static void handleMoveCommand(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String srcPath, String dstPath) Handles the command to move a file or folder in Dropbox to a specified destination.- Parameters:
bot
- The bot instance.chatId
- The chat ID where the message will be sent.languagePack
- The language pack containing text messages.accessKey
- The Dropbox access key.srcPath
- The source path of the file or folder to move.dstPath
- The destination path for the move operation.
-
handleUploadFiles
public static void handleUploadFiles(DropboxUnofficialBot bot, long chatId, Properties languagePack, String accessKey, String localFilePath, String remotePath) Handles the command to upload a local file to Dropbox.- Parameters:
bot
- The bot instance.chatId
- The chat ID where the message will be sent.languagePack
- The language pack containing text messages.accessKey
- The Dropbox access key.localFilePath
- The local file path to upload.remotePath
- The destination path in Dropbox for the uploaded file.
-