audrey_jin
(audrey_jin)
Septembre 15, 2023, 10:05
1
Je regardais Discourse API Docs pour créer un nouveau message, mais je n’ai pas vu de champ pour faire la réponse en mode “whisper” (visible uniquement par certains utilisateurs), quelqu’un peut-il m’aider avec ça ? Merci !!
1 « J'aime »
Lilly
(Lillian Louis)
Septembre 15, 2023, 10:13
2
Je pense que les informations que vous souhaitez se trouvent dans ce sujet
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…
Je recommanderais également ce sujet ici :
Discourse API
Please view the Discourse API Documentation site for detailed info:
https://docs.discourse.org
Deprecation Warning!
On April 6th, 2020 we dropped support for all non-HTTP header based authentication (excluding some rss, mail-receiver, and ics routes). This means that API requests that have an api_key and api_username in the query params or in the HTTP body of the request will soon stop working. Please see the example cURL request below for how to update your API requ…
4 « J'aime »
system
(system)
A fermé ce sujet ()
Octobre 15, 2023, 10:14
3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.