Skip to content

Instantly share code, notes, and snippets.

@Arneball Arneball/
Last active Mar 31, 2016

What would you like to do?
import java.util.List;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.converter.gson.GsonConverterFactory
* Created by arneball on 2016-03-30.
public class Backend {
public interface FittUfc {
@GET("/fighters") Call<List<User>> getFighters();
@GET("/fighters/{id}") Call<User> getFighter(@Path("id") int id);
public static class User {
public String name, surname;
public static final FittUfc UFC = new Retrofit.Builder()
dependencies {
compile 'com.squareup.retrofit2:retrofit:2.0.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.