Class: Vk::API::Groups::Methods::Create

Inherits:
Schema::Method show all
Defined in:
lib/vk/api/groups/methods/create.rb

Overview

Creates a new community.

Arguments collapse

Instance Method Summary collapse

Methods inherited from Schema::Method

#call, #method, #to_hash

Constructor Details

#initialize(arguments) ⇒ Groups::Methods::Create

Parameters:

  • arguments (Hash)

Options Hash (arguments):

  • :title (String)

    Community title.

  • :description (String)

    Community description (ignored for 'type' = 'public').

  • :type (String)

    Community type. Possible values:; *'group' – group;; *'event' – event;; *'public' – public page

  • :public_category (Integer)

    Category ID (for 'type' = 'public' only).

  • :subtype (Integer)

    Public page subtype. Possible values:; *'1' – place or small business;; *'2' – company, organizaton or website;; *'3' – famous person or group of people;; *'4' – product or work of art.


# File 'lib/vk/api/groups/methods/create.rb', line 15

Instance Method Details

#descriptionString

Returns Community description (ignored for 'type' = 'public').

Returns:

  • (String)

    Community description (ignored for 'type' = 'public').


29
# File 'lib/vk/api/groups/methods/create.rb', line 29

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

#public_categoryInteger

Returns Category ID (for 'type' = 'public' only).

Returns:

  • (Integer)

    Category ID (for 'type' = 'public' only).


33
# File 'lib/vk/api/groups/methods/create.rb', line 33

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

#subtypeInteger

Returns Public page subtype. Possible values:; *'1' – place or small business;; *'2' – company, organizaton or website;; *'3' – famous person or group of people;; *'4' – product or work of art.

Returns:

  • (Integer)

    Public page subtype. Possible values:; *'1' – place or small business;; *'2' – company, organizaton or website;; *'3' – famous person or group of people;; *'4' – product or work of art.


35
# File 'lib/vk/api/groups/methods/create.rb', line 35

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

#titleString

Returns Community title.

Returns:

  • (String)

    Community title.


27
# File 'lib/vk/api/groups/methods/create.rb', line 27

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

#typeString

Returns Community type. Possible values:; *'group' – group;; *'event' – event;; *'public' – public page.

Returns:

  • (String)

    Community type. Possible values:; *'group' – group;; *'event' – event;; *'public' – public page


31
# File 'lib/vk/api/groups/methods/create.rb', line 31

attribute :type, API::Types::Coercible::String.enum("group", "public", "event").optional.default("group")