Package com.pnfsoftware.jeb.client.jebio
Class JebIoApiHelper
java.lang.Object
com.pnfsoftware.jeb.client.jebio.JebIoApiHelper
JEB.IO
helper routines.
API end-point: https://www.pnfsoftware.com/io/api/
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJebIoApiHelper
(INet net, UserCredentials credentials) Create a JEB.IO API helper. -
Method Summary
Modifier and TypeMethodDescriptionlong
checkFileHash
(File file) Check whether a file is already present on the JEB.IO.long
checkFileHash
(String hash) Check whether a file is already present on the JEB.IO.createUser
(String email, String password) byte[]
downloadFile
(String hash) Download a file from JEB.IO/MSN.getUser()
queryAssistant
(int qtype, String data) Query the assistant through JEB.IO.int
shareFile
(File file, String name, String comments, SampleDetermination determination, boolean anonymous) Upload and share a file on JEB.IO/MSN.
-
Field Details
-
BASE
Current JEB.IO API end-point base.- See Also:
-
-
Constructor Details
-
JebIoApiHelper
Create a JEB.IO API helper.- Parameters:
net
- mandatorycredentials
- optional object; required for user operations and sharing operations
-
-
Method Details
-
createUser
- Parameters:
email
-password
-- Returns:
- Throws:
IOException
-
getUser
- Returns:
- Throws:
IOException
-
checkFileHash
Check whether a file is already present on the JEB.IO. An API key is required. If you have a hash already, you may prefer usingcheckFileHash(String)
.- Parameters:
file
- the file- Returns:
- <0=error, 0=found, 1=not_found
- Throws:
IOException
-
checkFileHash
Check whether a file is already present on the JEB.IO. An API key is required.- Parameters:
hash
- the file hash- Returns:
- <0=error, 0=found, 1=not_found
- Throws:
IOException
-
getFile
- Parameters:
hash
-- Returns:
- Throws:
IOException
-
downloadFile
Download a file from JEB.IO/MSN.- Parameters:
hash
-- Returns:
- Throws:
IOException
-
queryAssistant
Query the assistant through JEB.IO. This method is reserved and should not be called by third-party clients.- Parameters:
qtype
-data
-- Returns:
- the response
- Throws:
IOException
-