com.smartfile.api
Class BasicClient

java.lang.Object
  extended by com.smartfile.api.Client
      extended by com.smartfile.api.BasicClient

public class BasicClient
extends Client

Implements Smartfile API client using basic authentication. Provide credentials within constructor, environment variables or .netrc file

Example of usage:
BasicClient api = new BasicClient("***********","*************");

Now your client is ready.

See Also:
Client for details of API call.

Constructor Summary
BasicClient()
          Creates basic auth client using credentials stored at environment variables SMARTFILE_API_KEY and SMARTFILE_API_PASS or from the ~/.netrc file
BasicClient(java.lang.String netrcfile)
          Creates basic auth client using credentials stored at netrc file
BasicClient(java.lang.String key, java.lang.String pwd)
          Creates basic auth client
 
Method Summary
 
Methods inherited from class com.smartfile.api.Client
addHeader, delete, delete, delete, delete, get, get, get, get, getApiUrl, post, post, post, post, post, put, put, put, put, setApiUrl, setApiUrl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicClient

public BasicClient(java.lang.String key,
                   java.lang.String pwd)
            throws SmartFileException
Creates basic auth client

Parameters:
key - Client Key
pwd - Client Password
Throws:
SmartFileException

BasicClient

public BasicClient(java.lang.String netrcfile)
            throws SmartFileException
Creates basic auth client using credentials stored at netrc file

Parameters:
netrcfile - Path to the netrc file
Throws:
SmartFileException

BasicClient

public BasicClient()
            throws SmartFileException
Creates basic auth client using credentials stored at environment variables SMARTFILE_API_KEY and SMARTFILE_API_PASS or from the ~/.netrc file

Throws:
SmartFileException