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/unfollow-user.ts

14 lines · 595 B · TypeScript
import { unfollowUser } from './client.ts'
import type { XUserActionParams } from './client.ts'

/**
 * Unfollow or dry-run unfollowing an X user; requires confirm: true.
 * @returns Unfollow result, or dry-run request description.
 * @example
 * import unfollowUser from 'kody:@kentcdodds/x/unfollow-user'
 * const preview = await unfollowUser({ username: 'kentcdodds', dryRun: true })
 * // => { dryRun: true, method: 'DELETE', url: '...', requiresConfirm: true }
 */
export default async function unfollowUserEntrypoint(params: XUserActionParams = {}) {
  return await unfollowUser(params)
}