Skip to content

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

Package listing

@kody/bluesky

src/request.ts

15 lines · 691 B · TypeScript
import { xrpcRequest } from './client.ts'
import type { BlueskyRequestInput } from './types.ts'

/**
 * Call an AT Protocol XRPC method using Bluesky session auth when needed.
 * @param params.nsid - XRPC method NSID such as `app.bsky.actor.getProfile`.
 * @returns Parsed XRPC JSON or a dry-run payload for mutating calls without `confirm: true`.
 * @example
 * import request from 'kody:@kody/bluesky/request'
 * const result = await request({ nsid: 'com.atproto.server.describeServer', authenticated: false })
 * // => { did: '...', availableUserDomains: [...] }
 */
export default async function requestEntrypoint(params: BlueskyRequestInput = {}) {
  return await xrpcRequest(params)
}