use of com.willshex.blogwt.shared.api.user.call.FollowUsersResponse in project blogwt by billy1380.
the class UserService method followUsers.
public Request followUsers(FollowUsersRequest input, AsyncSuccess<FollowUsersRequest, FollowUsersResponse> onSuccess, AsyncFailure<FollowUsersRequest> onFailure) {
Request handle = null;
try {
handle = sendRequest(UserMethodFollowUsers, input, new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
try {
FollowUsersResponse outputParameter = new FollowUsersResponse();
parseResponse(response, outputParameter);
if (onSuccess != null) {
onSuccess.call(input, outputParameter);
}
onCallSuccess(UserService.this, UserMethodFollowUsers, input, outputParameter);
} catch (JSONException | HttpException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
}
@Override
public void onError(Request request, Throwable exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
});
onCallStart(UserService.this, UserMethodFollowUsers, input, handle);
} catch (RequestException exception) {
if (onFailure != null) {
onFailure.call(input, exception);
}
onCallFailure(UserService.this, UserMethodFollowUsers, input, exception);
}
return handle;
}
Aggregations