export type DeleteApiV3BlogsBlogIdPostsPostIdCommentsCommentIdArgs = {blogId: string, postId: string, commentId: string}; export type DeleteApiV3BlogsBlogIdPostsPostIdCommentsCommentIdOptions = {baseUrl?: string | undefined, Oauth2?: string | undefined, Oauth2c?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes a comment by blog id, post id and comment id. * * DELETE /v3/blogs/{blogId}/posts/{postId}/comments/{commentId} */ export const deleteApiV3BlogsBlogIdPostsPostIdCommentsCommentId = async (args: DeleteApiV3BlogsBlogIdPostsPostIdCommentsCommentIdArgs, options?: DeleteApiV3BlogsBlogIdPostsPostIdCommentsCommentIdOptions) => { const {baseUrl = "https://blogger.googleapis.com", fetch: fetchFn = fetch, Oauth2, Oauth2c} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (Oauth2 !== undefined) headers.set('authorization', `Bearer ${Oauth2}`) if (Oauth2c !== undefined) headers.set('authorization', `Bearer ${Oauth2c}`) const url = `${baseUrl.replace(/\/+$/, '')}/v3/blogs/${encodeURIComponent(String(args.blogId))}/posts/${encodeURIComponent(String(args.postId))}/comments/${encodeURIComponent(String(args.commentId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };