geocaching.api.impl
Class LiveGeocachingApi

java.lang.Object
  extended by geocaching.api.GeocachingApi
      extended by geocaching.api.impl.LiveGeocachingApi

public class LiveGeocachingApi
extends GeocachingApi


Field Summary
protected static String BASE_URL
           
protected  String consumerKey
           
protected  String licenceKey
           
 
Fields inherited from class geocaching.api.GeocachingApi
session
 
Constructor Summary
LiveGeocachingApi(String consumerKey, String licenceKey)
           
 
Method Summary
protected  JsonReader callGet(String function)
           
protected  JsonReader callPost(String function, String postBody)
           
 void closeSession()
           
 CacheLog createFieldNoteAndPublish(String cacheCode, LogType logType, Date dateLogged, String note, boolean publish, ImageData imageData, boolean favoriteThisCache)
           
 List<CacheLog> getCacheLogs(String cacheCode, int startPosition, int endPosition)
           
 TravelBug getTravelBug(String travelBugCode)
           
 List<TravelBug> getTravelBugsByCache(String cacheCode)
           
 UserProfile getYourUserProfile(boolean favoritePointData, boolean geocacheData, boolean publicProfileData, boolean souvenirData, boolean trackableData)
           
protected  void checkError(JsonReader r)
           
 boolean isSessionValid()
           
protected  String maskPassword(String input)
           
 void openSession(String userName, String password)
           
 List<SimpleGeocache> searchForGeocaches(boolean isLite, int startIndex, int maxPerPage, int geocacheLogCount, int trackableLogCount, Filter[] filters)
           
 
Methods inherited from class geocaching.api.GeocachingApi
createFieldNoteAndPublish, getCache, getCaches, getCachesByCoordinates, getCachesByCoordinates, getCacheSimple, getSession, openSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_URL

protected static final String BASE_URL
See Also:
Constant Field Values

consumerKey

protected final String consumerKey

licenceKey

protected final String licenceKey
Constructor Detail

LiveGeocachingApi

public LiveGeocachingApi(String consumerKey,
                         String licenceKey)
Method Detail

openSession

public void openSession(String userName,
                        String password)
                 throws GeocachingApiException
Specified by:
openSession in class GeocachingApi
Throws:
GeocachingApiException

closeSession

public void closeSession()
Specified by:
closeSession in class GeocachingApi

isSessionValid

public boolean isSessionValid()
Specified by:
isSessionValid in class GeocachingApi

searchForGeocaches

public List<SimpleGeocache> searchForGeocaches(boolean isLite,
                                               int startIndex,
                                               int maxPerPage,
                                               int geocacheLogCount,
                                               int trackableLogCount,
                                               Filter[] filters)
                                        throws GeocachingApiException
Specified by:
searchForGeocaches in class GeocachingApi
Throws:
GeocachingApiException

getTravelBug

public TravelBug getTravelBug(String travelBugCode)
                       throws GeocachingApiException
Specified by:
getTravelBug in class GeocachingApi
Throws:
GeocachingApiException

getTravelBugsByCache

public List<TravelBug> getTravelBugsByCache(String cacheCode)
                                     throws GeocachingApiException
Specified by:
getTravelBugsByCache in class GeocachingApi
Throws:
GeocachingApiException

getCacheLogs

public List<CacheLog> getCacheLogs(String cacheCode,
                                   int startPosition,
                                   int endPosition)
                            throws GeocachingApiException
Specified by:
getCacheLogs in class GeocachingApi
Throws:
GeocachingApiException

createFieldNoteAndPublish

public CacheLog createFieldNoteAndPublish(String cacheCode,
                                          LogType logType,
                                          Date dateLogged,
                                          String note,
                                          boolean publish,
                                          ImageData imageData,
                                          boolean favoriteThisCache)
                                   throws GeocachingApiException
Specified by:
createFieldNoteAndPublish in class GeocachingApi
Throws:
GeocachingApiException

getYourUserProfile

public UserProfile getYourUserProfile(boolean favoritePointData,
                                      boolean geocacheData,
                                      boolean publicProfileData,
                                      boolean souvenirData,
                                      boolean trackableData)
                               throws GeocachingApiException
Specified by:
getYourUserProfile in class GeocachingApi
Throws:
GeocachingApiException

checkError

protected void checkError(JsonReader r)
                   throws GeocachingApiException,
                          IOException
Throws:
GeocachingApiException
IOException

callGet

protected JsonReader callGet(String function)
                      throws GeocachingApiException
Throws:
GeocachingApiException

callPost

protected JsonReader callPost(String function,
                              String postBody)
                       throws GeocachingApiException
Throws:
GeocachingApiException

maskPassword

protected String maskPassword(String input)


Copyright © 2012. All Rights Reserved.