Class: Vk::API::Groups

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/types.rb,
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/responses.rb,
lib/vk/api/groups/group.rb,
lib/vk/api/groups/group_full.rb,
lib/vk/api/groups/group_link.rb,
lib/vk/api/groups/links_item.rb,
lib/vk/api/groups/market_info.rb,
lib/vk/api/groups/member_role.rb,
lib/vk/api/groups/methods/get.rb,
lib/vk/api/groups/groups_array.rb,
lib/vk/api/groups/methods/edit.rb,
lib/vk/api/groups/methods/join.rb,
lib/vk/api/groups/role_options.rb,
lib/vk/api/groups/subject_item.rb,
lib/vk/api/groups/contacts_item.rb,
lib/vk/api/groups/member_status.rb,
lib/vk/api/groups/methods/leave.rb,
lib/vk/api/groups/user_xtr_role.rb,
lib/vk/api/groups/counters_group.rb,
lib/vk/api/groups/group_category.rb,
lib/vk/api/groups/group_settings.rb,
lib/vk/api/groups/methods/create.rb,
lib/vk/api/groups/methods/invite.rb,
lib/vk/api/groups/methods/search.rb,
lib/vk/api/groups/methods/add_link.rb,
lib/vk/api/groups/methods/ban_user.rb,
lib/vk/api/groups/methods/edit_link.rb,
lib/vk/api/groups/methods/get_by_id.rb,
lib/vk/api/groups/methods/is_member.rb,
lib/vk/api/groups/user_xtr_ban_info.rb,
lib/vk/api/groups/member_status_full.rb,
lib/vk/api/groups/methods/edit_place.rb,
lib/vk/api/groups/methods/get_banned.rb,
lib/vk/api/groups/methods/unban_user.rb,
lib/vk/api/groups/group_category_full.rb,
lib/vk/api/groups/methods/delete_link.rb,
lib/vk/api/groups/methods/get_catalog.rb,
lib/vk/api/groups/methods/get_invites.rb,
lib/vk/api/groups/methods/get_members.rb,
lib/vk/api/groups/methods/remove_user.rb,
lib/vk/api/groups/group_xtr_invited_by.rb,
lib/vk/api/groups/methods/edit_manager.rb,
lib/vk/api/groups/methods/get_requests.rb,
lib/vk/api/groups/methods/get_settings.rb,
lib/vk/api/groups/methods/reorder_link.rb,
lib/vk/api/groups/responses/get_response.rb,
lib/vk/api/groups/methods/approve_request.rb,
lib/vk/api/groups/responses/edit_response.rb,
lib/vk/api/groups/responses/join_response.rb,
lib/vk/api/groups/methods/get_catalog_info.rb,
lib/vk/api/groups/responses/leave_response.rb,
lib/vk/api/groups/methods/get_invited_users.rb,
lib/vk/api/groups/responses/create_response.rb,
lib/vk/api/groups/responses/invite_response.rb,
lib/vk/api/groups/responses/search_response.rb,
lib/vk/api/groups/methods/set_callback_server.rb,
lib/vk/api/groups/responses/add_link_response.rb,
lib/vk/api/groups/responses/ban_user_response.rb,
lib/vk/api/groups/responses/edit_link_response.rb,
lib/vk/api/groups/responses/get_by_id_response.rb,
lib/vk/api/groups/responses/is_member_response.rb,
lib/vk/api/groups/methods/get_callback_settings.rb,
lib/vk/api/groups/methods/set_callback_settings.rb,
lib/vk/api/groups/responses/edit_place_response.rb,
lib/vk/api/groups/responses/get_banned_response.rb,
lib/vk/api/groups/responses/unban_user_response.rb,
lib/vk/api/groups/responses/delete_link_response.rb,
lib/vk/api/groups/responses/get_catalog_response.rb,
lib/vk/api/groups/responses/get_invites_response.rb,
lib/vk/api/groups/responses/get_members_response.rb,
lib/vk/api/groups/responses/remove_user_response.rb,
lib/vk/api/groups/responses/edit_manager_response.rb,
lib/vk/api/groups/responses/get_requests_response.rb,
lib/vk/api/groups/responses/get_settings_response.rb,
lib/vk/api/groups/responses/reorder_link_response.rb,
lib/vk/api/groups/responses/approve_request_response.rb,
lib/vk/api/groups/responses/get_catalog_info_response.rb,
lib/vk/api/groups/methods/get_callback_server_settings.rb,
lib/vk/api/groups/methods/set_callback_server_settings.rb,
lib/vk/api/groups/responses/get_invited_users_response.rb,
lib/vk/api/groups/methods/get_callback_confirmation_code.rb,
lib/vk/api/groups/responses/set_callback_server_response.rb,
lib/vk/api/groups/responses/get_callback_settings_response.rb,
lib/vk/api/groups/responses/set_callback_settings_response.rb,
lib/vk/api/groups/responses/get_callback_server_settings_response.rb,
lib/vk/api/groups/responses/set_callback_server_settings_response.rb,
lib/vk/api/groups/responses/get_callback_confirmation_code_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: ContactsItem, CountersGroup, Group, GroupCategory, GroupCategoryFull, GroupFull, GroupLink, GroupSettings, GroupXtrInvitedBy, GroupsArray, LinksItem, MarketInfo, MemberRole, MemberStatus, MemberStatusFull, SubjectItem, UserXtrBanInfo, UserXtrRole

Constant Summary collapse

RoleOptions =

User's credentials as community admin

API::Types::Coercible::String.enum('moderator', 'editor', 'administrator', 'creator')

Instance Attribute Summary

Attributes inherited from Schema::Namespace

#client

DSL collapse

Methods inherited from Schema::Namespace

#call, #initialize

Constructor Details

This class inherits a constructor from Vk::Schema::Namespace

Instance Method Details

Returns Allows to add a link to the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :link (String)

    LInk URL.

  • :text (String)

    Description text for the link.

Returns:

See Also:



2689
2690
2691
2692
2693
2694
2695
# File 'lib/vk/api/methods.rb', line 2689

def add_link(arguments = {})
  require "vk/api/groups/methods/add_link"
  method = Methods::AddLink.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/add_link_response"
  Responses::AddLinkResponse.new(response.deep_symbolize_keys)
end

#approve_request(arguments = {}) ⇒ Vk::API::Groups::Responses::ApproveRequestResponse

Returns Allows to approve join request to the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

Returns:

See Also:



2751
2752
2753
2754
2755
2756
2757
# File 'lib/vk/api/methods.rb', line 2751

def approve_request(arguments = {})
  require "vk/api/groups/methods/approve_request"
  method = Methods::ApproveRequest.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/approve_request_response"
  Responses::ApproveRequestResponse.new(response.deep_symbolize_keys)
end

#ban_user(arguments = {}) ⇒ Vk::API::Groups::Responses::BanUserResponse

Returns Adds a user to a community blacklist.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

  • :end_date (Integer)

    Date (in Unix time) when the user will be removed from the blacklist.

  • :reason (Integer)

    Reason for ban:; '1' — spam; '2' — verbal abuse; '3' — strong language; '4' — irrelevant messages; '0' — other (default)

  • :comment (String)

    Text of comment to ban.

  • :comment_visible (Boolean)

    '1' — text of comment will be visible to the user;; '0' — text of comment will be invisible to the user. ; By default: '0'.

Returns:

See Also:



2514
2515
2516
2517
2518
2519
2520
# File 'lib/vk/api/methods.rb', line 2514

def ban_user(arguments = {})
  require "vk/api/groups/methods/ban_user"
  method = Methods::BanUser.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/ban_user_response"
  Responses::BanUserResponse.new(response.deep_symbolize_keys)
end

#create(arguments = {}) ⇒ Vk::API::Groups::Responses::CreateResponse

Returns Creates a new community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :title (String)

    Community title.

  • :description (String)

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

  • :type (String) — default: "group"

    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.

Returns:

See Also:



2556
2557
2558
2559
2560
2561
2562
# File 'lib/vk/api/methods.rb', line 2556

def create(arguments = {})
  require "vk/api/groups/methods/create"
  method = Methods::Create.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/create_response"
  Responses::CreateResponse.new(response.deep_symbolize_keys)
end

Returns Allows to delete a link from the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :link_id (Integer)

    LInk ID.

Returns:

See Also:



2701
2702
2703
2704
2705
2706
2707
# File 'lib/vk/api/methods.rb', line 2701

def delete_link(arguments = {})
  require "vk/api/groups/methods/delete_link"
  method = Methods::DeleteLink.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/delete_link_response"
  Responses::DeleteLinkResponse.new(response.deep_symbolize_keys)
end

#edit(arguments = {}) ⇒ Vk::API::Groups::Responses::EditResponse

Returns Edits a community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :title (String)

    Community title.

  • :description (String)

    Community description.

  • :screen_name (String)

    Community screen name.

  • :access (Integer)

    Community type. Possible values:; *'0' – open;; *'1' – closed;; *'2' – private.

  • :website (String)

    Website that will be displayed in the community information field.

  • :subject (String)

    Community subject. Possible values: ; *'1' – auto/moto;; *'2' – activity holidays;; *'3' – business;; *'4' – pets;; *'5' – health;; *'6' – dating and communication; ; *'7' – games;; *'8' – IT (computers and software);; *'9' – cinema;; *'10' – beauty and fashion;; *'11' – cooking;; *'12' – art and culture;; *'13' – literature;; *'14' – mobile services and internet;; *'15' – music;; *'16' – science and technology;; *'17' – real estate;; *'18' – news and media;; *'19' – security;; *'20' – education;; *'21' – home and renovations;; *'22' – politics;; *'23' – food;; *'24' – industry;; *'25' – travel;; *'26' – work;; *'27' – entertainment;; *'28' – religion;; *'29' – family;; *'30' – sports;; *'31' – insurance;; *'32' – television;; *'33' – goods and services;; *'34' – hobbies;; *'35' – finance;; *'36' – photo;; *'37' – esoterics;; *'38' – electronics and appliances;; *'39' – erotic;; *'40' – humor;; *'41' – society, humanities;; *'42' – design and graphics.

  • :email (String)

    Organizer email (for events).

  • :phone (String)

    Organizer phone number (for events).

  • :rss (String)

    RSS feed address for import (available only to communities with special permission. Contact vk.com/support to get it.

  • :event_start_date (Integer)

    Event start date in Unixtime format.

  • :event_finish_date (Integer)

    Event finish date in Unixtime format.

  • :event_group_id (Integer)

    Organizer community ID (for events only).

  • :public_category (Integer)

    Public page category ID.

  • :public_subcategory (Integer)

    Public page subcategory ID.

  • :public_date (String)

    Founding date of a company or organization owning the community in "dd.mm.YYYY" format.

  • :wall (Integer)

    Wall settings. Possible values:; *'0' – disabled;; *'1' – open;; *'2' – limited (groups and events only);; *'3' – closed (groups and events only).;

  • :topics (Integer)

    Board topics settings. Possbile values: ; *'0' – disabled;; *'1' – open;; *'2' – limited (for groups and events only).;

  • :photos (Integer)

    Photos settings. Possible values:; *'0' – disabled;; *'1' – open;; *'2' – limited (for groups and events only).;

  • :video (Integer)

    Video settings. Possible values:; *'0' – disabled;; *'1' – open;; *'2' – limited (for groups and events only).

  • :audio (Integer)

    Audio settings. Possible values:; *'0' – disabled;; *'1' – open;; *'2' – limited (for groups and events only).

  • :links (Boolean)

    Links settings (for public pages only). Possible values:; *'0' – disabled;; *'1' – enabled.;

  • :events (Boolean)

    Events settings (for public pages only). Possible values:; *'0' – disabled;; *'1' – enabled.;

  • :places (Boolean)

    Places settings (for public pages only). Possible values:; *'0' – disabled;; *'1' – enabled.;

  • :contacts (Boolean)

    Contacts settings (for public pages only). Possible values:; *'0' – disabled;; *'1' – enabled.;

  • :docs (Integer)

    Documents settings. Possible values:; *'0' – disabled;; *'1' – open;; *'2' – limited (for groups and events only).

  • :wiki (Integer)

    Wiki pages settings. Possible values:; *'0' – disabled;; *'1' – open;; *'2' – limited (for groups and events only).

  • :messages (Boolean)

    Community messages. Possible values:; *'0' — disabled;; *'1' — enabled.

  • :age_limits (Integer) — default: 2

    Community age limits. Possible values:; *'1' — no limits;; *'2' — 16+;; *'3' — 18+.

  • :market (Boolean)

    Market settings. Possible values:; *'0' – disabled;; *'1' – enabled.

  • :market_comments (Boolean)

    market comments settings. Possible values:; *'0' – disabled;; *'1' – enabled.

  • :market_country (Array)

    Market delivery countries.

  • :market_city (Array)

    Market delivery cities (if only one country is specified).

  • :market_currency (Integer)

    Market currency settings. Possbile values: ; *'643' – Russian rubles;; *'980' – Ukrainian hryvnia;; *'398' – Kazakh tenge;; *'978' – Euro;; *'840' – US dollars

  • :market_contact (Integer)

    Seller contact for market.; Set '0' for community messages.

  • :market_wiki (Integer)

    ID of a wiki page with market description.

  • :obscene_filter (Boolean)

    Obscene expressions filter in comments. Possible values: ; *'0' – disabled;; *'1' – enabled.

  • :obscene_stopwords (Boolean)

    Stopwords filter in comments. Possible values: ; *'0' – disabled;; *'1' – enabled.

  • :obscene_words (Array)

    Keywords for stopwords filter.

Returns:

See Also:



2605
2606
2607
2608
2609
2610
2611
# File 'lib/vk/api/methods.rb', line 2605

def edit(arguments = {})
  require "vk/api/groups/methods/edit"
  method = Methods::Edit.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/edit_response"
  Responses::EditResponse.new(response.deep_symbolize_keys)
end

Returns Allows to edit a link in the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :link_id (Integer)

    Link ID.

  • :text (String)

    New description text for the link.

Returns:

See Also:



2714
2715
2716
2717
2718
2719
2720
# File 'lib/vk/api/methods.rb', line 2714

def edit_link(arguments = {})
  require "vk/api/groups/methods/edit_link"
  method = Methods::EditLink.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/edit_link_response"
  Responses::EditLinkResponse.new(response.deep_symbolize_keys)
end

#edit_manager(arguments = {}) ⇒ Vk::API::Groups::Responses::EditManagerResponse

Returns Allows to add, remove or edit the community manager .

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

  • :role (String)

    Manager role. Possible values:; *'moderator';; *'editor';; *'administrator'.

  • :is_contact (Boolean)

    '1' — to show the manager in Contacts block of the community.

  • :contact_position (String)

    Position to show in Contacts block.

  • :contact_phone (String)

    Contact phone.

  • :contact_email (String)

    Contact e-mail.

Returns:

See Also:



2664
2665
2666
2667
2668
2669
2670
# File 'lib/vk/api/methods.rb', line 2664

def edit_manager(arguments = {})
  require "vk/api/groups/methods/edit_manager"
  method = Methods::EditManager.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/edit_manager_response"
  Responses::EditManagerResponse.new(response.deep_symbolize_keys)
end

#edit_place(arguments = {}) ⇒ Vk::API::Groups::Responses::EditPlaceResponse

Returns Edits the place in community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :title (String)

    Place title.

  • :address (String)

    Place address.

  • :country_id (Integer)

    Country ID.

  • :city_id (Integer)

    City ID.

  • :latitude (Number)

    Geographical latitude.

  • :longitude (Number)

    Geographical longitude.

Returns:

See Also:



2622
2623
2624
2625
2626
2627
2628
# File 'lib/vk/api/methods.rb', line 2622

def edit_place(arguments = {})
  require "vk/api/groups/methods/edit_place"
  method = Methods::EditPlace.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/edit_place_response"
  Responses::EditPlaceResponse.new(response.deep_symbolize_keys)
end

#get(arguments = {}) ⇒ Vk::API::Groups::Responses::GetResponse

Returns a list of the communities to which a user belongs.; ;

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :user_id (Integer)

    User ID.

  • :extended (Boolean)

    '1' — to return complete information about a user's communities; '0' — to return a list of community IDs without any additional fields (default);

  • :filter (Array)

    Types of communities to return:; 'admin' — to return communities administered by the user ; 'editor' — to return communities where the user is an administrator or editor; 'moder' — to return communities where the user is an administrator, editor, or moderator; 'groups' — to return only groups; 'publics' — to return only public pages; 'events' — to return only events

  • :fields (Array)

    Profile fields to return.;

  • :offset (Integer)

    Offset needed to return a specific subset of communities.

  • :count (Integer)

    Number of communities to return.

Returns:

See Also:



2390
2391
2392
2393
2394
2395
2396
# File 'lib/vk/api/methods.rb', line 2390

def get(arguments = {})
  require "vk/api/groups/methods/get"
  method = Methods::Get.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_response"
  Responses::GetResponse.new(response.deep_symbolize_keys)
end

#get_banned(arguments = {}) ⇒ Vk::API::Groups::Responses::GetBannedResponse

Returns a list of users on a community blacklist.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

Returns:

See Also:



2541
2542
2543
2544
2545
2546
2547
# File 'lib/vk/api/methods.rb', line 2541

def get_banned(arguments = {})
  require "vk/api/groups/methods/get_banned"
  method = Methods::GetBanned.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_banned_response"
  Responses::GetBannedResponse.new(response.deep_symbolize_keys)
end

#get_by_id(arguments = {}) ⇒ Vk::API::Groups::Responses::GetByIdResponse

Returns information about communities by their IDs.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_ids (Array)

    IDs or screen names of communities.

  • :group_id (String)

    ID or screen name of the community.

  • :fields (Array)

    Group fields to return.;

Returns:

See Also:



2374
2375
2376
2377
2378
2379
2380
# File 'lib/vk/api/methods.rb', line 2374

def get_by_id(arguments = {})
  require "vk/api/groups/methods/get_by_id"
  method = Methods::GetById.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_by_id_response"
  Responses::GetByIdResponse.new(response.deep_symbolize_keys)
end

#get_callback_confirmation_code(arguments = {}) ⇒ Vk::API::Groups::Responses::GetCallbackConfirmationCodeResponse

Returns Callback API confirmation code for the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:



2762
2763
2764
2765
2766
2767
2768
# File 'lib/vk/api/methods.rb', line 2762

def get_callback_confirmation_code(arguments = {})
  require "vk/api/groups/methods/get_callback_confirmation_code"
  method = Methods::GetCallbackConfirmationCode.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_callback_confirmation_code_response"
  Responses::GetCallbackConfirmationCodeResponse.new(response.deep_symbolize_keys)
end

#get_callback_server_settings(arguments = {}) ⇒ Vk::API::Groups::Responses::GetCallbackServerSettingsResponse

Returns server settings for the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:



2773
2774
2775
2776
2777
2778
2779
# File 'lib/vk/api/methods.rb', line 2773

def get_callback_server_settings(arguments = {})
  require "vk/api/groups/methods/get_callback_server_settings"
  method = Methods::GetCallbackServerSettings.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_callback_server_settings_response"
  Responses::GetCallbackServerSettingsResponse.new(response.deep_symbolize_keys)
end

#get_callback_settings(arguments = {}) ⇒ Vk::API::Groups::Responses::GetCallbackSettingsResponse

Returns notifications settings.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:



2784
2785
2786
2787
2788
2789
2790
# File 'lib/vk/api/methods.rb', line 2784

def get_callback_settings(arguments = {})
  require "vk/api/groups/methods/get_callback_settings"
  method = Methods::GetCallbackSettings.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_callback_settings_response"
  Responses::GetCallbackSettingsResponse.new(response.deep_symbolize_keys)
end

#get_catalog(arguments = {}) ⇒ Vk::API::Groups::Responses::GetCatalogResponse

Returns communities list for a catalog category.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :category_id (Integer)

    Category id received from .

  • :subcategory_id (Integer)

    Subcategory id received from .

Returns:

See Also:



2460
2461
2462
2463
2464
2465
2466
# File 'lib/vk/api/methods.rb', line 2460

def get_catalog(arguments = {})
  require "vk/api/groups/methods/get_catalog"
  method = Methods::GetCatalog.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_catalog_response"
  Responses::GetCatalogResponse.new(response.deep_symbolize_keys)
end

#get_catalog_info(arguments = {}) ⇒ Vk::API::Groups::Responses::GetCatalogInfoResponse

Returns categories list for communities catalog

Parameters:

  • arguments (Hash) (defaults to: {})

Returns:

See Also:



2470
2471
2472
2473
2474
2475
2476
# File 'lib/vk/api/methods.rb', line 2470

def get_catalog_info(arguments = {})
  require "vk/api/groups/methods/get_catalog_info"
  method = Methods::GetCatalogInfo.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_catalog_info_response"
  Responses::GetCatalogInfoResponse.new(response.deep_symbolize_keys)
end

#get_invited_users(arguments = {}) ⇒ Vk::API::Groups::Responses::GetInvitedUsersResponse

Returns invited users list of a community

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Group ID to return invited users for.

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer) — default: 20

    Number of results to return.

  • :fields (Array)

    List of additional fields to be returned. ; Available values: 'sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters'.

  • :name_case (String)

    Case for declension of user name and surname. Possible values:; *'nom' — nominative (default);; *'gen' — genitive;; *'dat' — dative;; *'acc' — accusative; ; *'ins' — instrumental;; *'abl' — prepositional.

Returns:

See Also:



2498
2499
2500
2501
2502
2503
2504
# File 'lib/vk/api/methods.rb', line 2498

def get_invited_users(arguments = {})
  require "vk/api/groups/methods/get_invited_users"
  method = Methods::GetInvitedUsers.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_invited_users_response"
  Responses::GetInvitedUsersResponse.new(response.deep_symbolize_keys)
end

#get_invites(arguments = {}) ⇒ Vk::API::Groups::Responses::GetInvitesResponse

Returns a list of invitations to join communities and events.; ;

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :offset (Integer)

    Offset needed to return a specific subset of invitations.

  • :count (Integer) — default: 20

    Number of invitations to return.

  • :extended (Boolean)

    '1' — to return additional for communities..

Returns:

See Also:



2483
2484
2485
2486
2487
2488
2489
# File 'lib/vk/api/methods.rb', line 2483

def get_invites(arguments = {})
  require "vk/api/groups/methods/get_invites"
  method = Methods::GetInvites.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_invites_response"
  Responses::GetInvitesResponse.new(response.deep_symbolize_keys)
end

#get_members(arguments = {}) ⇒ Vk::API::Groups::Responses::GetMembersResponse

Returns a list of community members.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (String)

    ID or screen name of the community.

  • :sort (String) — default: "id_asc"

    Sort order. Available values: 'id_asc', 'id_desc', 'time_asc', 'time_desc'.; 'time_asc' and 'time_desc' are availavle only if the method is called by the group's 'moderator'.

  • :offset (Integer)

    Offset needed to return a specific subset of community members.

  • :count (Integer) — default: 1000

    Number of community members to return.

  • :fields (Array)

    List of additional fields to be returned. ; Available values: 'sex, bdate, city, country, photo_50, photo_100, photo_200_orig, photo_200, photo_400_orig, photo_max, photo_max_orig, online, online_mobile, lists, domain, has_mobile, contacts, connections, site, education, universities, schools, can_post, can_see_all_posts, can_see_audio, can_write_private_message, status, last_seen, common_count, relation, relatives, counters'.

  • :filter (String)

    *'friends' – only friends in this community will be returned;; *'unsure' – only those who pressed 'I may attend' will be returned (if it's an event).

Returns:

See Also:



2406
2407
2408
2409
2410
2411
2412
# File 'lib/vk/api/methods.rb', line 2406

def get_members(arguments = {})
  require "vk/api/groups/methods/get_members"
  method = Methods::GetMembers.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_members_response"
  Responses::GetMembersResponse.new(response.deep_symbolize_keys)
end

#get_requests(arguments = {}) ⇒ Vk::API::Groups::Responses::GetRequestsResponse

Returns a list of requests to the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer) — default: 20

    Number of results to return.

  • :fields (Array)

    Profile fields to return.;

Returns:

See Also:



2647
2648
2649
2650
2651
2652
2653
# File 'lib/vk/api/methods.rb', line 2647

def get_requests(arguments = {})
  require "vk/api/groups/methods/get_requests"
  method = Methods::GetRequests.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_requests_response"
  Responses::GetRequestsResponse.new(response.deep_symbolize_keys)
end

#get_settings(arguments = {}) ⇒ Vk::API::Groups::Responses::GetSettingsResponse

Returns community settings.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

Returns:

See Also:



2633
2634
2635
2636
2637
2638
2639
# File 'lib/vk/api/methods.rb', line 2633

def get_settings(arguments = {})
  require "vk/api/groups/methods/get_settings"
  method = Methods::GetSettings.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/get_settings_response"
  Responses::GetSettingsResponse.new(response.deep_symbolize_keys)
end

#invite(arguments = {}) ⇒ Vk::API::Groups::Responses::InviteResponse

Returns Allows to invite friends to the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

Returns:

See Also:



2676
2677
2678
2679
2680
2681
2682
# File 'lib/vk/api/methods.rb', line 2676

def invite(arguments = {})
  require "vk/api/groups/methods/invite"
  method = Methods::Invite.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/invite_response"
  Responses::InviteResponse.new(response.deep_symbolize_keys)
end

#is_member(arguments = {}) ⇒ Vk::API::Groups::Responses::IsMemberResponse

Returns information specifying whether a user is a member of a community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (String)

    ID or screen name of the community.

  • :user_id (Integer)

    User ID.

  • :user_ids (Array)

    User IDs.

  • :extended (Boolean)

    '1' — to return an extended response with additional fields.; By default: '0'.

Returns:

See Also:



2361
2362
2363
2364
2365
2366
2367
# File 'lib/vk/api/methods.rb', line 2361

def is_member(arguments = {})
  require "vk/api/groups/methods/is_member"
  method = Methods::IsMember.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/is_member_response"
  Responses::IsMemberResponse.new(response.deep_symbolize_keys)
end

#join(arguments = {}) ⇒ Vk::API::Groups::Responses::JoinResponse

Returns With this method you can join the group or public page, and also confirm your participation in an event.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    ID or screen name of the community.

  • :not_sure (String)

    Optional parameter which is taken into account when 'gid' belongs to the event:; '1' — Perhaps I will attend; '0' — I will be there for sure (default); ;

Returns:

See Also:



2418
2419
2420
2421
2422
2423
2424
# File 'lib/vk/api/methods.rb', line 2418

def join(arguments = {})
  require "vk/api/groups/methods/join"
  method = Methods::Join.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/join_response"
  Responses::JoinResponse.new(response.deep_symbolize_keys)
end

#leave(arguments = {}) ⇒ Vk::API::Groups::Responses::LeaveResponse

Returns With this method you can leave a group, public page, or event.; ;.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    ID or screen name of the community.

Returns:

See Also:



2429
2430
2431
2432
2433
2434
2435
# File 'lib/vk/api/methods.rb', line 2429

def leave(arguments = {})
  require "vk/api/groups/methods/leave"
  method = Methods::Leave.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/leave_response"
  Responses::LeaveResponse.new(response.deep_symbolize_keys)
end

#remove_user(arguments = {}) ⇒ Vk::API::Groups::Responses::RemoveUserResponse

Returns Removes a user from the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

Returns:

See Also:



2739
2740
2741
2742
2743
2744
2745
# File 'lib/vk/api/methods.rb', line 2739

def remove_user(arguments = {})
  require "vk/api/groups/methods/remove_user"
  method = Methods::RemoveUser.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/remove_user_response"
  Responses::RemoveUserResponse.new(response.deep_symbolize_keys)
end

Returns Allows to reorder links in the community.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :link_id (Integer)

    Link ID.

  • :after (Integer)

    ID of the link after which to place the link with 'link_id'.

Returns:

See Also:



2727
2728
2729
2730
2731
2732
2733
# File 'lib/vk/api/methods.rb', line 2727

def reorder_link(arguments = {})
  require "vk/api/groups/methods/reorder_link"
  method = Methods::ReorderLink.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/reorder_link_response"
  Responses::ReorderLinkResponse.new(response.deep_symbolize_keys)
end

#search(arguments = {}) ⇒ Vk::API::Groups::Responses::SearchResponse

Returns a list of communities matching the search criteria.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :q (String)

    Search query string.

  • :type (String)

    Community type. Possible values: 'group, page, event.'

  • :country_id (Integer)

    Country ID.

  • :city_id (Integer)

    City ID. If this parameter is transmitted, country_id is ignored.

  • :future (Boolean)

    '1' — to return only upcoming events. Works with the 'type' = 'event' only.

  • :market (Boolean)

    '1' — to return communities with enabled market only.

  • :sort (Integer)

    Sort order. Possible values:; *'0' — default sorting (similar the full version of the site);; *'1' — by growth speed;; *'2'— by the "day attendance/members number" ratio;; *'3' — by the "Likes number/members number" ratio;; *'4' — by the "comments number/members number" ratio;; *'5' — by the "boards entries number/members number" ratio.; ;

  • :offset (Integer)

    Offset needed to return a specific subset of results.

  • :count (Integer) — default: 20

    Number of communities to return.; "Note that you can not receive more than first thousand of results, regardless of 'count' and 'offset' values."

Returns:

See Also:



2448
2449
2450
2451
2452
2453
2454
# File 'lib/vk/api/methods.rb', line 2448

def search(arguments = {})
  require "vk/api/groups/methods/search"
  method = Methods::Search.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/search_response"
  Responses::SearchResponse.new(response.deep_symbolize_keys)
end

#set_callback_server(arguments = {}) ⇒ Vk::API::Groups::Responses::SetCallbackServerResponse

Returns Allow to set server URL for the community. ; ;.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :server_url (String)

    Server URL.

Returns:

See Also:



2796
2797
2798
2799
2800
2801
2802
# File 'lib/vk/api/methods.rb', line 2796

def set_callback_server(arguments = {})
  require "vk/api/groups/methods/set_callback_server"
  method = Methods::SetCallbackServer.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/set_callback_server_response"
  Responses::SetCallbackServerResponse.new(response.deep_symbolize_keys)
end

#set_callback_server_settings(arguments = {}) ⇒ Vk::API::Groups::Responses::SetCallbackServerSettingsResponse

Returns Allow to set server settings.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :secret_key (String)

    Callback API secret key.

Returns:

See Also:



2808
2809
2810
2811
2812
2813
2814
# File 'lib/vk/api/methods.rb', line 2808

def set_callback_server_settings(arguments = {})
  require "vk/api/groups/methods/set_callback_server_settings"
  method = Methods::SetCallbackServerSettings.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/set_callback_server_settings_response"
  Responses::SetCallbackServerSettingsResponse.new(response.deep_symbolize_keys)
end

#set_callback_settings(arguments = {}) ⇒ Vk::API::Groups::Responses::SetCallbackSettingsResponse

Returns Allow to set notifications settings for .

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :message_new (Boolean)

    New messages notificaitions ('0' — disabled, '1' — enabled).

  • :photo_new (Boolean)

    New photos notificaitions ('0' — disabled, '1' — enabled).

  • :audio_new (Boolean)

    New audios notificaitions ('0' — disabled, '1' — enabled).

  • :video_new (Boolean)

    New videos notificaitions ('0' — disabled, '1' — enabled).

  • :wall_reply_new (Boolean)

    New wall replies notificaitions ('0' — disabled, '1' — enabled).

  • :wall_reply_edit (Boolean)

    Wall replies edited notificaitions ('0' — disabled, '1' — enabled).

  • :wall_post_new (Boolean)

    New wall posts notificaitions ('0' — disabled, '1' — enabled).

  • :board_post_new (Boolean)

    New board posts notificaitions ('0' — disabled, '1' — enabled).

  • :board_post_edit (Boolean)

    Board posts edited notificaitions ('0' — disabled, '1' — enabled).

  • :board_post_restore (Boolean)

    Board posts restored notificaitions ('0' — disabled, '1' — enabled).

  • :board_post_delete (Boolean)

    Board posts deleted notificaitions ('0' — disabled, '1' — enabled).

  • :photo_comment_new (Boolean)

    New comment to photo notificaitions ('0' — disabled, '1' — enabled).

  • :video_comment_new (Boolean)

    New comment to video notificaitions ('0' — disabled, '1' — enabled).

  • :market_comment_new (Boolean)

    New comment to market item notificaitions ('0' — disabled, '1' — enabled).

  • :group_join (Boolean)

    Joined community notificaitions ('0' — disabled, '1' — enabled).

  • :group_leave (Boolean)

    Left community notificaitions ('0' — disabled, '1' — enabled).

Returns:

See Also:



2835
2836
2837
2838
2839
2840
2841
# File 'lib/vk/api/methods.rb', line 2835

def set_callback_settings(arguments = {})
  require "vk/api/groups/methods/set_callback_settings"
  method = Methods::SetCallbackSettings.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/set_callback_settings_response"
  Responses::SetCallbackSettingsResponse.new(response.deep_symbolize_keys)
end

#unban_user(arguments = {}) ⇒ Vk::API::Groups::Responses::UnbanUserResponse

Returns Removes a user from a community blacklist.

Parameters:

  • arguments (Hash) (defaults to: {})

Options Hash (arguments):

  • :group_id (Integer)

    Community ID.

  • :user_id (Integer)

    User ID.

Returns:

See Also:



2526
2527
2528
2529
2530
2531
2532
# File 'lib/vk/api/methods.rb', line 2526

def unban_user(arguments = {})
  require "vk/api/groups/methods/unban_user"
  method = Methods::UnbanUser.new(arguments)
  response = method.call(@client)
  require "vk/api/groups/responses/unban_user_response"
  Responses::UnbanUserResponse.new(response.deep_symbolize_keys)
end