People API在传递日期对象时没有创建生日



我想创建一个联系人,我需要在生日日历中创建条目。因此,我使用people API来创建生日日期

我遵循这个文档https://developers.google.com/people/api/rest/v1/people#Person.Birthday

点击这里打开API构建器

personFields设置为

names,birthdays,phoneNumbers,memberships

我将person对象作为

传递
{
"phoneNumbers": [
{
"type": "work",
"value": "(266) 581-6706"
}
],
"names": [
{
"unstructuredName": "Bradley"
}
],
"birthdays": [
{
"date": {
"year": 2012,
"month": 10,
"day": 13
}
}
],
"memberships": [
{
"contactGroupMembership": {
"contactGroupResourceName": "contactGroups/myContacts"
}
}
]
}

但是API确实用"text": "10/13/2021"创建了一个日期,这是没有用的,因为这个方法不会在生日日历中创建条目。我期望传递日期对象。谁能告诉我,我是否错过了什么?

curl --request POST 
'https://people.googleapis.com/v1/people:createContact?personFields=names%2Cbirthdays%2CphoneNumbers%2Cmemberships&key=[YOUR_API_KEY]' 
--header 'Authorization: Bearer [YOUR_ACCESS_TOKEN]' 
--header 'Accept: application/json' 
--header 'Content-Type: application/json' 
--data '{"phoneNumbers":[{"type":"work","value":"(266) 581-6706"}],"names":[{"unstructuredName":"Bradley"}],"birthdays":[{"date":{"year":2012,"month":10,"day":13}}],"memberships":[{"contactGroupMembership":{"contactGroupResourceName":"contactGroups/myContacts"}}]}' 
--compressed

有一个影响生日设置的新bug

我建议你"星"这是为了增加可见性,所以它有望更快地修复。

相关内容

  • 没有找到相关文章

最新更新