跳到主要内容

opensocial.ResponseItem


メソッド​

opensocial.ResponseItem.hadError​

Boolean hadError()

エラーが起きた場合は true 、起きていない場合は falseを返します。

パラメータ​

なし

返り値​
型説明
Booleanエラーが起きているかどうか
サンプル​
if (res.hadError()) {
// ...
} else {
// ...
}

opensocial.ResponseItem.getErrorCode​

String getErrorCode()

エラーがあった場合にエラー コードを返します。エラー コードには opensocia.ResponseItem.Error で定義された値があります。

パラメータ​

なし

返り値​
型説明
Stringエラーコード。エラーが起きていない場合は null
サンプル​
var code = res.getErrorCode();

opensocial.ResponseItem.getErrorMessage​

String getErrorMessage()

エラーが起きた場合にエラーメッセージを返します。

パラメータ​

なし

返り値​
型説明
Stringエラーメッセージ
サンプル​
var msg = res.getErrorMessage();

opensocial.ResponseItem.getOriginalDataRequest​

opensocial.DataRequest getOriginalDataRequest

このレスポンスを取得する際に使用した DataRequest を取得します。

パラメータ​

なし

返り値​
型説明
opensocial.DataRequestレスポンスを取得した際に使用した DataRequest
サンプル​
var req = res.getOriginalDataRequest();

opensocial.ResponseItem.getData​

Object getData()

レスポンスデータを取得します。

パラメータ​

なし

返り値​
型説明
Object型はリクエストによって定義される
サンプル​
var data = res.getData();

opensocial.ResponseItem.Error​

opensocial.ResponseItem.Error.NOT_IMPLEMENTED​

opensocial.ResponseItem.Error.UNAUTHORIZED​

opensocial.ResponseItem.Error.FORBIDDEN​

opensocial.ResponseItem.Error.BAD_REQUEST​

opensocial.ResponseItem.Error.INTERNAL_ERROR​

opensocial.ResponseItem.Error.LIMIT_EXCEEDED​

更新履歴​

  • 2013/03/15
    • ドキュメント移行