-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Thanks for nice work! I see your comments that below is not working:
/**
* createPost
*
* NOT WORKING YET
*
* @param $bodyText
* @param $topicId
* @param $userName
* @return \stdClass
*/
public function createPost($bodyText, $topicId, $userName)
{
$params = [
'raw' => $bodyText,
'archetype' => 'regular',
'topic_id' => $topicId
];
return $this->_postRequest('/posts', [$params], $userName);
}
I have written short function by using that below function we can reply to any Topic :
public function modified_createPost( $userName, $topicId, $post_number, $bodyText)
{
$params = [
'username' => $userName,
'topic_id' => $topicId,
'post_number' => $post_number,
'raw' => $bodyText,
'archetype' => 'regular'
];
return $this->_postRequest('/posts', [$params], $userName);
}
To debug parameters used we can see like : http://DISCOURSE_SITE_URL/t/TOPIC_ID.json for example in my case its : http://localhost:3000//t/14.json
Metadata
Metadata
Assignees
Labels
No labels
