Search in sources :

Example 31 with QueryContainerBuilder

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

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

Example 32 with QueryContainerBuilder

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

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

Example 33 with QueryContainerBuilder

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

the class MediaFavouriteFragment 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, userId).putVariable(KeyUtil.arg_page, getPresenter().getCurrentPage());
    getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
    getViewModel().requestData(Objects.equals(mediaType, KeyUtil.ANIME) ? KeyUtil.USER_ANIME_FAVOURITES_REQ : KeyUtil.USER_MANGA_FAVOURITES_REQ, getContext());
}
Also used : QueryContainerBuilder(com.mxt.anitrend.model.entity.container.request.QueryContainerBuilder)

Example 34 with QueryContainerBuilder

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

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

Example 35 with QueryContainerBuilder

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

the class MediaRelationFragment 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_RELATION_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