aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java')
-rw-r--r--main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java b/main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java
index b2afff5..a12a7fb 100644
--- a/main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java
+++ b/main/src/cgeo/geocaching/connector/ox/OpenCachingApi.java
@@ -2,10 +2,10 @@ package cgeo.geocaching.connector.ox;
import cgeo.geocaching.Geocache;
import cgeo.geocaching.enumerations.CacheType;
-import cgeo.geocaching.geopoint.Geopoint;
-import cgeo.geocaching.geopoint.GeopointFormatter;
-import cgeo.geocaching.geopoint.Viewport;
import cgeo.geocaching.list.StoredList;
+import cgeo.geocaching.location.Geopoint;
+import cgeo.geocaching.location.GeopointFormatter;
+import cgeo.geocaching.location.Viewport;
import cgeo.geocaching.network.Network;
import cgeo.geocaching.network.Parameters;
import cgeo.geocaching.settings.Settings;
@@ -39,19 +39,19 @@ public class OpenCachingApi {
return null;
}
- private static HttpResponse getRequest(String string, Parameters parameters) {
+ private static HttpResponse getRequest(final String uri, final Parameters parameters) {
parameters.add("Authorization", DEV_KEY);
- return Network.getRequest(string, parameters);
+ return Network.getRequest(uri, parameters);
}
private static Collection<Geocache> importCachesFromResponse(final HttpResponse response, final boolean isDetailed) {
if (response == null) {
return Collections.emptyList();
}
- Collection<Geocache> caches;
+ final Collection<Geocache> caches;
try {
- caches = new OXGPXParser(StoredList.TEMPORARY_LIST_ID, isDetailed).parse(response.getEntity().getContent(), null);
- } catch (Exception e) {
+ caches = new OXGPXParser(StoredList.TEMPORARY_LIST.id, isDetailed).parse(response.getEntity().getContent(), null);
+ } catch (final Exception e) {
Log.e("Error importing from OpenCaching.com", e);
return Collections.emptyList();
}
@@ -81,10 +81,10 @@ public class OpenCachingApi {
* Parameters to modify
* @return True - query possible, False - no query, all caches excluded
*/
- private static boolean addTypeFilter(Parameters queryParameters) {
+ private static boolean addTypeFilter(final Parameters queryParameters) {
boolean doQuery = true;
if (Settings.getCacheType() != CacheType.ALL) {
- String typeFilter;
+ final String typeFilter;
switch (Settings.getCacheType()) {
case TRADITIONAL:
typeFilter = "Traditional Cache";