Search in sources :

Example 21 with QueryContainerBuilder

use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class CustomSeriesManageBase method getParam.

public Bundle getParam() {
    QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(false);
    queryContainer.putVariable(KeyUtil.arg_mediaId, model.getMediaId());
    queryContainer.putVariable(KeyUtil.arg_listStatus, model.getStatus());
    queryContainer.putVariable(KeyUtil.arg_listScore_raw, model.getScore());
    queryContainer.putVariable(KeyUtil.arg_listNotes, model.getNotes());
    queryContainer.putVariable(KeyUtil.arg_listPrivate, model.isHidden());
    queryContainer.putVariable(KeyUtil.arg_listPriority, model.getPriority());
    queryContainer.putVariable(KeyUtil.arg_listHiddenFromStatusLists, model.isHiddenFromStatusLists());
    // TODO: 2018/03/25 Check if custom lists are enabled and work some magic
    queryContainer.putVariable(KeyUtil.arg_listAdvancedScore, model.getAdvancedScores());
    queryContainer.putVariable(KeyUtil.arg_listCustom, model.getCustomLists());
    queryContainer.putVariable(KeyUtil.arg_listRepeat, model.getRepeat());
    queryContainer.putVariable(KeyUtil.arg_listProgress, model.getProgress());
    queryContainer.putVariable(KeyUtil.arg_listProgressVolumes, model.getProgressVolumes());
    Bundle bundle = new Bundle();
    bundle.putParcelable(KeyUtil.arg_graph_params, queryContainer);
    return bundle;
}
Also used : Bundle(android.os.Bundle) QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 22 with QueryContainerBuilder

use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class BrowseReviewFragment method makeRequest.

/**
 * All new or updated network requests should be handled in this method
 */
@Override
public void makeRequest() {
    QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(true).putVariable(KeyUtil.arg_page, getPresenter().getCurrentPage()).putVariable(KeyUtil.arg_mediaType, mediaType);
    getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
    getViewModel().requestData(KeyUtil.MEDIA_REVIEWS_REQ, getContext());
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 23 with QueryContainerBuilder

use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class MediaStaffFragment 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).putVariable(KeyUtil.arg_page, getPresenter().getCurrentPage());
    getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
    getViewModel().requestData(KeyUtil.MEDIA_STAFF_REQ, getContext());
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 24 with QueryContainerBuilder

use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.

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

Example 25 with QueryContainerBuilder

use of com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class UserOverviewFragment method makeRequest.

/**
 * All new or updated network requests should be handled in this method
 */
@Override
public void makeRequest() {
    QueryContainerBuilder queryContainer = GraphUtil.getDefaultQuery(false).putVariable(KeyUtil.arg_userName, userName).putVariable(KeyUtil.arg_id, userId);
    getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
    getViewModel().requestData(KeyUtil.USER_OVERVIEW_REQ, getContext());
}
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