Skip to content

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

Package listing

@kody/bluesky

src/get-profile.ts

16 lines · 691 B · TypeScript
import { getProfile } from './client.ts'
import type { GetProfileInput } from './types.ts'

/**
 * Read a Bluesky actor profile.
 * @param params.actor - Handle or DID; defaults to `blueskyHandle`.
 * @param params.authenticated - When true, create a session and read via `bsky.social`. Defaults to the public AppView.
 * @returns Profile record from `app.bsky.actor.getProfile`.
 * @example
 * import getProfile from 'kody:@kody/bluesky/get-profile'
 * const result = await getProfile({ actor: 'bsky.app' })
 * // => { did: '...', handle: '...', displayName: '...' }
 */
export default async function getProfileEntrypoint(params: GetProfileInput = {}) {
  return await getProfile(params)
}