Class: ModerationAPI::Models::AuthorListResponse::Author::Metrics

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moderation_api/models/author_list_response.rb,
sig/moderation_api/models/author_list_response.rbs

Overview

See Also:

  • ModerationAPI::Models::AuthorListResponse::Author#metrics

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initializeObject



173
# File 'sig/moderation_api/models/author_list_response.rbs', line 173

def initialize: (

Instance Attribute Details

#average_sentimentFloat?

Average sentiment score of content (-1 to 1). Requires a sentiment model in your project.

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


236
# File 'lib/moderation_api/models/author_list_response.rb', line 236

optional :average_sentiment, Float, nil?: true

#flagged_contentFloat

Number of flagged content pieces

Parameters:

  • value (Float)

Returns:

  • (Float)


223
# File 'lib/moderation_api/models/author_list_response.rb', line 223

required :flagged_content, Float

#total_contentFloat

Total pieces of content

Parameters:

  • value (Float)

Returns:

  • (Float)


229
# File 'lib/moderation_api/models/author_list_response.rb', line 229

required :total_content, Float

Instance Method Details

#to_hash{

Returns:

  • ({)


179
# File 'sig/moderation_api/models/author_list_response.rbs', line 179

def to_hash: -> {