Class: Onlyfans::Models::PostCreateParams

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

Overview

Defined Under Namespace

Modules: VotingType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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(account:, text:, expire_days: nil, fund_raising_target_amount: nil, fund_raising_tips_presets: nil, label_ids: nil, media_files: nil, previews: nil, rf_tag: nil, save_for_later: nil, scheduled_date: nil, voting_correct_index: nil, voting_due: nil, voting_options: nil, voting_type: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Onlyfans::Models::PostCreateParams for more details.

Parameters:

  • account (String)
  • text (String)

    The post text content

  • expire_days (Integer) (defaults to: nil)

    Number of days after which the post will expire. Between 1 and 30 days. Keep emp

  • fund_raising_target_amount (Integer) (defaults to: nil)

    Add a fundraising target to your post. If present, value must be at least 10.

  • fund_raising_tips_presets (Array<String>) (defaults to: nil)

    Specify which tip amounts will be listed under the fundraising card. Required wi

  • label_ids (String) (defaults to: nil)

    Array of OF label IDs. Refer to our ‘/posts/labels` endpoint.

  • media_files (Array<Object>) (defaults to: nil)

    Direct file uploads, OFAPI ‘ofapi_media_` IDs, or OF vault IDs.

  • previews (Array<Object>) (defaults to: nil)

    Direct file uploads, OFAPI ‘ofapi_media_` IDs, OF vault IDs, or integer indices

  • rf_tag (String) (defaults to: nil)

    Array OnlyFans creator user IDs to tag in your post

  • save_for_later (Boolean) (defaults to: nil)

    Add your post to the “Saved for later” queue.

  • scheduled_date (String) (defaults to: nil)

    Schedule your post in the future (UTC timezone).

  • voting_correct_index (Integer) (defaults to: nil)

    The array key of your quiz’ correct answer. Required when ‘votingType` is “quiz”

  • voting_due (Integer) (defaults to: nil)

    The due date (in days) of your poll/quiz. Can be 1, 3, 7 or 30 days. Can only be

  • voting_options (Array<String>) (defaults to: nil)

    The options of your poll/quiz. Required with ‘votingType`.

  • voting_type (Symbol, Onlyfans::Models::PostCreateParams::VotingType) (defaults to: nil)

    Include a poll or quiz within your post.

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


# File 'lib/onlyfans/models/post_create_params.rb', line 110

Instance Attribute Details

#accountString

Returns:

  • (String)


13
# File 'lib/onlyfans/models/post_create_params.rb', line 13

required :account, String

#expire_daysInteger?

Number of days after which the post will expire. Between 1 and 30 days. Keep empty for no expiration.

Returns:

  • (Integer, nil)


26
# File 'lib/onlyfans/models/post_create_params.rb', line 26

optional :expire_days, Integer, api_name: :expireDays

#fund_raising_target_amountInteger?

Add a fundraising target to your post. If present, value must be at least 10.

Returns:

  • (Integer, nil)


32
# File 'lib/onlyfans/models/post_create_params.rb', line 32

optional :fund_raising_target_amount, Integer, api_name: :fundRaisingTargetAmount

#fund_raising_tips_presetsArray<String>?

Specify which tip amounts will be listed under the fundraising card. Required with ‘fundRaisingTargetAmount`, and you must provide at least 1 option. Array items cannot be higher than the `fundRaisingTargetAmount`.

Returns:

  • (Array<String>, nil)


40
41
42
# File 'lib/onlyfans/models/post_create_params.rb', line 40

optional :fund_raising_tips_presets,
Onlyfans::Internal::Type::ArrayOf[String],
api_name: :fundRaisingTipsPresets

#label_idsString?

Array of OF label IDs. Refer to our ‘/posts/labels` endpoint.

Returns:

  • (String, nil)


48
# File 'lib/onlyfans/models/post_create_params.rb', line 48

optional :label_ids, String, api_name: :labelIds

#media_filesArray<Object>?

Direct file uploads, OFAPI ‘ofapi_media_` IDs, or OF vault IDs.

Returns:

  • (Array<Object>, nil)


54
55
56
# File 'lib/onlyfans/models/post_create_params.rb', line 54

optional :media_files,
Onlyfans::Internal::Type::ArrayOf[Onlyfans::Internal::Type::Unknown],
api_name: :mediaFiles

#previewsArray<Object>?

Direct file uploads, OFAPI ‘ofapi_media_` IDs, OF vault IDs, or integer indices referencing uploaded files in `mediaFiles`. Will be shown if `price` is provided.

Returns:

  • (Array<Object>, nil)


64
# File 'lib/onlyfans/models/post_create_params.rb', line 64

optional :previews, Onlyfans::Internal::Type::ArrayOf[Onlyfans::Internal::Type::Unknown]

#rf_tagString?

Array OnlyFans creator user IDs to tag in your post

Returns:

  • (String, nil)


70
# File 'lib/onlyfans/models/post_create_params.rb', line 70

optional :rf_tag, String, api_name: :rfTag

#save_for_laterBoolean?

Add your post to the “Saved for later” queue.

Returns:

  • (Boolean, nil)


76
# File 'lib/onlyfans/models/post_create_params.rb', line 76

optional :save_for_later, Onlyfans::Internal::Type::Boolean, api_name: :saveForLater

#scheduled_dateString?

Schedule your post in the future (UTC timezone).

Returns:

  • (String, nil)


82
# File 'lib/onlyfans/models/post_create_params.rb', line 82

optional :scheduled_date, String, api_name: :scheduledDate

#textString

The post text content

Returns:

  • (String)


19
# File 'lib/onlyfans/models/post_create_params.rb', line 19

required :text, String

#voting_correct_indexInteger?

The array key of your quiz’ correct answer. Required when ‘votingType` is “quiz”. Keep in mind that arrays start at `0`

Returns:

  • (Integer, nil)


89
# File 'lib/onlyfans/models/post_create_params.rb', line 89

optional :voting_correct_index, Integer, api_name: :votingCorrectIndex

#voting_dueInteger?

The due date (in days) of your poll/quiz. Can be 1, 3, 7 or 30 days. Can only be filled with ‘votingType`.

Returns:

  • (Integer, nil)


96
# File 'lib/onlyfans/models/post_create_params.rb', line 96

optional :voting_due, Integer, api_name: :votingDue

#voting_optionsArray<String>?

The options of your poll/quiz. Required with ‘votingType`.

Returns:

  • (Array<String>, nil)


102
# File 'lib/onlyfans/models/post_create_params.rb', line 102

optional :voting_options, Onlyfans::Internal::Type::ArrayOf[String], api_name: :votingOptions

#voting_typeSymbol, ...

Include a poll or quiz within your post.



108
# File 'lib/onlyfans/models/post_create_params.rb', line 108

optional :voting_type, enum: -> { Onlyfans::PostCreateParams::VotingType }, api_name: :votingType