← Public packages
@kentcdodds/x
X API v2 helpers for tweets, search, legacy DMs, and encrypted X Chat via a Fly XDK sidecar.
src/follow-user.ts
14 lines · 583 B · TypeScriptimport { followUser } from './client.ts'
import type { XUserActionParams } from './client.ts'
/**
* Follow or dry-run following an X user; requires confirm: true.
* @returns Follow result, or dry-run action payload.
* @example
* import followUser from 'kody:@kentcdodds/x/follow-user'
* const preview = await followUser({ username: 'kentcdodds', dryRun: true })
* // => { dryRun: true, action: 'follow-user', requiresConfirm: true, payload: { ... } }
*/
export default async function followUserEntrypoint(params: XUserActionParams = {}) {
return await followUser(params)
}