메인 콘텐츠로 건너뛰기
X API(구 Twitter API)를 위한 종합적인 TypeScript SDK로, 스마트 페이지네이션, 다양한 인증 방식, 실시간 스트리밍, 완전한 타입 안전성 등 고급 기능을 제공합니다.

주요 기능

  • 🔐 인증: 사용자 컨텍스트(OAuth 1.0a, OAuth 2.0) 및 App 전용(Bearer 토큰) 인증
  • 🔄 페이지네이션: 비동기 이터레이션을 지원하는 자동 페이지네이션
  • 📡 스트리밍: 자동 재연결을 지원하는 이벤트 기반 스트리밍
  • 📚 타입 안정성: 모든 엔드포인트와 매개변수에 대한 완전한 TypeScript 정의
  • 🎯 X API 전체 지원: Users, Posts, Lists, Bookmarks, Communities 등

빠른 시작

quickstart.ts
import { 
  Client, 
  type ClientConfig,
  type UsersGetByUsernameResponse
} from '@xdevplatform/xdk';

const config: ClientConfig = { bearerToken: 'your-bearer-token' };

const client: Client = new Client(config);

async function main(): Promise<void> {
  const userResponse: UsersGetByUsernameResponse = await client.users.getByUsername('XDevelopers');
  const username: string = userResponse.data?.username!;
  console.log(username);
}

main();

다음 단계