com.kallasoft.smugmug.api.json.v1_2_0.users
Class GetTransferStats

java.lang.Object
  extended by com.kallasoft.smugmug.api.json.AbstractMethod
      extended by com.kallasoft.smugmug.api.json.v1_2_0.users.GetTransferStats
All Implemented Interfaces:
Method
Direct Known Subclasses:
GetTransferStats

public class GetTransferStats
extends AbstractMethod

Gets transfer statistics for the logged-in user during the given Month and Year. SmugMug often only keeps the last few months (current + 2 previous).

A float is provided for Originals because videos often are only partially viewed.

If 'Heavy' is set to '1', an array of images with each image transfer stat (just like smugmug.images.getStats) is provided for each album in addition to the album transfer stats.

Version:
1.2.0
Author:
Riyad Kalla
See Also:
smugmug.users.getTransferStats API Doc

Nested Class Summary
 class GetTransferStats.GetTransferStatsResponse
          Class used to represent the response for the smugmug.users.getTransferStats method call.
 
Field Summary
static String[] ARGUMENTS
          Defines all the arguments this method takes.
static String METHOD_NAME
          Defines the SmugMug JSON API method name that will be called.
 
Constructor Summary
GetTransferStats()
          Construct a new method instance that can be executed.
GetTransferStats(String methodName, String[] arguments)
          Construct a new method instance that can be executed with the given arguments.
 
Method Summary
 GetTransferStats.GetTransferStatsResponse execute(String url, String[] argumentValues)
          Used to execute the smugmug.users.getTransferStats method, returning a response containing the transfer statistics requested for the particular user (assuming SmugMug had them on file).
 GetTransferStats.GetTransferStatsResponse execute(String url, String apiKey, String sessionID, Integer month, Integer year, Boolean heavy)
          Convenience method used to execute the smugmug.users.getTransferStats method.
 
Methods inherited from class com.kallasoft.smugmug.api.json.AbstractMethod
executeImpl, getArguments, getMethodName, setupPostParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METHOD_NAME

public static final String METHOD_NAME
Defines the SmugMug JSON API method name that will be called.

See Also:
Constant Field Values

ARGUMENTS

public static final String[] ARGUMENTS
Defines all the arguments this method takes.

Values are: "APIKey", "SessionID", "Month", "Year", "Heavy"

Constructor Detail

GetTransferStats

public GetTransferStats()
Construct a new method instance that can be executed.


GetTransferStats

public GetTransferStats(String methodName,
                        String[] arguments)
Construct a new method instance that can be executed with the given arguments.

Parameters:
methodName - The name of the SmugMug JSON API method that this Method represents.
arguments - The names of the arguments that this method accepts.
Method Detail

execute

public GetTransferStats.GetTransferStatsResponse execute(String url,
                                                         String[] argumentValues)
Used to execute the smugmug.users.getTransferStats method, returning a response containing the transfer statistics requested for the particular user (assuming SmugMug had them on file).

Parameters:
url - The URL of the SmugMug server to communicate with.
argumentValues - The argument values to pass to this method.
Returns:
the response that includes all the transfer statistics for the user requested (assuming SmugMug had them on file).

execute

public GetTransferStats.GetTransferStatsResponse execute(String url,
                                                         String apiKey,
                                                         String sessionID,
                                                         Integer month,
                                                         Integer year,
                                                         Boolean heavy)
Convenience method used to execute the smugmug.users.getTransferStats method.

This method performs necessary conversions on all the argument values before calling execute(String, String[]).

Parameters:
url - The URL of the SmugMug server to communicate with.
apiKey - The API Key to use. API keys are issued by SmugMug.
sessionID - The logged in SessionID that represents the user's session.
month - A number (1-12) indicating a month to get transfer statistics for.
year - A number (e.g. 2007) indicating the year to get the transfer statistics for.
heavy - Set to true to return heavy results, including transfer stats for all the images in the album as well, otherwise set to false.
Returns:
the response that includes all the transfer statistics for the given user for the given span of time (assuming SmugMug had it on file).
See Also:
execute(String, String[])