Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/x

src/request.ts

12 lines · 401 B · TypeScript
import { xRequest } from './client.ts'
import type { XRequestParams } from './client.ts'

/**
 * Call an X API v2 endpoint. Defaults to OAuth. Writes dry-run without confirm: true.
 * @example
 * import request from 'kody:@kody/x/request'
 * const me = await request({ path: '/users/me' })
 */
export default async function requestEntrypoint(params: XRequestParams) {
	return await xRequest(params)
}