You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package com.community.pocket.data.main.visitor;
|
|
|
|
|
|
|
|
import androidx.lifecycle.MutableLiveData;
|
|
|
|
|
|
|
|
import com.community.pocket.R;
|
|
|
|
import com.community.pocket.ui.main.ui.visitor.my.VisitorMyResponse;
|
|
|
|
import com.community.pocket.util.HttpRequest;
|
|
|
|
import com.community.pocket.util.HttpUtil;
|
|
|
|
import com.community.pocket.util.SimpleHttpParse;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 我的访客请求接口
|
|
|
|
*/
|
|
|
|
public class VisitorMyRequest {
|
|
|
|
private static volatile VisitorMyRequest instance;
|
|
|
|
|
|
|
|
private VisitorMyRequest() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public static VisitorMyRequest getInstance() {
|
|
|
|
if (instance == null) {
|
|
|
|
instance = new VisitorMyRequest();
|
|
|
|
}
|
|
|
|
return instance;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 加载我的访客
|
|
|
|
*/
|
|
|
|
@HttpRequest("/visitor/my")
|
|
|
|
public void loadMy(MutableLiveData<VisitorMyResponse> liveData) {
|
|
|
|
HttpUtil.getRequest(HttpUtil.Method.GET,
|
|
|
|
new SimpleHttpParse<VisitorMyResponse>(liveData, R.string.load_visitor_my_ok, R.string.load_visitor_my_fail).getInterface(VisitorMyResponse.class));
|
|
|
|
}
|
|
|
|
}
|