Constructor and Description |
---|
Client(java.lang.String publicKey,
java.lang.String privateKey)
Initializes a client with custom access keys and simple authentication.
|
Client(java.lang.String publicKey,
java.lang.String privateKey,
boolean simpleAuth,
RequestHelperProvider requestHelperProvider)
Initializes a client with custom access keys.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes client.
|
CopyFileData |
copyFile(java.lang.String fileId,
java.lang.String storage) |
void |
deleteFile(java.lang.String fileId)
Marks a file as deleted.
|
static Client |
demoClient()
Creates a client with demo credentials.
|
File |
getFile(java.lang.String fileId)
Requests file data.
|
FilesQueryBuilder |
getFiles()
Begins to build a request for uploaded files for the current account.
|
java.lang.String |
getPrivateKey()
Returns the private key.
|
Project |
getProject()
Requests project info from the API.
|
java.lang.String |
getPublicKey()
Returns the public key.
|
RequestHelper |
getRequestHelper() |
boolean |
isSimpleAuth()
Returns
true , if simple authentication is used. |
void |
saveFile(java.lang.String fileId)
Marks a file as saved.
|
public Client(java.lang.String publicKey, java.lang.String privateKey)
publicKey
- Public keyprivateKey
- Private keypublic Client(java.lang.String publicKey, java.lang.String privateKey, boolean simpleAuth, RequestHelperProvider requestHelperProvider)
publicKey
- Public keyprivateKey
- Private keysimpleAuth
- If false
, HMAC-based authentication is usedrequestHelperProvider
- Should be null
to use DefaultRequestHelperProvider
public static Client demoClient()
public java.lang.String getPublicKey()
public java.lang.String getPrivateKey()
public boolean isSimpleAuth()
true
, if simple authentication is used.true
, if simple authentication is used, false
otherwisepublic RequestHelper getRequestHelper()
public Project getProject()
public File getFile(java.lang.String fileId)
fileId
- Resource UUIDpublic FilesQueryBuilder getFiles()
public void deleteFile(java.lang.String fileId)
fileId
- Resource UUIDpublic void saveFile(java.lang.String fileId)
fileId
- Resource UUIDpublic void close()
public CopyFileData copyFile(java.lang.String fileId, java.lang.String storage)
fileId
- Resource UUIDstorage
- Target storage name