@ohhi3368/zeta-illegally-use
v0.0.1
Published
A simple Node.js package to fetch data from Zeta, which is an AI role-playing platform.
Maintainers
Readme
Fetch Zeta's API
제타 API를 쌔벼와서 편하게 쓸 수 있게 바꿔준 라이브러리입니다 😂😂😂
필요한거
- 인공 뇌 (CPU)
- 치매 안걸리게 해주는 장치 (RAM)
- 인터넷
- NodeJS
이걸로 할 수 있는 짓거리들 (사용 가능한 기능들)
- [x]
fetchPlot(id)— 플롯 통째로 긁어오기 (토큰 없어도 공개 플롯은 됨) - [x]
fetchMessages(roomId, { token, limit, cursor })— 채팅방 메시지 한 페이지씩 - [x]
fetchAllMessages(roomId, { token })— 커서 자동으로 타고 끝까지 전부 - [x] 캐릭터 / 챗프로필 (
plot.characters,plot.chatProfiles) - [x] 소개글 (
plot.about,plot.description.short/long) - [x] 인트로 (
plot.intros) — 텍스트 · 이미지 · 인포박스 다 분해됨 - [x] 예시 대화 (
plot.conversations) - [x] 로어북 + 항목별 키워드/내용 (
plot.lorebooks) - [x] 제작자 정보 (
plot.creator), 해시태그, 조회수/상호작용 수 - [x] 인포박스 설정 (
plot.infoBoxSetting), CYOA 설정 (plot.cyoaSetting) - [x] 메시지에서 텍스트/이미지만 골라내기 (
message.texts,message.images) - [x] 보이스 (
message.voice), 북마크, 수정 여부 같은 메타데이터 - [x] 날짜는 전부
Date객체로 변환됨 (createdAt,messageTime등) - [x] 에러는
ZetaApiError(status,code,message)로 던져줌 - [x]
signal로 요청 취소 가능 - [x] 결과 객체는 전부
Object.freeze— 실수로 못 건드림 - [x] 타입 정의 다 들어있음 (
RawPlot,RawRoomMessage등 원본 응답 타입까지)
다 읽기 전용이긴 한데 나중에 플롯 만들기나 대화 시작 같은 작업도 할 수 있으면 해볼듯
설치
npm install @ohhi3368/zeta-illegally-fetch예시
const { fetchPlot } = require("@ohhi3368/zeta-illegally-fetch");
async function main() {
const plot = await fetchPlot("519ac4e3-4c90-4759-b784-84b5f15fc665");
console.log("제목 : " + plot.name); // 제목 : 스무 번째 별자리와 나침반
console.log("등장인물들 : " + plot.characters.map(c => c.name).join(", ")); // 등장인물들 : 아스텔라 폰 슈테인
console.log("소개 : " + plot.about.contents[0].content.substr(0, 5) + "..."); //소개 : # 읽기 !...
}
main();결론
역시 스캐터랩이라 그런가 보안이 이루다급?!?!?!
