Search in sources :

Example 1 with QueryContainerBuilder

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());
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 2 with QueryContainerBuilder

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());
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 3 with QueryContainerBuilder

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);
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 4 with QueryContainerBuilder

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;
    }
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 5 with QueryContainerBuilder

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);
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Aggregations

QueryContainerBuilder (com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)37 Bundle (android.os.Bundle)4 SuppressLint (android.annotation.SuppressLint)1