クラス UrlResolver

java.lang.Object
org.thinkit.api.gateway.github.util.UrlResolver

public final class UrlResolver
extends Object
The class that provides the URL generation process.

It provides methods for several patterns in generating URLs. For example, if you do not need to bind specific information to the API URL or specify a query string, you can simply call #createUrl(GithubApi) to get the URL object for calling the API.

If you need to bind specific information to an API URL, call #createUrl(GithubApi, List) , or if you need to specify a query string for an API URL, call #createUrl(GithubApi, Map) . If you want to bind specific information to the URL and also specify a query string, call createUrl(GithubApi, Map, List) .

導入されたバージョン:
1.0.0
  • メソッドの詳細

    • createUrl

      public static com.google.api.client.http.GenericUrl createUrl​(@NonNull @NonNull GithubApi githubApi, @NonNull @NonNull Map<String,​Object> queries, @NonNull @NonNull List<String> binds)
      Returns an API URL object based on the Enum element of GithubApi and query data and bind data passed as arguments.

      The query data defined in the Map will be generated in the format ?key1=value1&key2=value2&... .

      The bind data passed as an argument will be replaced with the string defined as "%s" in the API URL using String.format(String, Object...) .

      パラメータ:
      githubApi - The GitHub API
      queries - The query data
      binds - The bind data
      戻り値:
      The API URL
      例外:
      NullPointerException - If null is passed as an argument