Search in sources :

Example 1 with QueryContainerBuilder

use of io.github.wax911.library.model.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.INSTANCE.getDefaultQuery(false).putVariable(KeyUtil.arg_id, modelId).putVariable(KeyUtil.arg_type, likeType);
    presenter.getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
}
Also used : QueryContainerBuilder(io.github.wax911.library.model.request.QueryContainerBuilder)

Example 2 with QueryContainerBuilder

use of io.github.wax911.library.model.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.INSTANCE.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.INSTANCE.makeText(getContext(), R.string.busy_please_wait, Toast.LENGTH_SHORT).show();
            break;
    }
}
Also used : QueryContainerBuilder(io.github.wax911.library.model.request.QueryContainerBuilder)

Example 3 with QueryContainerBuilder

use of io.github.wax911.library.model.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class VoteWidget method setParameters.

private void setParameters(@KeyUtil.ReviewRating String ratingType) {
    QueryContainerBuilder queryContainer = GraphUtil.INSTANCE.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(io.github.wax911.library.model.request.QueryContainerBuilder)

Example 4 with QueryContainerBuilder

use of io.github.wax911.library.model.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class StaffActivity method makeRequest.

@Override
protected void makeRequest() {
    QueryContainerBuilder queryContainer = GraphUtil.INSTANCE.getDefaultQuery(false).putVariable(KeyUtil.arg_id, id);
    getViewModel().getParams().putParcelable(KeyUtil.arg_graph_params, queryContainer);
    getViewModel().requestData(KeyUtil.STAFF_BASE_REQ, getApplicationContext());
}
Also used : QueryContainerBuilder(io.github.wax911.library.model.request.QueryContainerBuilder)

Example 5 with QueryContainerBuilder

use of io.github.wax911.library.model.request.QueryContainerBuilder in project anitrend-app by AniTrend.

the class CharacterOverviewFragment method makeRequest.

@Override
public void makeRequest() {
    QueryContainerBuilder queryContainer = GraphUtil.INSTANCE.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(io.github.wax911.library.model.request.QueryContainerBuilder)

Aggregations

QueryContainerBuilder (io.github.wax911.library.model.request.QueryContainerBuilder)36 Bundle (android.os.Bundle)2 Settings (com.mxt.anitrend.util.Settings)2 Intent (android.content.Intent)1 View (android.view.View)1 LinkAdapter (com.mxt.anitrend.adapter.recycler.detail.LinkAdapter)1 RankAdapter (com.mxt.anitrend.adapter.recycler.detail.RankAdapter)1 ExternalLink (com.mxt.anitrend.model.entity.anilist.ExternalLink)1 MediaRank (com.mxt.anitrend.model.entity.anilist.MediaRank)1 MediaListOptions (com.mxt.anitrend.model.entity.anilist.meta.MediaListOptions)1 MediaBrowseUtil (com.mxt.anitrend.util.media.MediaBrowseUtil)1 MediaBrowseActivity (com.mxt.anitrend.view.activity.detail.MediaBrowseActivity)1