GS2-Notification¶
Create Client
notification_client = client('notification')
目次
Method¶
create_notification¶
response = notification_client:create_notification(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
通知を新規作成します
create_subscribe¶
response = notification_client:create_subscribe(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
購読を作成します
Request¶
{
notificationName=string,
endpoint=string,
type=string,
}
- notificationName
- [string] 通知の名前を指定します。
- endpoint
- [string] 通知先
- type
- [string] 通知に利用する方式
delete_notification¶
response = notification_client:delete_notification(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
通知を削除します
Response¶
None
delete_subscribe¶
response = notification_client:delete_subscribe(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
購読を削除します
Request¶
{
notificationName=string,
subscribeId=string,
}
- notificationName
- [string] 通知の名前を指定します。
- subscribeId
- [string] 削除する購読IDを指定します。
Response¶
None
describe_notification¶
response = notification_client:describe_notification(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
通知の一覧を取得します
Request¶
{
pageToken=string,
limit=number,
}
- pageToken
- [string] データの取得を開始する位置を指定するトークン
- limit
- [number] データの取得件数
describe_subscribe¶
response = notification_client:describe_subscribe(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
購読の一覧を取得します
Request¶
{
notificationName=string,
pageToken=string,
limit=number,
}
- notificationName
- [string] 通知の名前を指定します。
- pageToken
- [string] データの取得を開始する位置を指定するトークン
- limit
- [number] データの取得件数
get_notification¶
response = notification_client:get_notification(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
通知を取得します
get_subscribe¶
response = notification_client:get_subscribe(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
購読を取得します
Request¶
{
notificationName=string,
subscribeId=string,
}
- notificationName
- [string] 通知の名前を指定します。
- subscribeId
- [string] 取得する購読IDを指定します。
update_notification¶
response = notification_client:update_notification(request)
if response.isError then
-- エラー処理 --
print(response.statusCode)
print(response.errorMessage)
else
-- 正常処理 --
print(response.result)
end
通知を更新します
Request¶
{
notificationName=string,
description=string,
}
- notificationName
- [string] 通知の名前を指定します。
- description
- [string] 通知の説明
Model¶
Notification¶
- createAt
- [number] 作成日時(エポック秒)
- name
- [string] 通知名
- notificationId
- [string] 通知GRN
- ownerId
- [string] オーナーID
- updateAt
- [number] 最終更新日時(エポック秒)
- description
- [string] 説明文