Use this method to retrieve user questions published from the User Questions SEO section in the Knowledge instance.
client.getUserQuestions(options:Object).then(function(response){
//...
});
This method does not have any mandatory parameters.
Name | Type | Default | Description |
---|---|---|---|
length | integer | 5 | Maximum number of items that may be returned in a collection. Minimum:1. Max:100 |
offset | integer | 0 | Starting index within the collection of resource result. Minimum:0. |
This method calls the Knowledge API’s GET /user-questions
endpoint. Please refer to the Responses section of that endpoint on the Knowledge API Routes page for the response format.
The following example retrieves all published user questions:
client.getUserQuestions().then(function(response){
response.data.results.forEach(function(result) {
console.log(`Result(${result.id}): ${result.title}`);
});
});