我正在尝试测试从电子邮件中触发 Google Now 卡,然后使用 modifiedTime 属性更新时间。这是我对触发初始 Google Now 卡的初始电子邮件的标记(它正在工作):
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Test Person"
},
"reservationFor": {
"@type": "Event",
"name": "Test Event",
"startDate": "2015-05-19T16:00:00-05:00",
"location": {
"@type": "Place",
"name": "Your Home",
"address": {
"@type": "PostalAddress",
"streetAddress": "111 Main Street",
"addressLocality": "Columbus",
"addressRegion": "OH",
"postalCode": "43215",
"addressCountry": "US"
}
}
},
"modifyReservationUrl": "http://www.test.com/testing"
}
</script>
<div>Test Appointment</div>
</body>
</html>
这是我用来尝试更新 Google Now 卡片以反映时间变化的后续电子邮件(它没有效果):
<html>
<body>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "EventReservation",
"reservationNumber": "E123456789",
"reservationStatus": "http://schema.org/Confirmed",
"underName": {
"@type": "Person",
"name": "Test Person"
},
"reservationFor": {
"@type": "Event",
"name": "Test Event",
"startDate": "2015-05-19T16:00:00-05:00",
"location": {
"@type": "Place",
"name": "Your Home",
"address": {
"@type": "PostalAddress",
"streetAddress": "111 Main Street",
"addressLocality": "Columbus",
"addressRegion": "OH",
"postalCode": "43215",
"addressCountry": "US"
}
}
},
"modifyReservationUrl": "http://www.test.com/testing",
"modifiedTime": "2015-05-19T18:00:00-05:00"
}
</script>
<div>Test Appointment Changed</div>
</body>
</html>
根据此处的文档:https ://developers.google.com/gmail/markup/reference/event-reservation#update_a_event 我读到“您可以通过发送更新的事件预订并将 modifiedTime 设置为时间来更新事件预订的更新。”,两封电子邮件之间的唯一区别是电子邮件的正文以及我在第二封邮件中包含 modifiedTime 的事实。
一些额外的背景信息: 1. 我在发送之前在这里验证了我的标记:https: //www.google.com/webmasters/markup-tester 2. 我正在使用 Gmail 操作示例应用程序发送我的测试电子邮件:http: //gmail-actions.appspot.com/