Class: Vk::API::Places::Methods::Add

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/places/methods/add.rb

Overview

Adds a new location to the location database.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Places::Methods::Add

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :type (Integer)

    ID of the location's type (e.g., '1' — Home, '2' — Work). To get location type IDs, use the method.

  • :title (String)

    Title of the location.

  • :latitude (Number)

    Geographical latitude, in degrees (from '-90' to '90').

  • :longitude (Number)

    Geographical longitude, in degrees (from '-180' to '180').

  • :country (Integer)

    ID of the location's country. To get country IDs, use the method.

  • :city (Integer)

    ID of the location's city. To get city IDs, use the method.

  • :address (String)

    Street address of the location (e.g., '125 Elm Street').


# File 'lib/vk/api/places/methods/add.rb', line 15

Instance Method Details

#addressString

Returns Street address of the location (e.g., '125 Elm Street').

Returns:

  • (String)

    Street address of the location (e.g., '125 Elm Street').


41
# File 'lib/vk/api/places/methods/add.rb', line 41

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

#cityInteger

Returns ID of the location's city. To get city IDs, use the method.

Returns:

  • (Integer)

    ID of the location's city. To get city IDs, use the method.


39
# File 'lib/vk/api/places/methods/add.rb', line 39

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

#countryInteger

Returns ID of the location's country. To get country IDs, use the method.

Returns:

  • (Integer)

    ID of the location's country. To get country IDs, use the method.


37
# File 'lib/vk/api/places/methods/add.rb', line 37

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

#latitudeNumber

Returns Geographical latitude, in degrees (from '-90' to '90').

Returns:

  • (Number)

    Geographical latitude, in degrees (from '-90' to '90').


33
# File 'lib/vk/api/places/methods/add.rb', line 33

attribute :latitude, API::Types::Coercible::Int

#longitudeNumber

Returns Geographical longitude, in degrees (from '-180' to '180').

Returns:

  • (Number)

    Geographical longitude, in degrees (from '-180' to '180').


35
# File 'lib/vk/api/places/methods/add.rb', line 35

attribute :longitude, API::Types::Coercible::Int

#titleString

Returns Title of the location.

Returns:

  • (String)

    Title of the location.


31
# File 'lib/vk/api/places/methods/add.rb', line 31

attribute :title, API::Types::Coercible::String

#typeInteger

Returns ID of the location's type (e.g., '1' — Home, '2' — Work). To get location type IDs, use the method.

Returns:

  • (Integer)

    ID of the location's type (e.g., '1' — Home, '2' — Work). To get location type IDs, use the method.


29
# File 'lib/vk/api/places/methods/add.rb', line 29

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