use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.
the class CharacterOverviewFragment method makeRequest.
@Override
public void makeRequest() {
QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(false).putVariable(KeyUtil.arg_id, id);
getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
getViewModel().requestData(KeyUtil.CHARACTER_OVERVIEW_REQ, getContext());
}
use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.
the class MediaOverviewFragment method makeRequest.
/**
* All new or updated network requests should be handled in this method
*/
@Override
public void makeRequest() {
QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(isPager).putVariable(KeyUtil.arg_id, mediaId).putVariable(KeyUtil.arg_type, mediaType);
getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
getViewModel().requestData(KeyUtil.MEDIA_OVERVIEW_REQ, getContext());
}
use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.
the class FavouriteWidget method setRequestParams.
public void setRequestParams(@KeyUtil.LikeType String likeType, long modelId) {
QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(false).putVariable(KeyUtil.arg_id, modelId).putVariable(KeyUtil.arg_type, likeType);
presenter.getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
}
use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.
the class FollowStateWidget method onClick.
@Override
public void onClick(View view) {
switch(view.getId()) {
case R.id.widget_flipper:
if (binding.widgetFlipper.getDisplayedChild() == WidgetPresenter.CONTENT_STATE) {
binding.widgetFlipper.showNext();
QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(false).putVariable(KeyUtil.arg_userId, model.getId());
presenter.getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
presenter.requestData(KeyUtil.MUT_TOGGLE_FOLLOW, getContext(), this);
} else
NotifyUtil.makeText(getContext(), R.string.busy_please_wait, Toast.LENGTH_SHORT).show();
break;
}
}
use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.
the class VoteWidget method setParameters.
private void setParameters(@KeyUtil.ReviewRating String ratingType) {
QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(false).putVariable(KeyUtil.arg_id, model.getId()).putVariable(KeyUtil.arg_rating, ratingType);
presenter.getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
presenter.requestData(KeyUtil.MUT_RATE_REVIEW, getContext(), this);
}
Aggregations