Skip to content
← Public packages

@kentcdodds/x

X API v2 helpers for tweets, search, legacy DMs, and encrypted X Chat via a Fly XDK sidecar.

src/unlike-post.ts

14 lines · 562 B · TypeScript
import { unlikePost } from './client.ts'
import type { XPostActionParams } from './client.ts'

/**
 * Unlike or dry-run unliking an X post; requires confirm: true.
 * @returns Unlike result, or dry-run request description.
 * @example
 * import unlikePost from 'kody:@kentcdodds/x/unlike-post'
 * const preview = await unlikePost({ id: '123', dryRun: true })
 * // => { dryRun: true, method: 'DELETE', url: '...', requiresConfirm: true }
 */
export default async function unlikePostEntrypoint(params: XPostActionParams = {}) {
	return await unlikePost(params)
}