インタフェース Communicator
- 既知の実装クラスのリスト:
HttpCommunicator
public interface Communicator
-
メソッドの概要
修飾子とタイプ メソッド 説明 <T> T
get(@NonNull com.google.api.client.http.GenericUrl genericUrl, @NonNull Class<T> responseClass)
Sends a Get request to the request URL.<T> List<T>
getAsList(@NonNull com.google.api.client.http.GenericUrl genericUrl, @NonNull Class<T> responseClass)
Sends a Get request to the request URL.
-
メソッドの詳細
-
get
<T> T get(@NonNull @NonNull com.google.api.client.http.GenericUrl genericUrl, @NonNull @NonNull Class<T> responseClass)Sends a Get request to the request URL.The response will be parsed into the response type specified as the second argument and returned.
- 型パラメータ:
T
- The response type- パラメータ:
genericUrl
- The request url objectresponseClass
- The response class- 戻り値:
- The JSON response
- 例外:
NullPointerException
- ifnull
is passed as an argument
-
getAsList
<T> List<T> getAsList(@NonNull @NonNull com.google.api.client.http.GenericUrl genericUrl, @NonNull @NonNull Class<T> responseClass)Sends a Get request to the request URL.The response will be parsed into the list of response type specified as the second argument and returned.
- 型パラメータ:
T
- The response type- パラメータ:
genericUrl
- The request url objectresponseClass
- The response class- 戻り値:
- The JSON responses as list
- 例外:
NullPointerException
- ifnull
is passed as an argument
-