Class: Vk::API::Video::Methods::Search

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/video/methods/search.rb

Overview

Returns a list of videos under the set search criterion.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Video::Methods::Search

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :q (String)

    Search query string (e.g., 'The Beatles').

  • :sort (Integer)

    Sort order:; '1' — by duration; '2' — by relevance; '0' — by date added

  • :hd (Integer)

    If not null, only searches for high-definition videos.

  • :adult (Boolean)

    '1' — to disable the Safe Search filter; '0' — to enable the Safe Search filter

  • :filters (Array)

    Filters to apply:; 'youtube' — return YouTube videos only; 'vimeo' — return Vimeo videos only; 'short' — return short videos only; 'long' — return long videos only

  • :search_own (Boolean)
  • :offset (Integer)

    Offset needed to return a specific subset of videos.

  • :longer (Integer)
  • :shorter (Integer)
  • :count (Integer)

    Number of videos to return.


# File 'lib/vk/api/video/methods/search.rb', line 15

Instance Method Details

#adultBoolean

Returns '1' — to disable the Safe Search filter; '0' — to enable the Safe Search filter.

Returns:

  • (Boolean)

    '1' — to disable the Safe Search filter; '0' — to enable the Safe Search filter


38
# File 'lib/vk/api/video/methods/search.rb', line 38

attribute :adult, API::Types::Form::Bool.optional.default(nil)

#countInteger

Returns Number of videos to return.

Returns:

  • (Integer)

    Number of videos to return.


50
# File 'lib/vk/api/video/methods/search.rb', line 50

attribute :count, API::Types::Coercible::Int.optional.default(20)

#filtersArray

Returns Filters to apply:; 'youtube' — return YouTube videos only; 'vimeo' — return Vimeo videos only; 'short' — return short videos only; 'long' — return long videos only.

Returns:

  • (Array)

    Filters to apply:; 'youtube' — return YouTube videos only; 'vimeo' — return Vimeo videos only; 'short' — return short videos only; 'long' — return long videos only


40
# File 'lib/vk/api/video/methods/search.rb', line 40

attribute :filters, API::Types::Coercible::Array.member(API::Types::Coercible::String).optional.default(nil)

#hdInteger

Returns If not null, only searches for high-definition videos.

Returns:

  • (Integer)

    If not null, only searches for high-definition videos.


36
# File 'lib/vk/api/video/methods/search.rb', line 36

attribute :hd, API::Types::Coercible::Int.optional.default(nil)

#longerInteger


46
# File 'lib/vk/api/video/methods/search.rb', line 46

attribute :longer, API::Types::Coercible::Int.optional.default(nil)

#offsetInteger

Returns Offset needed to return a specific subset of videos.

Returns:

  • (Integer)

    Offset needed to return a specific subset of videos.


44
# File 'lib/vk/api/video/methods/search.rb', line 44

attribute :offset, API::Types::Coercible::Int.optional.default(nil)

#qString

Returns Search query string (e.g., 'The Beatles').

Returns:

  • (String)

    Search query string (e.g., 'The Beatles').


32
# File 'lib/vk/api/video/methods/search.rb', line 32

attribute :q, API::Types::Coercible::String

#search_ownBoolean

Returns:

  • (Boolean)

42
# File 'lib/vk/api/video/methods/search.rb', line 42

attribute :search_own, API::Types::Form::Bool.optional.default(nil)

#shorterInteger


48
# File 'lib/vk/api/video/methods/search.rb', line 48

attribute :shorter, API::Types::Coercible::Int.optional.default(nil)

#sortInteger

Returns Sort order:; '1' — by duration; '2' — by relevance; '0' — by date added.

Returns:

  • (Integer)

    Sort order:; '1' — by duration; '2' — by relevance; '0' — by date added


34
# File 'lib/vk/api/video/methods/search.rb', line 34

attribute :sort, API::Types::Coercible::Int.optional.default(nil)