Class: Onlyfans::Models::MediaScrapeParams

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

Overview

See Also:

  • Onlyfans::Resources::Media#scrape

Defined Under Namespace

Modules: FileType

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:, expiration_date: nil, file_type: nil, media_id: nil, public: nil, url: nil, request_options: {}) ⇒ Object

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

Parameters:

  • account (String)
  • expiration_date (String, nil) (defaults to: nil) —

    The expiration date of our returned temporary_url. Default of 5 minutes. Must

  • file_type (Symbol, Onlyfans::Models::MediaScrapeParams::FileType, nil) (defaults to: nil) —

    The file type to scrape. Only allowed when using media_id.

  • media_id (Integer, nil) (defaults to: nil) —

    The OnlyFans Vault Media ID. Can be used instead of the url.

  • public (Boolean, nil) (defaults to: nil) —

    Set to true if you want to have the file uploaded to our public CDN (no signed U

  • url (String, nil) (defaults to: nil) —

    The CDN URL to scrape. Keep in mind that these URLs expire fast.

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


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

Instance Attribute Details

#account ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :account, String

#expiration_date ⇒ String?

The expiration date of our returned temporary_url. Default of 5 minutes. Must be null if public is true.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


20
# File 'lib/onlyfans/models/media_scrape_params.rb', line 20

optional :expiration_date, String, nil?: true

#file_type ⇒ Symbol, ...

The file type to scrape. Only allowed when using media_id.

Parameters:

  • value (Onlyfans::Models::MediaScrapeParams::file_type, nil)

Returns:



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

optional :file_type, enum: -> { Onlyfans::MediaScrapeParams::FileType }, nil?: true

#media_id ⇒ Integer?

The OnlyFans Vault Media ID. Can be used instead of the url.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

optional :media_id, Integer, nil?: true

#public ⇒ Boolean?

Set to true if you want to have the file uploaded to our public CDN (no signed URL needed to access). Default is false. Must be null if expiration_date is set.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


40
# File 'lib/onlyfans/models/media_scrape_params.rb', line 40

optional :public, Onlyfans::Internal::Type::Boolean, nil?: true

#url ⇒ String?

The CDN URL to scrape. Keep in mind that these URLs expire fast.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


46
# File 'lib/onlyfans/models/media_scrape_params.rb', line 46

optional :url, String, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


40
# File 'sig/onlyfans/models/media_scrape_params.rbs', line 40

def to_hash: -> {