FrontPage

ユーザーAPI/Notification取得

API情報

名称Notification取得
APIバージョン1
認証タイプユーザー認証
URLhttps://(APIサーバー名)/services/api/(アクセスコード)/
MethodPOST
データ形式application/x-www-form-urlencoded

概要

現在時刻より過去に通知時刻が設定されたNotificationを取得する。

パラメーター

引数名必須内容
v1(固定)int定数必須バージョン番号
現在は1
cBu(固定)string定数必須コマンド
Bu = ユーザー認証付きBBAPIを呼び出す
CategoryANU(固定)string定数必須オペレーションカテゴリー
ANU = Application Notification
Operationgsl(固定)string定数必須オペレーション
gsl = GETSUMMARYLISTオペレーション
AppKeyアプリケーションキーstring必須アプリケーションキーペアのアプリケーションキー
UserAuthユーザー認証タイプstring必須userhashbb
uidモバイルダイエットIDstringuidまたはloginidのいずれか必須ユーザーのモバイルダイエットID
loginidログインIDstringuidまたはloginidのいずれか必須ユーザーのログインID
passwordパスワードハッシュ値hash必須sha1(アプリケーションシークレット+パスワード) の値
Formatjson,yaml,xmlstring定数任意出力フォーマット指定
省略時json(またはアプリケーションキー毎に指定のフォーマット)
CharsetUTF-8,SJIS,EUC-JPstring定数任意出力文字コード指定・省略時UTF8
出力フォーマットjson,xml時は常にUTF-8

認証パラメーターAppKey,UserAuth,uid,passwordについては、API認証を参照
出力指定パラメーターFormat,Charsetについては、出力フォーマットを参照

返値

変数名内容
api_resultbooleanAPI実行結果
true:成功 false:失敗
countinteger結果データの数
structarray結果データの配列

結果データの配列

変数名内容
objectidstringNotificationオブジェクトID
sdatestring告知すべき日時
actstring推奨する動作 openurl=URLを開く
messagestring表示メッセージ
urlstring関連するURL
overridestring推奨するオーバーライド処理 true/false

JSONの例

{
	"api_result":true,
	"count":2,
	"struct":[
		{
			"objectid":"ANeae25330e8dc2bc3",
			"sdate":"2014\/03\/23 17:00:00",
			"act":"openurl",
			"message":"\u544a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8N",
			"url":"http:\/\/this.is.test\/mobile\/?c=Z123",
			"override":"true"
		},
		{
			"objectid":"ANeae25330e8dc74db",
			"sdate":"2014\/03\/24 16:00:00",
			"act":"openurl",
			"message":"\u544a\u77e5\u30e1\u30c3\u30bb\u30fc\u30b8A",
			"url":"http:\/\/this.is.test\/mobile\/?c=Q456",
			"override":"true"
		}
	]
}

XMLの例

<?xml version="1.0" encoding="UTF-8"?>
<response>
	<api_result>1</api_result>
	<count>2</count>
	<struct>
		<item>
			<objectid>ANeae25330e8dc2bc3</objectid>
			<sdate>2014/03/23 17:00:00</sdate>
			<act>openurl</act>
			<message>告知メッセージN</message>
			<url>http://this.is.test/mobile/?c=Z123</url>
			<override>true</override>
		</item>
		<item>
			<objectid>ANeae25330e8dc74db</objectid>
			<sdate>2014/03/24 16:00:00</sdate>
			<act>openurl</act>
			<message>告知メッセージA</message>
			<url>http://this.is.test/mobile/?c=Q456</url>
			<override>true</override>
		</item>
	</struct>
</response>

サンプル

PHPサンプル サンプル/PHP/ユーザーAPI/Notification取得

バージョン

このドキュメントのバージョン情報

Version1
Revision1
Editorwest

トップ   差分 履歴 リロード   一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2018-06-22 (金) 08:06:08