| |
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html><head><title>Python: class Resource</title> |
| </head><body bgcolor="#f0f0f8"> |
| <p> |
| <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| <tr bgcolor="#ffc8d8"> |
| <td colspan=3 valign=bottom> <br> |
| <font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> |
| |
| <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| <td colspan=2><tt>A class for interacting with a resource.<br> </tt></td></tr> |
| <tr><td> </td> |
| <td width="100%">Methods defined here:<br> |
| <dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl> |
| |
| <dl><dt><a name="Resource-get"><strong>get</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves one specific poll of a community.<br> |
| <br> |
| Args:<br> |
| hl: string, Specifies the interface language (host language) of your user interface.<br> |
| communityId: integer, The ID of the community for whose poll will be retrieved. (required)<br> |
| pollId: string, The ID of the poll to get. (required)<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "links": [ # List of resources for the community poll.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "isMultipleAnswers": True or False, # Whether this poll allows voting for more than one option.<br> |
| "image": { # The image representing the poll. Field is omitted if no image exists.<br> |
| "url": "A String", # A URL that points to an image of the poll.<br> |
| },<br> |
| "endingTime": "A String", # The ending date of this poll or empty if the poll doesn't have one.<br> |
| "isVotingAllowedForNonMembers": True or False, # Whether non-members of the community can vote on the poll.<br> |
| "isSpam": True or False, # Whether the user has marked this poll as spam. This only affects the poll for this user, not globally.<br> |
| "totalNumberOfVotes": 42, # The total number of votes this poll has received.<br> |
| "author": { # The person who created the poll.<br> |
| "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| "image": { # Image data about the actor.<br> |
| "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| },<br> |
| "displayName": "A String", # The name of the author, suitable for display.<br> |
| "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| },<br> |
| "question": "A String", # The poll question.<br> |
| "id": "A String", # The poll ID.<br> |
| "isRestricted": True or False, # Whether this poll is restricted for members only. If a poll is open but the user can't vote on it, it's been restricted to members only. This information is important to tell this case apart from the one where the user can't vote simply because the poll is already closed.<br> |
| "communityId": 42, # The ID of the community.<br> |
| "isUsersVotePublic": True or False, # If user has already voted, whether his vote is publicly visible.<br> |
| "lastUpdate": "A String", # The date of the last update of this poll.<br> |
| "description": "A String", # The poll description.<br> |
| "votedOptions": [ # List of options the user has voted on, if there are any.<br> |
| 42,<br> |
| ],<br> |
| "isOpenForVoting": True or False, # Whether this poll is still opened for voting. A poll is open for voting if it is not closed, the user has not yet voted on it and the user has the permission to do so, which happens if he/she is either a community member or the poll is open for everybody.<br> |
| "isClosed": True or False, # Whether the poll is not expired if there is an expiration date. A poll is open (that is, not closed for voting) if it either is not expired or doesn't have an expiration date at all. Note that just because a poll is open, it doesn't mean that the requester can vote on it.<br> |
| "hasVoted": True or False, # Whether the user has voted on this poll.<br> |
| "kind": "orkut#communityPoll", # Identifies this resource as a community poll. Value: "orkut#communityPoll"<br> |
| "creationTime": "A String", # The date of creation of this poll<br> |
| "options": [ # List of options of this poll.<br> |
| {<br> |
| "image": { # Image data about the poll option. Field is omitted if no image exists.<br> |
| "url": "A String", # A URL that points to an image of the poll question.<br> |
| },<br> |
| "optionId": 42, # The poll option ID<br> |
| "description": "A String", # The option description.<br> |
| "numberOfVotes": 42, # The total number of votes that this option received.<br> |
| },<br> |
| ],<br> |
| }</tt></dd></dl> |
| |
| <dl><dt><a name="Resource-list"><strong>list</strong></a> = method(self, **kwargs)</dt><dd><tt>Retrieves the polls of a community.<br> |
| <br> |
| Args:<br> |
| pageToken: string, A continuation token that allows pagination.<br> |
| maxResults: integer, The maximum number of polls to include in the response.<br> |
| hl: string, Specifies the interface language (host language) of your user interface.<br> |
| communityId: integer, The ID of the community which polls will be listed. (required)<br> |
| <br> |
| Returns:<br> |
| An object of the form<br> |
| <br> |
| {<br> |
| "nextPageToken": "A String", # The value of pageToken query parameter in community_polls.list request to get the next page, if there are more to retrieve.<br> |
| "kind": "orkut#communityPollList", # Identifies this resource as a collection of community polls. Value: "orkut#communityPollList"<br> |
| "items": [ # List of community polls retrieved.<br> |
| {<br> |
| "links": [ # List of resources for the community poll.<br> |
| { # Links to resources related to the parent object.<br> |
| "href": "A String", # URL of the link.<br> |
| "type": "A String", # Media type of the link.<br> |
| "rel": "A String", # Relation between the resource and the parent object.<br> |
| "title": "A String", # Title of the link.<br> |
| },<br> |
| ],<br> |
| "isMultipleAnswers": True or False, # Whether this poll allows voting for more than one option.<br> |
| "image": { # The image representing the poll. Field is omitted if no image exists.<br> |
| "url": "A String", # A URL that points to an image of the poll.<br> |
| },<br> |
| "endingTime": "A String", # The ending date of this poll or empty if the poll doesn't have one.<br> |
| "isVotingAllowedForNonMembers": True or False, # Whether non-members of the community can vote on the poll.<br> |
| "isSpam": True or False, # Whether the user has marked this poll as spam. This only affects the poll for this user, not globally.<br> |
| "totalNumberOfVotes": 42, # The total number of votes this poll has received.<br> |
| "author": { # The person who created the poll.<br> |
| "url": "A String", # The URL of the author who posted the comment [not yet implemented]<br> |
| "image": { # Image data about the actor.<br> |
| "url": "A String", # A URL that points to a thumbnail photo of the author.<br> |
| },<br> |
| "displayName": "A String", # The name of the author, suitable for display.<br> |
| "id": "A String", # Unique identifier of the person who posted the comment. This is the person's OpenSocial ID.<br> |
| },<br> |
| "question": "A String", # The poll question.<br> |
| "id": "A String", # The poll ID.<br> |
| "isRestricted": True or False, # Whether this poll is restricted for members only. If a poll is open but the user can't vote on it, it's been restricted to members only. This information is important to tell this case apart from the one where the user can't vote simply because the poll is already closed.<br> |
| "communityId": 42, # The ID of the community.<br> |
| "isUsersVotePublic": True or False, # If user has already voted, whether his vote is publicly visible.<br> |
| "lastUpdate": "A String", # The date of the last update of this poll.<br> |
| "description": "A String", # The poll description.<br> |
| "votedOptions": [ # List of options the user has voted on, if there are any.<br> |
| 42,<br> |
| ],<br> |
| "isOpenForVoting": True or False, # Whether this poll is still opened for voting. A poll is open for voting if it is not closed, the user has not yet voted on it and the user has the permission to do so, which happens if he/she is either a community member or the poll is open for everybody.<br> |
| "isClosed": True or False, # Whether the poll is not expired if there is an expiration date. A poll is open (that is, not closed for voting) if it either is not expired or doesn't have an expiration date at all. Note that just because a poll is open, it doesn't mean that the requester can vote on it.<br> |
| "hasVoted": True or False, # Whether the user has voted on this poll.<br> |
| "kind": "orkut#communityPoll", # Identifies this resource as a community poll. Value: "orkut#communityPoll"<br> |
| "creationTime": "A String", # The date of creation of this poll<br> |
| "options": [ # List of options of this poll.<br> |
| {<br> |
| "image": { # Image data about the poll option. Field is omitted if no image exists.<br> |
| "url": "A String", # A URL that points to an image of the poll question.<br> |
| },<br> |
| "optionId": 42, # The poll option ID<br> |
| "description": "A String", # The option description.<br> |
| "numberOfVotes": 42, # The total number of votes that this option received.<br> |
| },<br> |
| ],<br> |
| },<br> |
| ],<br> |
| "prevPageToken": "A String", # The value of pageToken query parameter in community_polls.list request to get the previous page, if there are more to retrieve.<br> |
| "lastPageToken": "A String", # The value of pageToken query parameter in community_polls.list request to get the last page.<br> |
| "firstPageToken": "A String", # The value of pageToken query parameter in community_polls.list request to get the first page.<br> |
| }</tt></dd></dl> |
| |
| <dl><dt><a name="Resource-list_next"><strong>list_next</strong></a> = methodNext(self, previous_request, previous_response)</dt><dd><tt>Retrieves the next page of results.<br> |
| <br> |
| Args:<br> |
| previous_request: The request for the previous page.<br> |
| previous_response: The response from the request for the previous page.<br> |
| <br> |
| Returns:<br> |
| A request object that you can call 'execute()' on to request the next<br> |
| page. Returns None if there are no more items in the collection.</tt></dd></dl> |
| |
| <hr> |
| Data descriptors defined here:<br> |
| <dl><dt><strong>__dict__</strong></dt> |
| <dd><tt>dictionary for instance variables (if defined)</tt></dd> |
| </dl> |
| <dl><dt><strong>__weakref__</strong></dt> |
| <dd><tt>list of weak references to the object (if defined)</tt></dd> |
| </dl> |
| </td></tr></table> |
| </body></html> |