Class: Vk::API::Audio::Methods::Search

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

Overview

Returns a list of audio matching the search criteria.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

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

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :q (String)

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

  • :auto_complete (Boolean)

    '1' — to correct for mistakes in the search query (e.g., if you enter 'Beetles', the system will search for 'Beatles').

  • :lyrics (Boolean)

    '1' — to return only audio files that have associated lyrics.

  • :performer_only (Boolean)

    '1' — to search only by artist name.

  • :sort (Integer)

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

  • :search_own (Boolean)

    '1' — to search among current user's audios. By default: '0'.

  • :offset (Integer)

    Offset needed to return a specific subset of audio files.

  • :count (Integer)

    Number of audio files to return.



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

Instance Method Details

#auto_completeBoolean

Returns '1' — to correct for mistakes in the search query (e.g., if you enter 'Beetles', the system will search for 'Beatles').

Returns:

  • (Boolean)

    '1' — to correct for mistakes in the search query (e.g., if you enter 'Beetles', the system will search for 'Beatles').



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

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

#countInteger

Returns Number of audio files to return.

Returns:

  • (Integer)

    Number of audio files to return.



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

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

#lyricsBoolean

Returns '1' — to return only audio files that have associated lyrics.

Returns:

  • (Boolean)

    '1' — to return only audio files that have associated lyrics.



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

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

#offsetInteger

Returns Offset needed to return a specific subset of audio files.

Returns:

  • (Integer)

    Offset needed to return a specific subset of audio files.



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

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

#performer_onlyBoolean

Returns '1' — to search only by artist name.

Returns:

  • (Boolean)

    '1' — to search only by artist name.



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

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

#qString

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

Returns:

  • (String)

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



30
# File 'lib/vk/api/audio/methods/search.rb', line 30

attribute :q, API::Types::Coercible::String.optional.default(nil)

#search_ownBoolean

Returns '1' — to search among current user's audios. By default: '0'.

Returns:

  • (Boolean)

    '1' — to search among current user's audios. By default: '0'.



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

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

#sortInteger

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

Returns:

  • (Integer)

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



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

attribute :sort, API::Types::Coercible::Int.enum(0, 1, 2).optional.default(nil)