REST Resource: locations.questions

Resource: Question

Represents a single question and some of its answers.

JSON representation
{
  "name": string,
  "author": {
    object (Author)
  },
  "upvoteCount": integer,
  "text": string,
  "createTime": string,
  "updateTime": string,
  "topAnswers": [
    {
      object (Answer)
    }
  ],
  "totalAnswerCount": integer
}
Fields
name

string

Immutable. The unique name for the question. locations/*/questions/* This field will be ignored if set during question creation.

author

object (Author)

Output only. The author of the question.

upvoteCount

integer

Output only. The number of upvotes for the question.

text

string

Required. The text of the question. It should contain at least three words and the total length should be greater than or equal to 10 characters. The maximum length is 4096 characters.

createTime

string (Timestamp format)

Output only. The timestamp for when the question was written.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The timestamp for when the question was last modified.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

topAnswers[]

object (Answer)

Output only. A list of answers to the question, sorted by upvotes. This may not be a complete list of answers depending on the request parameters (answersPerQuestion)

totalAnswerCount

integer

Output only. The total number of answers posted for this question.

Author

Represents the author of a question or answer

JSON representation
{
  "displayName": string,
  "profilePhotoUri": string,
  "type": enum (AuthorType)
}
Fields
displayName

string

The display name of the user

profilePhotoUri

string

The profile photo URI of the user.

type

enum (AuthorType)

The type of user the author is.

AuthorType

Enum for the type of user the author is.

Enums
AUTHOR_TYPE_UNSPECIFIED This should not be used.
REGULAR_USER A regular user.
LOCAL_GUIDE A Local Guide
MERCHANT The owner/manager of the location

Answer

Represents an answer to a question

JSON representation
{
  "name": string,
  "author": {
    object (Author)
  },
  "upvoteCount": integer,
  "text": string,
  "createTime": string,
  "updateTime": string
}
Fields
name

string

Output only. The unique name for the answer locations/*/questions/*/answers/*

author

object (Author)

Output only. The author of the answer. Will only be set during list operations.

upvoteCount

integer

Output only. The number of upvotes for the answer.

text

string

Required. The text of the answer. It should contain at least one non-whitespace character. The maximum length is 4096 characters.

createTime

string (Timestamp format)

Output only. The timestamp for when the answer was written. Only retrieved during ListResponse fetching.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The timestamp for when the answer was last modified.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Methods

create

Adds a question for the specified location.

delete

Deletes a specific question written by the current user.

list

Returns the paginated list of questions and some of its answers for a specified location.

patch

Updates a specific question written by the current user.