SDK
다양한 언어의 공식 SDK로 ONDA Channel API를 빠르게 연동하세요.
SDK
ONDA Channel API를 더 쉽게 사용할 수 있도록 다양한 프로그래밍 언어의 공식 SDK를 제공합니다.
서버 사이드 SDK (S2S)
서버 간 통신(Server-to-Server)에 최적화된 SDK입니다. OAuth 2.0 토큰 관리와 API 호출을 자동으로 처리합니다.
| 언어 | 패키지 | GitHub |
|---|---|---|
| Node.js / TypeScript | @onda/channel-node | ondame/onda-channel-node |
| Python | onda-channel | ondame/onda-channel-python |
| Java | me.onda:channel-java | ondame/onda-channel-java |
| PHP | onda/channel-php | ondame/onda-channel-php |
| JavaScript (Vanilla) | @onda/channel-js | ondame/onda-channel-js |
클라이언트 사이드 SDK (S2B)
프론트엔드 앱에서 직접 ONDA API를 호출하기 위한 SDK입니다.
| 프레임워크 | 패키지 | GitHub |
|---|---|---|
| React | @onda/channel-react | ondame/onda-channel-react |
| Next.js | @onda/channel-nextjs | ondame/onda-channel-nextjs |
빠른 시작
Node.js
npm install @onda/channel-node
import { OndaChannelClient } from "@onda/channel-node"
const client = new OndaChannelClient({
clientId: process.env.ONDA_CLIENT_ID,
clientSecret: process.env.ONDA_CLIENT_SECRET,
})
const properties = await client.properties.list({ page: 1, size: 20 })
Python
pip install onda-channel
from onda_channel import OndaChannelClient
client = OndaChannelClient(
client_id=os.environ["ONDA_CLIENT_ID"],
client_secret=os.environ["ONDA_CLIENT_SECRET"],
)
properties = client.properties.list(page=1, size=20)
React
npm install @onda/channel-react
import { useProperties } from "@onda/channel-react"
export function PropertyList() {
const { data, isLoading } = useProperties({ page: 1, size: 20 })
if (isLoading) return <div>Loading...</div>
return <ul>{data?.items.map(p => <li key={p.id}>{p.name}</li>)}</ul>
}
SDK 없이 연동하기
SDK 없이도 RESTful API를 직접 호출하여 연동할 수 있습니다.
curl -X GET "https://api.onda.me/channel/v1/properties" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json"
다음 단계
- 첫 API 호출 - API 직접 호출 가이드
- OAuth 2.0 인증 - 토큰 발급 및 관리
- API 레퍼런스 - 전체 API 명세