Moderator API . submissions

Instance Methods

get(seriesId, submissionId, lang=None, includeVotes=None)

Returns the specified submission within the specified series.

insert(seriesId, topicId, body, unauthToken=None, anonymous=None)

Inserts a new submission in the specified topic within the specified series.

Method Details

get(seriesId, submissionId, lang=None, includeVotes=None)
Returns the specified submission within the specified series.

Args:
  seriesId: integer, The decimal ID of the Series. (required)
  submissionId: integer, The decimal ID of the Submission within the Series. (required)
  lang: string, The language code for the language the client prefers resuls in.
  includeVotes: boolean, Specifies whether to include the current user's vote

Returns:
  An object of the form:

    {
      "kind": "moderator#submission",
      "attribution": {
        "displayName": "A String",
        "location": "A String",
        "avatarUrl": "A String",
      },
      "created": "A String",
      "text": "A String",
      "topics": [
        {
          "id": {
            "seriesId": "A String",
            "topicId": "A String",
          },
        },
      ],
      "author": "A String",
      "translations": [
        {
          "lang": "A String",
          "text": "A String",
        },
      ],
      "parentSubmissionId": {
        "seriesId": "A String",
        "submissionId": "A String",
      },
      "vote": {
        "vote": "A String",
        "flag": "A String",
      },
      "attachmentUrl": "A String",
      "geo": {
        "latitude": 3.14,
        "location": "A String",
        "longitude": 3.14,
      },
      "id": {
        "seriesId": "A String",
        "submissionId": "A String",
      },
      "counters": {
        "noneVotes": 42,
        "minusVotes": 42,
        "plusVotes": 42,
      },
    }
insert(seriesId, topicId, body, unauthToken=None, anonymous=None)
Inserts a new submission in the specified topic within the specified series.

Args:
  seriesId: integer, The decimal ID of the Series. (required)
  topicId: integer, The decimal ID of the Topic within the Series. (required)
  body: object, The request body. (required)
    The object takes the form of:

{
    "kind": "moderator#submission",
    "attribution": {
      "displayName": "A String",
      "location": "A String",
      "avatarUrl": "A String",
    },
    "created": "A String",
    "text": "A String",
    "topics": [
      {
        "id": {
          "seriesId": "A String",
          "topicId": "A String",
        },
      },
    ],
    "author": "A String",
    "translations": [
      {
        "lang": "A String",
        "text": "A String",
      },
    ],
    "parentSubmissionId": {
      "seriesId": "A String",
      "submissionId": "A String",
    },
    "vote": {
      "vote": "A String",
      "flag": "A String",
    },
    "attachmentUrl": "A String",
    "geo": {
      "latitude": 3.14,
      "location": "A String",
      "longitude": 3.14,
    },
    "id": {
      "seriesId": "A String",
      "submissionId": "A String",
    },
    "counters": {
      "noneVotes": 42,
      "minusVotes": 42,
      "plusVotes": 42,
    },
  }

  unauthToken: string, User identifier for unauthenticated usage mode
  anonymous: boolean, Set to true to mark the new submission as anonymous.

Returns:
  An object of the form:

    {
      "kind": "moderator#submission",
      "attribution": {
        "displayName": "A String",
        "location": "A String",
        "avatarUrl": "A String",
      },
      "created": "A String",
      "text": "A String",
      "topics": [
        {
          "id": {
            "seriesId": "A String",
            "topicId": "A String",
          },
        },
      ],
      "author": "A String",
      "translations": [
        {
          "lang": "A String",
          "text": "A String",
        },
      ],
      "parentSubmissionId": {
        "seriesId": "A String",
        "submissionId": "A String",
      },
      "vote": {
        "vote": "A String",
        "flag": "A String",
      },
      "attachmentUrl": "A String",
      "geo": {
        "latitude": 3.14,
        "location": "A String",
        "longitude": 3.14,
      },
      "id": {
        "seriesId": "A String",
        "submissionId": "A String",
      },
      "counters": {
        "noneVotes": 42,
        "minusVotes": 42,
        "plusVotes": 42,
      },
    }