你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ReviewsOperations Class

ReviewsOperations operations.

Inheritance
builtins.object
ReviewsOperations

Constructor

ReviewsOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

Name Description
content_type

The content type. Constant value: "text/plain".

Methods

add_video_frame

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

add_video_frame_stream

Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second.

add_video_frame_url

Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second.

add_video_transcript

This API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format.

add_video_transcript_moderation_result

This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API.

create_job

A job Id will be returned for the content posted on this endpoint. Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression.

CallBack Schemas

Job Completion CallBack Sample


{
"JobId": "
create_reviews

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

create_video_reviews

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

get_job_details

Get the Job Details for a Job Id.

get_review

Returns review details for the review Id passed.

get_video_frames

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

publish_video_review

Publish video review to make it available for review.

add_video_frame

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

add_video_frame(team_name, review_id, timescale=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

timescale
int

Timescale of the video you are adding frames to.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

add_video_frame_stream

Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second.

add_video_frame_stream(content_type, team_name, review_id, frame_image_zip, frame_metadata, timescale=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
content_type
Required
str

The content type.

team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

frame_image_zip
Required

Zip file containing frame images.

frame_metadata
Required
str

Metadata of the frame.

timescale
int

Timescale of the video .

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

add_video_frame_url

Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second.

add_video_frame_url(content_type, team_name, review_id, video_frame_body, timescale=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
content_type
Required
str

The content type.

team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

video_frame_body
Required

Body for add video frames API

timescale
int

Timescale of the video.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

add_video_transcript

This API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format.

add_video_transcript(team_name, review_id, vt_tfile, custom_headers=None, raw=False, callback=None, **operation_config)

Parameters

Name Description
team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

vt_tfile
Required

Transcript file of the video.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
callback
Callable[<xref:Bytes>, <xref:response=None>]

When specified, will be called with each chunk of data that is streamed. The callback should take two arguments, the bytes of the current chunk of data and the response object. If the data is uploading, response will be None.

Default value: None
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

add_video_transcript_moderation_result

This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API.

add_video_transcript_moderation_result(content_type, team_name, review_id, transcript_moderation_body, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
content_type
Required
str

The content type.

team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

transcript_moderation_body
Required

Body for add video transcript moderation result API

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

create_job

A job Id will be returned for the content posted on this endpoint. Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression.

CallBack Schemas

Job Completion CallBack Sample


{
"JobId": "
create_job(team_name, content_type, content_id, workflow_name, job_content_type, content_value, call_back_endpoint=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
team_name
Required
str

Your team name.

content_type
Required
str

Image, Text or Video. Possible values include: 'Image', 'Text', 'Video'

content_id
Required
str

Id/Name to identify the content submitted.

workflow_name
Required
str

Workflow Name that you want to invoke.

job_content_type
Required
str

The content type. Possible values include: 'application/json', 'image/jpeg'

content_value
Required
str

Content to evaluate for a job.

call_back_endpoint
str

Callback endpoint for posting the create job result.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

JobId or ClientRawResponse if raw=true

Exceptions

Type Description

create_reviews

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

create_reviews(url_content_type, team_name, create_review_body, sub_team=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
url_content_type
Required
str

The content type.

team_name
Required
str

Your team name.

create_review_body
Required

Body for create reviews API

sub_team
str

SubTeam of your team, you want to assign the created review to.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
list[str],
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

create_video_reviews

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

create_video_reviews(content_type, team_name, create_video_reviews_body, sub_team=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
content_type
Required
str

The content type.

team_name
Required
str

Your team name.

create_video_reviews_body
Required

Body for create reviews API

sub_team
str

SubTeam of your team, you want to assign the created review to.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
list[str],
<xref:msrest.pipeline.ClientRawResponse>

list or ClientRawResponse if raw=true

Exceptions

Type Description

get_job_details

Get the Job Details for a Job Id.

get_job_details(team_name, job_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
team_name
Required
str

Your Team Name.

job_id
Required
str

Id of the job.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
Job,
<xref:msrest.pipeline.ClientRawResponse>

Job or ClientRawResponse if raw=true

Exceptions

Type Description

get_review

Returns review details for the review Id passed.

get_review(team_name, review_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
team_name
Required
str

Your Team Name.

review_id
Required
str

Id of the review.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

Review or ClientRawResponse if raw=true

Exceptions

Type Description

get_video_frames

The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint.

CallBack Schemas

Review Completion CallBack Sample

{
"ReviewId": "

get_video_frames(team_name, review_id, start_seed=None, no_of_records=None, filter=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

start_seed
int

Time stamp of the frame from where you want to start fetching the frames.

Default value: None
no_of_records
int

Number of frames to fetch.

Default value: None
filter
str

Get frames filtered by tags.

Default value: None
custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
<xref:msrest.pipeline.ClientRawResponse>

Frames or ClientRawResponse if raw=true

Exceptions

Type Description

publish_video_review

Publish video review to make it available for review.

publish_video_review(team_name, review_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
team_name
Required
str

Your team name.

review_id
Required
str

Id of the review.

custom_headers

headers that will be added to the request

Default value: None
raw

returns the direct response alongside the deserialized response

Default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

Attributes

models

models = <module 'azure.cognitiveservices.vision.contentmoderator.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\cognitiveservices\\vision\\contentmoderator\\models\\__init__.py'>