ContactEntry.getUpdated()和ContactEntry.getEdited()之间的区别是什么?

时间:2017-01-30 19:06:18

标签: google-contacts

ContactEntry的Java API文档声明如下:

  • getUpdated():获取表示此资源上次更新的DateTime实例。表示atom:updated元素。
  • getEdited():获取表示上次编辑此条目的DateTime实例。代表app:edited元素。

在我见过的所有例子中,这两个似乎都有相同的时间戳。它们之间有什么区别吗?

1 个答案:

答案 0 :(得分:1)

由于我们讨论的是Contacts API,因此它们是相同的。 API的有线格式使用Atom提要。

他们的技术定义略有不同,两者都包含在内,以兼容标准的Atom Syndication格式和Atom发布协议。

每次编辑Feed项时都会更新

<app:edited>https://tools.ietf.org/html/rfc5023#section-10.2

每次以显着方式编辑Feed项时,

<atom:updated>都会更新:https://tools.ietf.org/html/rfc4287#section-4.2.15

对于联系人,他们要么被编辑,要么不被编辑,因此它们在Contacts API的上下文中表示相同的含义。

相关问题