Skip to content

Instantly share code, notes, and snippets.

@sebastianfrelle
Created January 16, 2017 16:45
Show Gist options
  • Save sebastianfrelle/273bc9cccafe14cefde2f283bd2bd439 to your computer and use it in GitHub Desktop.
Save sebastianfrelle/273bc9cccafe14cefde2f283bd2bd439 to your computer and use it in GitHub Desktop.
package com.socializr.socializr_app.networking;
import com.socializr.socializr_app.models.Event;
import com.socializr.socializr_app.models.PersonalUserDTO;
import com.socializr.socializr_app.networking.marshall.AddUserToEventQueueMarshall;
import com.socializr.socializr_app.networking.marshall.ChangePasswordMarshall;
import com.socializr.socializr_app.networking.marshall.GetEventsForCardStackMarshall;
import com.socializr.socializr_app.networking.marshall.LoginMarshall;
import com.socializr.socializr_app.networking.marshall.RegisterMarshall;
import com.socializr.socializr_app.networking.marshall.UpdateDescriptionMarshall;
import com.socializr.socializr_app.networking.marshall.UploadImageMarshall;
import java.util.List;
import retrofit.Call;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.Header;
import retrofit.http.POST;
/**
* Created by zhelvisdanas on 11/7/16.
*/
public interface SocializrAPI {
@POST("login")
Call<String> login(@Body LoginMarshall body);
@POST("register")
Call<String> register(@Body RegisterMarshall body);
@POST("updateDescription")
Call<String> updateDescription(@Header ("x-access-token") String jwt, @Body UpdateDescriptionMarshall body);
@POST("changePassword")
Call<String> changePassword(@Header("x-access-token") String jwt, @Body ChangePasswordMarshall body);
@GET("getPersonalUser")
Call<PersonalUserDTO> getUser(@Header("x-access-token") String jwt);
@POST("createEvent")
Call<String> createEvent(@Header("x-access-token") String jwt,
@Body CreateEventMarshall body);
@POST("uploadImage")
Call<String> uploadImage(@Header("x-access-token")String jwt, @Body UploadImageMarshall body);
@POST("addUserToEventQueue")
Call<String> addUserToEventQueue(@Header("x-access-token") String jwt,
@Body AddUserToEventQueueMarshall body);
@POST("getEventsForCardStack")
Call<List<Event>> getEventsForCardStack(@Header("x-access-token") String jwt,
@Body GetEventsForCardStackMarshall body);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment