Class: XTwitterScraper::Models::ComposeCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/x_twitter_scraper/models/compose_create_params.rb

Overview

Defined Under Namespace

Modules: Goal, MediaType, Step

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

#initialize(step:, additional_context: nil, call_to_action: nil, draft: nil, goal: nil, has_link: nil, has_media: nil, media_type: nil, style_username: nil, tone: nil, topic: nil, request_options: {}) ⇒ Object

Parameters:

  • step (Symbol, XTwitterScraper::Models::ComposeCreateParams::Step)

    Workflow step

  • additional_context (String) (defaults to: nil)

    Extra context or URLs (refine)

  • call_to_action (String) (defaults to: nil)

    Desired call to action (refine)

  • draft (String) (defaults to: nil)

    Tweet draft text to evaluate (score)

  • goal (Symbol, XTwitterScraper::Models::ComposeCreateParams::Goal) (defaults to: nil)

    Optimization goal

  • has_link (Boolean) (defaults to: nil)

    Whether a link is attached (score)

  • has_media (Boolean) (defaults to: nil)

    Whether media is attached (score)

  • media_type (Symbol, XTwitterScraper::Models::ComposeCreateParams::MediaType) (defaults to: nil)

    Media type (refine)

  • style_username (String) (defaults to: nil)

    Cached style username for voice matching (compose)

  • tone (String) (defaults to: nil)

    Desired tone (refine)

  • topic (String) (defaults to: nil)

    Tweet topic (compose, refine)

  • request_options (XTwitterScraper::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 76

Instance Attribute Details

#additional_contextString?

Extra context or URLs (refine)

Returns:

  • (String, nil)


20
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 20

optional :additional_context, String, api_name: :additionalContext

#call_to_actionString?

Desired call to action (refine)

Returns:

  • (String, nil)


26
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 26

optional :call_to_action, String, api_name: :callToAction

#draftString?

Tweet draft text to evaluate (score)

Returns:

  • (String, nil)


32
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 32

optional :draft, String

#goalSymbol, ...

Optimization goal



38
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 38

optional :goal, enum: -> { XTwitterScraper::ComposeCreateParams::Goal }

Whether a link is attached (score)

Returns:

  • (Boolean, nil)


44
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 44

optional :has_link, XTwitterScraper::Internal::Type::Boolean, api_name: :hasLink

#has_mediaBoolean?

Whether media is attached (score)

Returns:

  • (Boolean, nil)


50
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 50

optional :has_media, XTwitterScraper::Internal::Type::Boolean, api_name: :hasMedia

#media_typeSymbol, ...

Media type (refine)



56
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 56

optional :media_type, enum: -> { XTwitterScraper::ComposeCreateParams::MediaType }, api_name: :mediaType

#stepSymbol, XTwitterScraper::Models::ComposeCreateParams::Step

Workflow step



14
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 14

required :step, enum: -> { XTwitterScraper::ComposeCreateParams::Step }

#style_usernameString?

Cached style username for voice matching (compose)

Returns:

  • (String, nil)


62
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 62

optional :style_username, String, api_name: :styleUsername

#toneString?

Desired tone (refine)

Returns:

  • (String, nil)


68
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 68

optional :tone, String

#topicString?

Tweet topic (compose, refine)

Returns:

  • (String, nil)


74
# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 74

optional :topic, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/x_twitter_scraper/models/compose_create_params.rb', line 109