package com.groupr.util;

import com.google.api.client.extensions.android.http.AndroidHttp;
import com.google.api.client.extensions.android.json.AndroidJsonFactory;
import com.google.api.client.googleapis.services.AbstractGoogleClientRequest;
import com.google.api.client.googleapis.services.GoogleClientRequestInitializer;
import com.groupr.backend.userApi.UserApi;

import java.io.IOException;

public class UserApiService {
    private static UserApi userApiService = buildCloudEndpoints();

    private static UserApi buildCloudEndpoints() {
        UserApi.Builder builder = new UserApi.Builder(AndroidHttp.newCompatibleTransport(),
                new AndroidJsonFactory(), null)
                .setRootUrl("https://focused-tract-95921.appspot.com/_ah/api/");
        // end options for devappserver

        return builder.build();
    }

    public static UserApi getApiService() {
        return userApiService;
    }
}
