package org.give2peer.karma.service;

import org.androidannotations.rest.spring.annotations.Accept;
import org.androidannotations.rest.spring.annotations.Get;
import org.androidannotations.rest.spring.annotations.Rest;
import org.androidannotations.rest.spring.api.MediaType;
import org.androidannotations.rest.spring.api.RestClientErrorHandling;
import org.androidannotations.rest.spring.api.RestClientRootUrl;
import org.give2peer.karma.response.PrivateProfileResponse;
import org.give2peer.karma.response.Stats;


/**
 * This is an effortless REST client thanks to Android Annotations (v4).
 * The API documentation and sandbox are available at https://g2p.give2peer.org
 *
 * Note:
 *   You have to call setRootUrl(app.getCurrentServer().getUrl()) at some point before using this,
 *   in a method annotated with @AfterInject seems a good idea.
 */
@Rest(
        interceptors = { AuthenticationInterceptor.class },
        converters   = { GsonHttpMessageConverter.class  }
)
@Accept(MediaType.APPLICATION_JSON)
public interface RestClient extends RestClientRootUrl, RestClientErrorHandling
{
    @Get("/stats")
    Stats getStats();

    @Get("/user")
    PrivateProfileResponse getPrivateProfile();
}
@@ -152,16 +152,76 @@
 ns.Get;%0A
+import org.androidannotations.rest.spring.annotations.Path;%0A
 import o
@@ -465,16 +465,71 @@
 ootUrl;%0A
+import org.give2peer.karma.response.FindItemsResponse;%0A
 import o
@@ -1313,10 +1313,263 @@
 ofile();
+%0A%0A    @Get(%22/items/around/%7Blatitude%7D/%7Blongitude%7D?skip=%7Bskip%7D&maxDistance=%7BmaxDistance%7D%22)%0A    FindItemsResponse findItemsAround(%0A            @Path String latitude, @Path String longitude,%0A            @Path String skip,     @Path String maxDistance%0A    );
 %0A%7D

Add `findItemsAround` to the new RestClient. We're not actually using it yet.