API 문서
HTTP로 게시하고 수정할 수 있습니다. 아래는 짧은 예입니다. example.com 을 자신의 사이트로 바꾸세요.
REST
curl -X POST https://example.com/api/articles \
-H 'content-type: application/json' \
-d '{"title":"Hello","content":"Markdown here"}'응답에는 url, edit_url, edit_key가 들어 있습니다. 수정은 PUT /api/articles/:slug, 삭제는 DELETE이며 둘 다 edit_key가 필요합니다.
curl -X PUT https://example.com/api/articles/your-slug \
-H 'content-type: application/json' \
-d '{"edit_key":"YOUR_KEY","title":"Hello","content":"Updated text"}'
CLI
curl -X POST -d 'text=Hello' https://example.com/api/new
cat file.md | curl -F 'text=<-' https://example.com/api/new
?format=json
Telegraph 호환 일부
기존 스크립트의 주소를 /telegraph 로 두세요. 지원: createAccount, createPage, editPage, getPage, getPageList, getAccountInfo. api.telegra.ph 의 완전한 복제는 아닙니다.
텔레그램 봇
제목, --- 가 있는 줄, 그다음 본문을 보냅니다. 이미지 업로드가 켜져 있으면 사진도 게시할 수 있습니다.
브라우저 확장
Chrome 또는 Edge에서 압축 해제된 extension/ 폴더를 불러온 뒤 사이트 주소를 넣으세요.