// Path: library/src/main/java/org/mariotaku/restfu/http/Endpoint.java
// public class Endpoint {
// 
//     @NotNull
//     private String url;
// 
//     @NotNull
//     public String getUrl() {
//         return url;
//     }
// 
//     public Endpoint(@NotNull String url) {
//         this.url = url;
//     }
// 
//     public static String constructUrl(@NotNull String endpoint, @NotNull RestRequest restRequest) {
//         return constructUrl(endpoint, restRequest.getPath(), restRequest.getQueries());
//     }
// 
//     public String construct(String path, MultiValueMap<String> queries) {
//         return constructUrl(url, path, queries);
//     }
// 
//     public String construct(String path, String[]... queries) {
//         MultiValueMap<String> map = new MultiValueMap<>();
//         for (String[] query : queries) {
//             if (query.length != 2) throw new IllegalArgumentException();
//             map.add(query[0], query[1]);
//         }
//         return constructUrl(url, path, map);
//     }
// 
//     public boolean checkEndpoint(String that) {
//         return that != null && that.startsWith(url);
//     }
// 
//     public static String constructUrl(String endpoint, String path, MultiValueMap<String> queries) {
//         if (endpoint == null) throw new NullPointerException("Endpoint is null");
//         final StringBuilder urlBuilder = new StringBuilder();
//         if (endpoint.charAt(endpoint.length() - 1) == '/') {
//             urlBuilder.append(endpoint.substring(0, endpoint.length() - 1));
//         } else {
//             urlBuilder.append(endpoint);
//         }
//         if (path != null) {
//             if (path.charAt(0) != '/') {
//                 urlBuilder.append('/');
//             }
//             urlBuilder.append(path);
//         }
//         return constructUrl(urlBuilder.toString(), queries);
//     }
// 
//     public static String constructUrl(String url, String[]... queries) {
//         MultiValueMap<String> map = new MultiValueMap<>();
//         for (String[] query : queries) {
//             if (query.length != 2) throw new IllegalArgumentException();
//             map.add(query[0], query[1]);
//         }
//         return constructUrl(url, map);
//     }
// 
//     public static String constructUrl(String url, MultiValueMap<String> queries) {
//         if (queries == null || queries.isEmpty()) return url;
//         final StringBuilder urlBuilder = new StringBuilder(url);
//         urlBuilder.append('?');
//         int numAdded = RestFuUtils.append(urlBuilder, queries, Charset.forName("UTF-8"));
//         if (numAdded == 0) return url;
//         return urlBuilder.toString();
//     }
// 
// }


import org.mariotaku.restfu.http.Endpoint;
package org.mariotaku.restfu.oauth;


/**
 * Created by mariotaku on 15/2/6.
 */
public class OAuthEndpoint extends Endpoint {
    private final String signUrl;

    public OAuthEndpoint(String url) {
        this(url, url);
    }

    public OAuthEndpoint(String url, String signUrl) {
// Path: library/src/main/java/org/mariotaku/restfu/http/Endpoint.java
// public class Endpoint {
// 
//     @NotNull
//     private String url;
// 
//     @NotNull
//     public String getUrl() {
//         return url;
//     }
// 
//     public Endpoint(@NotNull String url) {
//         this.url = url;
//     }
// 
//     public static String constructUrl(@NotNull String endpoint, @NotNull RestRequest restRequest) {
//         return constructUrl(endpoint, restRequest.getPath(), restRequest.getQueries());
//     }
// 
//     public String construct(String path, MultiValueMap<String> queries) {
//         return constructUrl(url, path, queries);
//     }
// 
//     public String construct(String path, String[]... queries) {
//         MultiValueMap<String> map = new MultiValueMap<>();
//         for (String[] query : queries) {
//             if (query.length != 2) throw new IllegalArgumentException();
//             map.add(query[0], query[1]);
//         }
//         return constructUrl(url, path, map);
//     }
// 
//     public boolean checkEndpoint(String that) {
//         return that != null && that.startsWith(url);
//     }
// 
//     public static String constructUrl(String endpoint, String path, MultiValueMap<String> queries) {
//         if (endpoint == null) throw new NullPointerException("Endpoint is null");
//         final StringBuilder urlBuilder = new StringBuilder();
//         if (endpoint.charAt(endpoint.length() - 1) == '/') {
//             urlBuilder.append(endpoint.substring(0, endpoint.length() - 1));
//         } else {
//             urlBuilder.append(endpoint);
//         }
//         if (path != null) {
//             if (path.charAt(0) != '/') {
//                 urlBuilder.append('/');
//             }
//             urlBuilder.append(path);
//         }
//         return constructUrl(urlBuilder.toString(), queries);
//     }
// 
//     public static String constructUrl(String url, String[]... queries) {
//         MultiValueMap<String> map = new MultiValueMap<>();
//         for (String[] query : queries) {
//             if (query.length != 2) throw new IllegalArgumentException();
//             map.add(query[0], query[1]);
//         }
//         return constructUrl(url, map);
//     }
// 
//     public static String constructUrl(String url, MultiValueMap<String> queries) {
//         if (queries == null || queries.isEmpty()) return url;
//         final StringBuilder urlBuilder = new StringBuilder(url);
//         urlBuilder.append('?');
//         int numAdded = RestFuUtils.append(urlBuilder, queries, Charset.forName("UTF-8"));
//         if (numAdded == 0) return url;
//         return urlBuilder.toString();
//     }
// 
// }


// Path: oauth/src/main/java/org/mariotaku/restfu/oauth/OAuthEndpoint.java
import org.mariotaku.restfu.http.Endpoint;

package org.mariotaku.restfu.oauth;


/**
 * Created by mariotaku on 15/2/6.
 */
public class OAuthEndpoint extends Endpoint {
    private final String signUrl;

    public OAuthEndpoint(String url) {
        this(url, url);
    }

    public OAuthEndpoint(String url, String signUrl) {
        super(url);