com.spinn3r.api
Class Config

java.lang.Object
  extended by com.spinn3r.api.Config
Direct Known Subclasses:
CommentHistoryConfig, FeedConfig, FeedEntryConfig, FeedHistoryConfig, LinkConfig, LinkHistoryConfig, PermalinkConfig, PermalinkEntryConfig, PermalinkHistoryConfig, PermalinkStatusConfig, SourceListConfig

public class Config
extends java.lang.Object

Used to startup the API and specify defaults for limits, where to start indexing, tiers, language, etc.


Field Summary
static int DEFAULT_LIMIT
          Default number of results to fetch.
static long DEFAULT_SLEEP_INTERVAL
          When we've ran out of results (because the client is up to date) then we should spin for a few seconds.
static boolean DEFAULT_USE_PROTOBUF
          Default value for useProtobuf.
static java.lang.String DEFAULT_VERSION
          When fetching the API this specifies the default version to return.
 
Constructor Summary
Config()
           
 
Method Summary
 java.util.Date getAfter()
          Get the value of after.
 java.lang.String getApi()
          Get the value of api.
 java.lang.String getFilter()
          Get the value of filter.
 java.lang.String getFirstRequestURL()
          Get the value of firstRequestURL.
 int getLimit()
          Get the value of limit.
 boolean getSkipDescription()
          Get the value of skipDescription.
 long getSleepInterval()
           
 boolean getUseProtobuf()
          Get the value of useProtobuf.
 java.lang.String getVendor()
          Specify the vendor for this call.
 java.lang.String getVersion()
          Get the value of version.
 void setAfter(java.util.Date after)
          Set the value of after.
 void setApi(java.lang.String api)
          Set the value of api.
 void setFilter(java.lang.String filter)
          Set the value of filter.
 void setFirstRequestURL(java.lang.String firstRequestURL)
          Set the value of firstRequestURL.
 void setLimit(int limit)
          Deprecated. This method will be changing to protected in the future. We're going to remove the option for users to set the limit on the number of items per response as we have found this to cause problems in production applications. Having Spinn3r select the optimal values has turned out to be better for everyone involved and yielded much higher performance.
 void setSkipDescription(boolean skipDescription)
          Set the value of skipDescription.
 void setUseProtobuf(boolean useProtobuf)
          Set the value of useProtobuf.
 void setVendor(java.lang.String vendor)
          Set the value of vendor.
 void setVersion(java.lang.String version)
          Set the value of version.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SLEEP_INTERVAL

public static final long DEFAULT_SLEEP_INTERVAL
When we've ran out of results (because the client is up to date) then we should spin for a few seconds. If the sleep interval is -1 then we sleep for a random amount of time between 0 and 30 seconds.

See Also:
Constant Field Values

DEFAULT_LIMIT

public static int DEFAULT_LIMIT
Default number of results to fetch.


DEFAULT_VERSION

public static java.lang.String DEFAULT_VERSION
When fetching the API this specifies the default version to return.


DEFAULT_USE_PROTOBUF

public static boolean DEFAULT_USE_PROTOBUF
Default value for useProtobuf.

Constructor Detail

Config

public Config()
Method Detail

getFilter

public java.lang.String getFilter()
Get the value of filter.


setFilter

public void setFilter(java.lang.String filter)
Set the value of filter.


getUseProtobuf

public boolean getUseProtobuf()
Get the value of useProtobuf.


setUseProtobuf

public void setUseProtobuf(boolean useProtobuf)
Set the value of useProtobuf.


setFirstRequestURL

public void setFirstRequestURL(java.lang.String firstRequestURL)
Set the value of firstRequestURL.


getFirstRequestURL

public java.lang.String getFirstRequestURL()
Get the value of firstRequestURL.


getAfter

public java.util.Date getAfter()
Get the value of after.


setAfter

public void setAfter(java.util.Date after)
Set the value of after.


getVendor

public java.lang.String getVendor()
Specify the vendor for this call. This MUST be specified or the client will not work.


setVendor

public void setVendor(java.lang.String vendor)
Set the value of vendor.


getVersion

public java.lang.String getVersion()
Get the value of version.


setVersion

public void setVersion(java.lang.String version)
Set the value of version.


setLimit

public void setLimit(int limit)
Deprecated. This method will be changing to protected in the future. We're going to remove the option for users to set the limit on the number of items per response as we have found this to cause problems in production applications. Having Spinn3r select the optimal values has turned out to be better for everyone involved and yielded much higher performance.

Set the value of limit.


getLimit

public int getLimit()
Get the value of limit.


getSleepInterval

public long getSleepInterval()

getSkipDescription

public boolean getSkipDescription()
Get the value of skipDescription.


setSkipDescription

public void setSkipDescription(boolean skipDescription)
Set the value of skipDescription.


getApi

public java.lang.String getApi()
Get the value of api.


setApi

public void setApi(java.lang.String api)
Set the value of api.



Copyright © Tailrank Inc. All Rights Reserved.