audrey_jin
(audrey_jin)
15.Сентябрь.2023 22:05:02
1
Я изучал Discourse API Docs , чтобы создать новый пост, но не нашел поля для создания ответа-шепота (видимого только некоторым пользователям). Не мог бы кто-нибудь помочь с этим? Спасибо!!
Lilly
(Lillian )
15.Сентябрь.2023 22:13:40
2
Полагаю, нужная вам информация находится в этой теме
post_type shouldn’t be needed. If it has a topic_id it knows it is a post and not a new topic. This is how I’m doing it with curl:
curl -i -sS -X POST "http://localhost:3000/posts.json" \
-H "Content-Type: multipart/form-data;" \
-H "Api-Key: 079fb2bb12d3b436bb11bde8eb58aaa9a36560fa7d79b14b3087aa40b1ebc2c4" \
-H "Api-Username: blake.erickson" \
-F "raw=92d2e4a938f8d2c65e3fbbcf68e4c272 374f11b3488a03d5d299e862003b09a3 76cdef8f63901f150f2bbf5579cd0b22" \
-F "topic_id=11" \
-F "whisper=true…
Также рекомендую ознакомиться с этой темой:
Discourse API
Please view the Discourse API Documentation site for detailed info:
https://docs.discourse.org
Authentication
API requests must use HTTP header based authentication. Pass your Api-Key and Api-Username as HTTP headers. Authentication via query parameters or request body is not supported (this was removed in April 2020). Please see the example cURL request below.
The only API endpoints that continue to support credentials in query parameters are requests to…