package com.afrozaar.wordpress.wpapi.v2.request;

import com.google.common.collect.ImmutableMap;

import java.util.List;
import java.util.Map;

public class SearchRequest extends Request {

    public SearchRequest(String uri, Map<String, List<String>> params) {
        super(uri, params);
    }

    public static SearchRequest posts() {
        return new SearchRequest(Request.POSTS, ImmutableMap.<String, List<String>>of());
    }

}

@@ -91,16 +91,41 @@
 leMap;%0A%0A
+import java.util.Arrays;%0A
 import j
@@ -377,12 +377,17 @@
 urn 
-new 
+Builder.a
 Sear
@@ -400,36 +400,522 @@
 est(
-Request.POSTS, Immutable
+).build();%0A    %7D%0A%0A    public static class Builder %7B%0A        ImmutableMap.Builder%3CString, List%3CString%3E%3E paramBuilder = new ImmutableMap.Builder%3C%3E();%0A        String uri = Request.POSTS;%0A%0A        private Builder() %7B%0A        %7D%0A%0A        public static Builder aSearchRequest() %7B%0A            return new Builder();%0A        %7D%0A%0A        public Builder withParam(String key, String... values) %7B%0A            paramBuilder.put(key, Arrays.asList(values));%0A            return this;%0A        %7D%0A%0A        public Builder withParams(
 Map
-.
 %3CStr
@@ -936,20 +936,453 @@
 ng%3E%3E
-of());%0A    %7D%0A
+ params) %7B%0A            this.paramBuilder.putAll(params);%0A            return this;%0A        %7D%0A%0A        public Builder withUri(String uri) %7B%0A            this.uri = uri;%0A            return this;%0A        %7D%0A%0A        public Builder but() %7B%0A            return aSearchRequest().withParams(paramBuilder.build()).withUri(uri);%0A        %7D%0A%0A        public SearchRequest build() %7B%0A            return new SearchRequest(uri, paramBuilder.build());%0A        %7D%0A    %7D
 %0A%7D%0A

Add a builder for SearchRequest.