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

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:
NameTypeRequiredDescription
fieldsStringfalseNames of the fields to be returned
Retrieves:
  • Poll describing the newly created poll
  • get(options)
    GET /contents

    Retrieves

    Content[]

    Description

    Return a paginated list of polls that match the specified criteria.

    Options:
    NameTypeRequiredDescription
    authorStringfalseURI of a person, limiting results to objects authored by this person
    countIntegerfalseMaximum number of objects to return (default is 25)
    fieldsStringfalseNames of the fields to be returned
    placeStringfalseURI of a place, limiting results to objects contained in that place
    searchStringfalseOne or more search terms separated by commas, limiting results to objects that match the terms. Wildcards can be used, e.g. to search by substring use "*someSubstring*".
    startIndexIntegerfalseZero-relative index of the first content object to be returned
    tagStringfalseComma delimited list of tag values, limiting results to objects with one of those tags
    Retrieves:
  • Poll[] Paginated list of matching polls
  • get(options)
    GET /contents/{uri}

    Retrieves

    Content

    Description

    Return a single poll by its URI.

    Options:
    NameTypeRequiredDescription
    uriStringtrueURI of the poll to get
    fieldsStringfalseNames of the fields to be returned
    Retrieves:
  • Poll Representation of the requested poll
  • getEditable(options)
    GET /contents/{uri}/editable

    Retrieves

    Content

    Description