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

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
The API key used to authenticate the requests
final

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 copied destinationFolderId is the id of the destination folder Will throw an ArgumentError if contentIds, destinationFolderId or token is empty
createFolder(String parentFolderId, String folderName) Future<bool>
Create a new folder parentFolderId is the id of the parent folder folderName is the name of the folder to be created Will throw an ArgumentError if parentFolderId, 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 if contentIds 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 folder option is the option to be set, only one option can be set at a time value 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 a folderId, the file will be added to this folder. server must be obtain from getServer If useToken is true, the file will be added to this account. If undefined, a guest account will be created to receive the file. folderId require useToken set to true

Operators

operator ==(Object other) bool
The equality operator.
inherited