Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
API Manager
package com.myapp.core.data.network;
public class APIManager {
private static APIManager sInstance;
private final AppAPI mApi;
public static APIManager getInstance() {
if (sInstance == null) {
sInstance = new APIManager();
}
return sInstance;
}
private APIManager() {
mApi = ServiceFactory.makeService();
}
/*<-------------Login----------> */
public void loginUser(Login login, RemoteCallback<LoginResponse> listener) {
mApi.loginUser(login).enqueue(listener);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment