package ch.hevs.aislab.magpie.debs.retrofit;


import ch.hevs.aislab.magpie.debs.model.RequestSubscriptionResult;
import retrofit.http.Body;
import retrofit.http.POST;
import retrofit.http.Path;

public interface SubscriberSvcApi {

    String SUBSCRIBER_ID = "subId";

    String SUBSCRIBER_SVC = "/subscriber";
    String SUBSCRIBER_SUBSCRIBE_SVC = SUBSCRIBER_SVC + "/{" + SUBSCRIBER_ID + "}/subscribe";

    @POST(SUBSCRIBER_SUBSCRIBE_SVC)
    RequestSubscriptionResult doSubscriptionByUsername(
            @Path(SUBSCRIBER_ID) long subId, @Body String pubUsername);
}

@@ -40,16 +40,100 @@
 ofit;%0A%0A%0A
+import java.util.Collection;%0A%0Aimport ch.hevs.aislab.magpie.debs.model.GlucoseAlert;%0A
 import c
@@ -218,16 +218,42 @@
 p.Body;%0A
+import retrofit.http.GET;%0A
 import r
@@ -297,16 +297,44 @@
 tp.Path;
+%0Aimport retrofit.http.Query;
 %0A%0Apublic
@@ -400,17 +400,16 @@
 subId%22;%0A
-%0A
     Stri
@@ -411,26 +411,55 @@
  String 
-SUBSCRIBER
+PUBLISHER_ID = %22pubId%22;%0A%0A    String SUB
 _SVC = %22
@@ -486,23 +486,16 @@
 ring SUB
-SCRIBER
 _SUBSCRI
@@ -506,23 +506,16 @@
 VC = SUB
-SCRIBER
 _SVC + %22
@@ -551,16 +551,95 @@
 cribe%22;%0A
+    String SUB_ALERTS_SVC = SUB_SVC + %22/%7B%22 + SUBSCRIBER_ID + %22%7D/alertsByUser%22;%0A
 %0A    @PO
@@ -644,23 +644,16 @@
 POST(SUB
-SCRIBER
 _SUBSCRI
@@ -787,11 +787,162 @@
 ername);
+%0A%0A    @GET(SUB_ALERTS_SVC)%0A    Collection%3CGlucoseAlert%3E getAlertsByUser(%0A            @Path(SUBSCRIBER_ID) long subId, @Query(PUBLISHER_ID) long pubId);
 %0A%7D%0A

Add method to get alerts