package fr.masciulli.drinks.data;

import java.util.List;

import fr.masciulli.drinks.model.Drink;
import fr.masciulli.drinks.model.Liquor;
import retrofit.Callback;
import retrofit.RestAdapter;

public class DrinksProvider {

    private static RestAdapter mRestAdapter = new RestAdapter.Builder()
            .setServer("http://drinkstest.elasticbeanstalk.com/api")
            .build();
    private static DrinksService mService = mRestAdapter.create(DrinksService.class);

    public static void getAllDrinks(Callback<List<Drink>> callback) {
        mService.getAllDrinks(callback);
    }

    public static void getDrink(int drinkId, Callback<Drink> callback) {
        mService.getDrink(drinkId, callback);
    }

    public static void getAllLiquors(Callback<List<Liquor>> callback) {
        mService.getAllLiquors(callback);
    }

    public static void getLiquor(int liquorId, Callback<Liquor> callback) {
        mService.getLiquor(liquorId, callback);
    }

    public static void updateServer(String server) {
        mRestAdapter = new RestAdapter.Builder()
                .setServer(server)
                .build();
        mService = mRestAdapter.create(DrinksService.class);
    }

}

@@ -251,17 +251,17 @@
 Adapter 
-m
+s
 RestAdap
@@ -308,22 +308,24 @@
     .set
-Server
+Endpoint
 (%22http:/
@@ -418,17 +418,17 @@
 Service 
-m
+s
 Service 
@@ -421,33 +421,33 @@
 vice sService = 
-m
+s
 RestAdapter.crea
@@ -542,33 +542,33 @@
 back) %7B%0A        
-m
+s
 Service.getAllDr
@@ -663,33 +663,33 @@
 back) %7B%0A        
-m
+s
 Service.getDrink
@@ -708,32 +708,37 @@
 llback);%0A    %7D%0A%0A
+    %0A
     public stati
@@ -793,33 +793,33 @@
 back) %7B%0A        
-m
+s
 Service.getAllLi
@@ -922,25 +922,25 @@
 ) %7B%0A        
-m
+s
 Service.getL
@@ -1034,17 +1034,17 @@
         
-m
+s
 RestAdap
@@ -1144,17 +1144,17 @@
         
-m
+s
 Service 
@@ -1155,17 +1155,17 @@
 rvice = 
-m
+s
 RestAdap

Rename some variables