public Map<String, Object> toFilterMap() {
        final Map<String, Object> filter = new HashMap<>();

        filter.put(FIELD_SORT, sortType);
        filter.put(FIELD_DIRECTION, direction);

        if (assignee != null) {
            filter.put(FILTER_ASSIGNEE, assignee.login());
        }

        if (milestone != null) {
            filter.put(FILTER_MILESTONE,
                    Integer.toString(milestone.number()));
        }

        if (labels != null && !labels.isEmpty()) {
            StringBuilder labelsQuery = new StringBuilder();
            for (Label label : labels) {
                labelsQuery.append(label.name()).append(',');
            }
            filter.put(FILTER_LABELS, labelsQuery.toString());
        }

        if (open) {
            filter.put(FILTER_STATE, STATE_OPEN);
        } else {
            filter.put(FILTER_STATE, STATE_CLOSED);
        }
        return filter;
    }
Create a map of all the request parameters represented by this filter

@return non-null map of filter request parameters
app/src/main/java/com/github/pockethub/android/core/issue/IssueFilter.java