GoFileClient class
The GoFileClient class is a wrapper around the gofile API It provide a simple implementation of the methods available in the API See Gofile API documentation for more information
Constructors
- GoFileClient(String token)
- The client used for making the request It is initialized with the token
Properties
Methods
-
copyContent(
List< String> contentsId, String folderIdDest) → Future<bool> -
Copy one or multiple contents to another folder
contentIds
is the list of content ids to be copieddestinationFolderId
is the id of the destination folder Will throw an ArgumentError ifcontentIds
,destinationFolderId
or token is empty -
createFolder(
String parentFolderId, String folderName) → Future< bool> -
Create a new folder
parentFolderId
is the id of the parent folderfolderName
is the name of the folder to be created Will throw an ArgumentError ifparentFolderId
,folderName
or token is empty -
deleteContent(
List< String> contentsId) → Future<bool> -
Delete one or multiple files/folders
contentIds
is the list of content ids to be deleted Will throw an ArgumentError ifcontentIds
or token is empty -
getAccountDetails(
{bool allDetails = false}) → Future< Map< String, dynamic> > -
Retrieving specific account information
If
allDetails
is all details will be returned. -
getContent(
String contentId) → Future< Map< String, dynamic> > -
Get a specific content details
contentID
is the id of the content Will throw an ArgumentError if the token is empty -
getServer(
) → Future< String> - Returns the best server available to receive files. Throw exception if the request failed
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setFolderOption(
String folderId, GoFileFolderOption option, String value) → Future< bool> -
Set an option on a folder
folderId
is the id of the folderoption
is the option to be set, only one option can be set at a timevalue
is the value of the option, the value will be not validated before sending the request -
toString(
) → String -
A string representation of this object.
inherited
-
uploadFile(
String server, File file, {bool useToken = true, String? folderId}) → Future< Map< String, dynamic> > -
Upload one file on a specific
server
. If you specify afolderId
, the file will be added to this folder.server
must be obtain from getServer IfuseToken
is true, the file will be added to this account. If undefined, a guest account will be created to receive the file.folderId
requireuseToken
set to true
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited