com.citygrid
Class CityGrid

java.lang.Object
  extended by com.citygrid.CityGrid

public class CityGrid
extends Object

CityGrid SDK

A Java library that provides an interface to the CityGrid REST API's as documented at http://docs.citygridmedia.com/display/citygridv2/CityGrid+APIs.


Constructor Summary
CityGrid()
           
 
Method Summary
static CGAdsCustom adsCustom()
          Gets the builder for invoking ad searches.
static CGAdsMobile adsMobile()
          Gets the builder for invoking ad searches that return a mobile banner.
static CGAdsTracker adsTracker()
          Gets the builder for invoking Places that Pay APIs.
static int getConnectTimeout()
          Gets the global network connect timeout for all server calls, in milliseconds.
static boolean getDebug()
          Gets whether any debug information is displayed.
static String getMobileType()
          Gets the mobile type/model supplied by client of the SDK.
static String getMuid()
          Gets the MUID supplied by client of the SDK.
static String getPlacement()
          Gets the global placement that assists a developer in breakdowns for publisher reports
static String getPublisher()
          Gets the global publisher that identifies a developer.
static int getReadTimeout()
          Gets the global network read timeout for all server calls, in milliseconds.
static boolean getSimulation()
          Gets whether any calls are made to the API or all network activity is simulated.
static CGOffersDetail offersDetail()
          Gets the builder for getting an offer for a specific location.
static CGOffersSearch offersSearch()
          Gets the builder for invoking offers searches.
static CGPlacesDetail placesDetail()
          Gets the builder for getting a detail for a place.
static CGPlacesSearch placesSearch()
          Gets the builder for invoking place searches.
static CGReviewsSearch reviewsSearch()
          Get the build for invoking review searches.
static void setConnectTimeout(int connectTimeout)
          Sets the global network timeout for all server calls, in milliseconds.
static void setDebug(boolean debug)
          Sets whether any debug information is displayed.
static void setMobileType(String mobileType)
          Sets the mobile type/model to be used with certain CityGrid API calls, e.g.
static void setMuid(String muid)
          Sets the MUID to be used with certain CityGrid API calls, e.g.
static void setPlacement(String placement)
          Sets the global placement that assists a developer in breakdowns for publisher reports
static void setPublisher(String publisher)
          Sets the global publisher that identifies a developer.
static void setReadTimeout(int readTimeout)
          Sets the global network read timeout for all server calls, in milliseconds.
static void setSimulation(boolean simulation)
          Sets whether any calls are made to the API or all network activity is simulated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CityGrid

public CityGrid()
Method Detail

getPublisher

public static String getPublisher()
Gets the global publisher that identifies a developer.

Returns:

setPublisher

public static void setPublisher(String publisher)
Sets the global publisher that identifies a developer.

Parameters:
publisher -

setPlacement

public static void setPlacement(String placement)
Sets the global placement that assists a developer in breakdowns for publisher reports

Parameters:
placement -

getPlacement

public static String getPlacement()
Gets the global placement that assists a developer in breakdowns for publisher reports

Returns:

setConnectTimeout

public static void setConnectTimeout(int connectTimeout)
Sets the global network timeout for all server calls, in milliseconds.

Parameters:
connectTimeout -

getConnectTimeout

public static int getConnectTimeout()
Gets the global network connect timeout for all server calls, in milliseconds.

Returns:

setReadTimeout

public static void setReadTimeout(int readTimeout)
Sets the global network read timeout for all server calls, in milliseconds.

Parameters:
readTimeout -

getReadTimeout

public static int getReadTimeout()
Gets the global network read timeout for all server calls, in milliseconds.

Returns:

setDebug

public static void setDebug(boolean debug)
Sets whether any debug information is displayed.

Parameters:
debug -

getDebug

public static boolean getDebug()
Gets whether any debug information is displayed.

Returns:

getSimulation

public static boolean getSimulation()
Gets whether any calls are made to the API or all network activity is simulated.

Returns:

setSimulation

public static void setSimulation(boolean simulation)
Sets whether any calls are made to the API or all network activity is simulated.

Parameters:
simulation -

getMuid

public static String getMuid()
Gets the MUID supplied by client of the SDK.

Returns:

setMuid

public static void setMuid(String muid)
Sets the MUID to be used with certain CityGrid API calls, e.g. CGAdsMobile and CGAdsTracker.

Parameters:
muid -

getMobileType

public static String getMobileType()
Gets the mobile type/model supplied by client of the SDK.

Returns:

setMobileType

public static void setMobileType(String mobileType)
Sets the mobile type/model to be used with certain CityGrid API calls, e.g. CGAdsMobile and CGAdsTracker.

Parameters:
mobileType -

placesSearch

public static CGPlacesSearch placesSearch()
Gets the builder for invoking place searches. The builder will default to the global publisher and timeout.

Returns:

placesDetail

public static CGPlacesDetail placesDetail()
Gets the builder for getting a detail for a place. The builder will default to the global publisher and timeout.

Returns:

reviewsSearch

public static CGReviewsSearch reviewsSearch()
Get the build for invoking review searches. The builder will default to the global publisher and timeout.

Returns:

offersSearch

public static CGOffersSearch offersSearch()
Gets the builder for invoking offers searches. The builder will default to the global publisher and timeout.

Returns:

offersDetail

public static CGOffersDetail offersDetail()
Gets the builder for getting an offer for a specific location. The builder will default to the global publisher and timeout.

Returns:

adsCustom

public static CGAdsCustom adsCustom()
Gets the builder for invoking ad searches. The builder will default to the global publisher and timeout.

Returns:

adsMobile

public static CGAdsMobile adsMobile()
Gets the builder for invoking ad searches that return a mobile banner. The builder will default to the global publisher and timeout.

Returns:

adsTracker

public static CGAdsTracker adsTracker()
Gets the builder for invoking Places that Pay APIs. The builder will default to the global publisher and timeout.

Returns:


Copyright © 2011. All Rights Reserved.