static
osapi.jive.corev3.polls
Static class for getting and creating
Polls
. A Poll is an informal survey
to gather opinions from the community.Methods
↑
Poll describing the newly created poll
create(poll,options)
POST /contents
Retrieves
Poll
Description
Create a new poll with specified characteristics, and return an entity representing the newly created poll.
Here is an example of a JSON with the minimum set of fields you must include:
{ "content": { "type": "text/html", "text": "<body><p>Which color is your favorite?</p></body>" }, "subject": "Poll for colors", "options" : [ "Blue", "Yellow", "Red" ] }
Takes:
- Poll fields describing the new poll
Options:
Name | Type | Required | Description |
---|---|---|---|
fields | String | false | Names of the fields to be returned |
Retrieves:
↑
Poll[] Paginated list of matching polls
get(options)
GET /contents
Retrieves
Content[]
Description
Return a paginated list of polls that match the specified criteria.
Options:
Name | Type | Required | Description |
---|---|---|---|
author | String | false | URI of a person, limiting results to objects authored by this person |
count | Integer | false | Maximum number of objects to return (default is 25) |
fields | String | false | Names of the fields to be returned |
place | String | false | URI of a place, limiting results to objects contained in that place |
search | String | false | One or more search terms separated by commas, limiting results to objects that match the terms |
startIndex | Integer | false | Zero-relative index of the first content object to be returned |
tag | String | false | Comma delimited list of tag values, limiting results to objects with one of those tags |