Checks API . privacypolicy

Instance Methods

analyze(body=None, x__xgafv=None)

Performs a synchronous analysis of a privacy policy, where the policy content is mapped to privacy categories, data types, and purposes.

close()

Close httplib2 connections.

Method Details

analyze(body=None, x__xgafv=None)
Performs a synchronous analysis of a privacy policy, where the policy content is mapped to privacy categories, data types, and purposes.

Args:
  body: object, The request body.
    The object takes the form of:

{ # Request for the AnalyzePrivacyPolicy method.
  "privacyPolicyPageContent": "A String", # The HTML content of the privacy policy. This is useful if you'd like to manage the crawling and rendering of the privacy policy.
  "privacyPolicyUri": "A String", # The URI that points to the web page for the privacy policy.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response containing the analyzed privacy policy for the AnalyzePrivacyPolicy method.
  "dataPurposeAnnotations": [ # A list of detected purposes in the privacy policy.
    {
      "endOffset": "A String", # Byte offsets for the end of the purpose of use sentence inside the full text.
      "purposeOfUse": "A String", # Purpose of use mentioned in the policy.
      "score": 3.14, # Score given by the model representing how confident it was regarding this `text_content` being of `purpose_of_use`.
      "startOffset": "A String", # Byte offsets for the start of the purpose of use sentence inside the full text.
      "textContent": "A String", # The bytes of actual text content in the sentence that mentions the purpose of use. This makes it much easier to consume the information.
    },
  ],
  "dataTypeAnnotations": [ # A list of detected data types in the privacy policy.
    {
      "dataType": "A String", # Type of the data mentioned in the policy.
      "endOffset": "A String", # Byte offsets for the end of the data type sentence inside the full text.
      "score": 3.14, # Score given by the model representing how confident it was regarding this `text_content` being of `data_type`.
      "startOffset": "A String", # Byte offsets for the start of the data type sentence inside the full text.
      "textContent": "A String", # Actual text content in the section. This makes it much easier to consume the information. NOTE: This field might contain HTML and does not guarantee a SafeHtml security contract go/safehtmltypecontracts#safehtml.
    },
  ],
  "htmlContent": "A String", # HTML content for the privacy policy page. The byte offsets in each annotated section will match this content.
  "lastUpdatedDateInfo": { # Information about the date when the privacy policy was last updated. # Information about the date when the privacy policy was last updated.
    "endOffset": "A String", # Byte offsets for the end of the date text inside the full text.
    "lastUpdatedDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Date when the privacy policy was last updated.
      "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.
      "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
      "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
    },
    "startOffset": "A String", # Byte offsets for the start of the date text inside the full text.
    "textContent": "A String", # The bytes of actual text content in the section. Note: - This will correspond to the whole sentence that includes the date. - This field might contain HTML and it is not sanitized.
  },
  "sectionAnnotations": [ # A list of detected topics in the privacy policy.
    {
      "endOffset": "A String", # Byte offsets for the end of the section inside the full text.
      "score": 3.14, # Score given by the model representing how confident it was regarding this `text_content` being of `section_type`.
      "sectionType": "A String", # Detected type of the high-level topic in the policy.
      "startOffset": "A String", # Byte offsets for the start of the section inside the full text.
      "textContent": "A String", # Actual text content in the section.
    },
  ],
}
close()
Close httplib2 connections.