多个事件的Gmail标记

时间:2015-04-27 20:59:44

标签: gmail google-calendar-api schema.org google-schemas

我正在使用json-ld开发事件标记,以包含在确认电子邮件中。

我的一些活动定期重复发生。但是,最新的Schema.org规范不支持重复发生的事件,因此我遵循了此处提供的建议:http://lists.w3.org/Archives/Public/public-vocabs/2011Dec/0062.html并决定嵌入个别事件的json列表。

json-ld通过谷歌(https://www.google.com/webmasters/markup-tester/u/0/)提供的电子邮件标记测试程序中的测试。

但是,当我通过向自己发送电子邮件来测试Google日历集成时,系列中只有6个事件出现在我的日历中(奇怪的是,它不是列表中的第一个或最后一个事件)

gmail标记是否支持同一封电子邮件中的多个事件?如果是这样,有更好的方法吗?

示例标记:

<script type="application/ld+json">
[
  {
    "reservationNumber": "7e15afb6b2485005e55481be58de4141b70f85006bd25823", 
    "reservationFor": {
      "startDate": "2015-05-09T16:00:00-07:00", 
      "endDate": "2015-05-09T22:30:00-07:00", 
      "description": "regularly schedule XXXX", 
      "location": {
        "address": {
          "addressCountry": "US", 
          "addressLocality": "XXX", 
          "addressRegion": "XXX", 
          "streetAddress": "XXX", 
          "postalCode": "XXX", 
          "@type": "PostalAddress"
        }, 
        "@type": "Place", 
        "name": "XXX"
      }, 
      "@type": "Event", 
      "name": "XXX Every 2 Weeks"
    }, 
    "modifyReservationUrl": "https://example.com/XXX", 
    "reservationStatus": "http://schema.org/Confirmed", 
    "underName": {
      "@type": "Person", 
      "name": "XXX"
    }, 
    "@context": "http://schema.org", 
    "@type": "EventReservation"
  }, 

  ...

  {
    "reservationNumber": "40553edbce52f0052e153919a4dad49ec32516c15433bf4a", 
    "reservationFor": {
      "startDate": "2015-05-23T16:00:00-07:00", 
      "endDate": "2015-05-23T22:30:00-07:00", 
      "description": "regularly schedule XXX", 
      "location": {
        "address": {
          "addressCountry": "US", 
          "addressLocality": "XXX", 
          "addressRegion": "XXX", 
          "streetAddress": "XXX", 
          "postalCode": "XXX", 
          "@type": "PostalAddress"
        }, 
        "@type": "Place", 
        "name": "XXX"
      }, 
      "@type": "Event", 
      "name": "XXX Every 2 Weeks"
    }, 
    "modifyReservationUrl": "https://example.com/XXX", 
    "reservationStatus": "http://schema.org/Confirmed", 
    "underName": {
      "@type": "Person", 
      "name": "XXX"
    }, 
    "@context": "http://schema.org", 
    "@type": "EventReservation"
  }, 
]
</script>

2 个答案:

答案 0 :(得分:0)

您可以尝试使用文档here中提到的快速应用脚本教程在html文件中添加此标记。

答案 1 :(得分:0)

制作列表有帮助:https://schema.org/ItemList

Haven没有对此进行测试,但这可能是一种有用的方法。