diff --git a/api_calendar_calendar_event_meeting_chat_delete.go b/api_calendar_calendar_event_meeting_chat_delete.go new file mode 100644 index 00000000..0364c850 --- /dev/null +++ b/api_calendar_calendar_event_meeting_chat_delete.go @@ -0,0 +1,78 @@ +// Code generated by lark_sdk_gen. DO NOT EDIT. +/** + * Copyright 2022 chyroc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package lark + +import ( + "context" +) + +// DeleteCalendarEventMeetingChat 该接口用于以当前身份(应用/用户)解绑已创建的会议群。身份由 Header Authorization 的 Token 类型决定。 +// +// - 日历需要是当前身份的主日历, 且有writer权限 +// - 操作人需要是群主 +// +// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-meeting_chat/delete +func (r *CalendarService) DeleteCalendarEventMeetingChat(ctx context.Context, request *DeleteCalendarEventMeetingChatReq, options ...MethodOptionFunc) (*DeleteCalendarEventMeetingChatResp, *Response, error) { + if r.cli.mock.mockCalendarDeleteCalendarEventMeetingChat != nil { + r.cli.log(ctx, LogLevelDebug, "[lark] Calendar#DeleteCalendarEventMeetingChat mock enable") + return r.cli.mock.mockCalendarDeleteCalendarEventMeetingChat(ctx, request, options...) + } + + req := &RawRequestReq{ + Scope: "Calendar", + API: "DeleteCalendarEventMeetingChat", + Method: "DELETE", + URL: r.cli.openBaseURL + "/open-apis/calendar/v4/calendars/:calendar_id/events/:event_id/meeting_chat", + Body: request, + MethodOption: newMethodOption(options), + NeedTenantAccessToken: true, + NeedUserAccessToken: true, + } + resp := new(deleteCalendarEventMeetingChatResp) + + response, err := r.cli.RawRequest(ctx, req, resp) + return resp.Data, response, err +} + +// MockCalendarDeleteCalendarEventMeetingChat mock CalendarDeleteCalendarEventMeetingChat method +func (r *Mock) MockCalendarDeleteCalendarEventMeetingChat(f func(ctx context.Context, request *DeleteCalendarEventMeetingChatReq, options ...MethodOptionFunc) (*DeleteCalendarEventMeetingChatResp, *Response, error)) { + r.mockCalendarDeleteCalendarEventMeetingChat = f +} + +// UnMockCalendarDeleteCalendarEventMeetingChat un-mock CalendarDeleteCalendarEventMeetingChat method +func (r *Mock) UnMockCalendarDeleteCalendarEventMeetingChat() { + r.mockCalendarDeleteCalendarEventMeetingChat = nil +} + +// DeleteCalendarEventMeetingChatReq ... +type DeleteCalendarEventMeetingChatReq struct { + CalendarID string `path:"calendar_id" json:"-"` // 日历ID, 示例值: "feishu.cn_xxx@group.calendar.feishu.cn" + EventID string `path:"event_id" json:"-"` // 日程ID, 示例值: "75d28f9b-e35c-4230-8a83-123_0" + MeetingChatID string `query:"meeting_chat_id" json:"-"` // 会议群ID, 示例值: oc_xxx +} + +// DeleteCalendarEventMeetingChatResp ... +type DeleteCalendarEventMeetingChatResp struct { +} + +// deleteCalendarEventMeetingChatResp ... +type deleteCalendarEventMeetingChatResp struct { + Code int64 `json:"code,omitempty"` // 错误码, 非 0 表示失败 + Msg string `json:"msg,omitempty"` // 错误描述 + Data *DeleteCalendarEventMeetingChatResp `json:"data,omitempty"` +}