ユーザーAPI/Notification取得
| 名称 | Notification取得 |
|---|---|
| APIバージョン | 1 |
| 認証タイプ | ユーザー認証 |
| URL | https://(APIサーバー名)/services/api/(アクセスコード)/ |
| Method | POST |
| データ形式 | application/x-www-form-urlencoded |
現在時刻より過去に通知時刻が設定されたNotificationを取得する。
| 引数名 | 値 | 型 | 必須 | 内容 |
| v | 1(固定) | int定数 | 必須 | バージョン番号 現在は1 |
| c | Bu(固定) | string定数 | 必須 | コマンド Bu = ユーザー認証付きBBAPIを呼び出す |
| Category | ANU(固定) | string定数 | 必須 | オペレーションカテゴリー ANU = Application Notification |
| Operation | gsl(固定) | string定数 | 必須 | オペレーション gsl = GETSUMMARYLISTオペレーション |
| AppKey | アプリケーションキー | string | 必須 | アプリケーションキーペアのアプリケーションキー |
| UserAuth | ユーザー認証タイプ | string | 必須 | userhashbb |
| uid | モバイルダイエットID | string | uidまたはloginidのいずれか必須 | ユーザーのモバイルダイエットID |
| loginid | ログインID | string | uidまたはloginidのいずれか必須 | ユーザーのログインID |
| password | パスワードハッシュ値 | hash | 必須 | sha1(アプリケーションシークレット+パスワード) の値 |
| Format | json,yaml,xml | string定数 | 任意 | 出力フォーマット指定 省略時json(またはアプリケーションキー毎に指定のフォーマット) |
| Charset | UTF-8,SJIS,EUC-JP | string定数 | 任意 | 出力文字コード指定・省略時UTF8 出力フォーマットjson,xml時は常にUTF-8 |
認証パラメーターAppKey,UserAuth,uid,passwordについては、API認証を参照
出力指定パラメーターFormat,Charsetについては、出力フォーマットを参照
| 変数名 | 型 | 内容 |
| api_result | boolean | API実行結果 true:成功 false:失敗 |
| count | integer | 結果データの数 |
| struct | array | 結果データの配列 |
結果データの配列
| 変数名 | 型 | 内容 |
| objectid | string | NotificationオブジェクトID |
| sdate | string | 告知すべき日時 |
| act | string | 推奨する動作 openurl=URLを開く |
| message | string | 表示メッセージ |
| url | string | 関連するURL |
| override | string | 推奨するオーバーライド処理 true/false |
{
"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 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取得
このドキュメントのバージョン情報
| Version | 1 |
| Revision | 1 |
| Editor | west |