Google Calendar API未使用Google API Explorer删除与会者列表中的与会者

问题描述:

我试图从API日历文件Try It API Explorer上正确使用该工具的Google日历事件中删除一些与会议室资源日历相关的与会者,使用具有超过该日历管理权限的域管理员帐户,Google Calendar API未使用Google API Explorer删除与会者列表中的与会者

我送请求主体从事件中删除两个参加授权,该API的结果是200 OK,但与会者仍然有..

我尝试添加新的参与者或更新其状态,并且它可以正常工作,但不能删除与会者。

任何机构都知道我在这里错过了什么?我也试着采用这种通过气,我遇到同样的问题,但要丢弃任何自编程问题我已经与官方的API试图试试看工具

请求

PATCH 
https://www.googleapis.com/calendar/v3/calendars/supportworld.com.ar_34373XXXXXXXXXXX2%40resource.calendar.google.com/events/osrd3lXXXXXXXolks?fields=attendees%2Cid&key={YOUR_API_KEY} 

Content-Type: application/json 
Authorization: Bearer ya29.bwAXXXXXXXXJOeCUAAADDYWT-QXXXXXXXXXXrc_eGP6Lk7CXXXXXXXXJ6130__ci_-_YXXXXxs 
X-JavaScript-User-Agent: Google APIs Explorer 

{ 
"attendees": [ 
    { 
    "organizer": true, 
    "email": "[email protected]", 
    "responseStatus": "accepted", 
    "displayName": "AAAAAAA" 
    }, 
    { 
    "self": true, 
    "resource": true, 
    "email": "[email protected]om", 
    "responseStatus": "accepted", 
    "displayName": "Cafetera" 
    } 
], 
"id": "osrd3lXXXXXXXolks 
" 
} 

响应

200 OK 

cache-control: no-cache, no-store, max-age=0, must-revalidate 
content-encoding: gzip 
content-length: 294 
content-type: application/json; charset=UTF-8 
date: Thu, 28 Aug 2014 16:15:06 GMT 
etag: "XXXXXXXXX" 
expires: Fri, 01 Jan 1990 00:00:00 GMT 
pragma: no-cache 
server: GSE 

{ 
"id": "osrd3lids0gkoeaggp2c95olks", 
"attendees": [ 
    { 
    "email": "[email protected]", 
    "displayName": "AAAAAAA", 
    "organizer": true, 
    "responseStatus": "accepted" 
    }, 
    { 
    "email": "[email protected]", 
    "displayName": "YYYYYYY", 
    "responseStatus": "accepted" 
    }, 
    { 
    "email": "[email protected]", 
    "displayName": "BBBBBB", 
    "responseStatus": "needsAction" 
    }, 
    { 
    "email": "[email protected]om", 
    "displayName": "Cafetera", 
    "self": true, 
    "resource": true, 
    "responseStatus": "accepted" 
    } 
] 
} 

条目:

{ 
    "email": "[email protected]", 
    "displayName": "YYYYYYY", 
    "responseStatus": "accepted" 
    }, 
    { 
    "email": "[email protected]", 
    "displayName": "BBBBBB", 
    "responseStatus": "needsAction" 
    } 

不应该在那里,但他们是..任何帮助赞赏,

我能够得到它的工作。我认为API浏览器工具存在问题。

具体来说,如果您指定了修补程序主体,那么就有一个结构化编辑器,您可以通过该编辑器为参加者对象添加和删除部分JSON。当我使用结构化编辑器从列表中删除与会者,然后切换到*形式编辑器时,与会者仍然在那里。错误!

住在*形式编辑器中,我再次删除了所需的参加者模块并执行,并且所有事情都按其应有的方式工作。我使用GET在单独的选项卡中验证了与会者确实已被删除。

(要到不同的编辑器,有一个下拉按钮,在补丁正文栏的右上角)。

我有它工作在C#,我想在其他语言,将工作一样的方法。

当我尝试从列表中删除不需要的与会者时,它不起作用。

eventItem.Attendees.Remove(new EventAttendee { Email = "<to be removed>@gmail.com" }); 

我想你已经到了这一步。

但是,当我用另一个列表替换了没有与会者的列表时,该列表起作用了,其他与会者甚至没有收到关于任何更改的通知。

eventItem.Attendees = eventItem.Attendees.Where(a => a.Email != "<to be removed>@gmail.com").ToList(); 

当然是补丁/更新之后。

service.Events.Patch(eventItem, "primary", eventItem.Id).Execute();