Class: Vk::API::Ads

Inherits:
Schema::Namespace show all
Defined in:
lib/vk/api/types.rb,
lib/vk/api/ads/ad.rb,
lib/vk/api/methods.rb,
lib/vk/api/objects.rb,
lib/vk/api/ads/rules.rb,
lib/vk/api/ads/stats.rb,
lib/vk/api/ads/users.rb,
lib/vk/api/responses.rb,
lib/vk/api/ads/client.rb,
lib/vk/api/ads/account.rb,
lib/vk/api/ads/accesses.rb,
lib/vk/api/ads/campaign.rb,
lib/vk/api/ads/category.rb,
lib/vk/api/ads/criteria.rb,
lib/vk/api/ads/ad_layout.rb,
lib/vk/api/ads/stats_age.rb,
lib/vk/api/ads/stats_sex.rb,
lib/vk/api/ads/demo_stats.rb,
lib/vk/api/ads/paragraphs.rb,
lib/vk/api/ads/post_stats.rb,
lib/vk/api/ads/targ_stats.rb,
lib/vk/api/ads/access_role.rb,
lib/vk/api/ads/flood_stats.rb,
lib/vk/api/ads/link_status.rb,
lib/vk/api/ads/object_type.rb,
lib/vk/api/ads/stats_cities.rb,
lib/vk/api/ads/stats_format.rb,
lib/vk/api/ads/target_group.rb,
lib/vk/api/ads/reject_reason.rb,
lib/vk/api/ads/stats_sex_age.rb,
lib/vk/api/ads/targ_settings.rb,
lib/vk/api/ads/methods/get_ads.rb,
lib/vk/api/ads/demostats_format.rb,
lib/vk/api/ads/targ_suggestions.rb,
lib/vk/api/ads/methods/check_link.rb,
lib/vk/api/ads/methods/create_ads.rb,
lib/vk/api/ads/methods/delete_ads.rb,
lib/vk/api/ads/methods/get_budget.rb,
lib/vk/api/ads/methods/update_ads.rb,
lib/vk/api/ads/methods/get_clients.rb,
lib/vk/api/ads/methods/get_accounts.rb,
lib/vk/api/ads/methods/get_campaigns.rb,
lib/vk/api/ads/methods/create_clients.rb,
lib/vk/api/ads/methods/delete_clients.rb,
lib/vk/api/ads/methods/get_ads_layout.rb,
lib/vk/api/ads/methods/get_categories.rb,
lib/vk/api/ads/methods/get_statistics.rb,
lib/vk/api/ads/methods/get_upload_url.rb,
lib/vk/api/ads/methods/update_clients.rb,
lib/vk/api/ads/methods/get_flood_stats.rb,
lib/vk/api/ads/methods/get_suggestions.rb,
lib/vk/api/ads/targ_suggestions_cities.rb,
lib/vk/api/ads/methods/add_office_users.rb,
lib/vk/api/ads/methods/create_campaigns.rb,
lib/vk/api/ads/methods/delete_campaigns.rb,
lib/vk/api/ads/methods/get_demographics.rb,
lib/vk/api/ads/methods/get_office_users.rb,
lib/vk/api/ads/methods/update_campaigns.rb,
lib/vk/api/ads/targ_suggestions_regions.rb,
lib/vk/api/ads/targ_suggestions_schools.rb,
lib/vk/api/ads/methods/get_ads_targeting.rb,
lib/vk/api/ads/methods/get_target_groups.rb,
lib/vk/api/ads/responses/get_ads_response.rb,
lib/vk/api/ads/methods/create_target_group.rb,
lib/vk/api/ads/methods/delete_target_group.rb,
lib/vk/api/ads/methods/get_ads_posts_reach.rb,
lib/vk/api/ads/methods/get_targeting_stats.rb,
lib/vk/api/ads/methods/remove_office_users.rb,
lib/vk/api/ads/methods/update_target_group.rb,
lib/vk/api/ads/methods/get_rejection_reason.rb,
lib/vk/api/ads/methods/get_video_upload_url.rb,
lib/vk/api/ads/responses/check_link_response.rb,
lib/vk/api/ads/responses/create_ads_response.rb,
lib/vk/api/ads/responses/delete_ads_response.rb,
lib/vk/api/ads/responses/get_budget_response.rb,
lib/vk/api/ads/responses/update_ads_response.rb,
lib/vk/api/ads/methods/import_target_contacts.rb,
lib/vk/api/ads/responses/get_clients_response.rb,
lib/vk/api/ads/responses/get_accounts_response.rb,
lib/vk/api/ads/responses/get_campaigns_response.rb,
lib/vk/api/ads/responses/create_clients_response.rb,
lib/vk/api/ads/responses/delete_clients_response.rb,
lib/vk/api/ads/responses/get_ads_layout_response.rb,
lib/vk/api/ads/responses/get_categories_response.rb,
lib/vk/api/ads/responses/get_statistics_response.rb,
lib/vk/api/ads/responses/get_upload_url_response.rb,
lib/vk/api/ads/responses/update_clients_response.rb,
lib/vk/api/ads/responses/get_flood_stats_response.rb,
lib/vk/api/ads/responses/get_suggestions_response.rb,
lib/vk/api/ads/responses/add_office_users_response.rb,
lib/vk/api/ads/responses/create_campaigns_response.rb,
lib/vk/api/ads/responses/delete_campaigns_response.rb,
lib/vk/api/ads/responses/get_demographics_response.rb,
lib/vk/api/ads/responses/get_office_users_response.rb,
lib/vk/api/ads/responses/update_campaigns_response.rb,
lib/vk/api/ads/responses/get_ads_targeting_response.rb,
lib/vk/api/ads/responses/get_target_groups_response.rb,
lib/vk/api/ads/responses/create_target_group_response.rb,
lib/vk/api/ads/responses/delete_target_group_response.rb,
lib/vk/api/ads/responses/get_ads_posts_reach_response.rb,
lib/vk/api/ads/responses/get_targeting_stats_response.rb,
lib/vk/api/ads/responses/remove_office_users_response.rb,
lib/vk/api/ads/responses/update_target_group_response.rb,
lib/vk/api/ads/responses/get_rejection_reason_response.rb,
lib/vk/api/ads/responses/get_video_upload_url_response.rb,
lib/vk/api/ads/responses/import_target_contacts_response.rb

Defined Under Namespace

Modules: Methods, Responses Classes: Accesses, Account, Ad, AdLayout, Campaign, Category, Client, Criteria, DemoStats, DemostatsFormat, FloodStats, LinkStatus, Paragraphs, PostStats, RejectReason, Rules, Stats, StatsAge, StatsCities, StatsFormat, StatsSex, StatsSexAge, TargSettings, TargStats, TargSuggestions, TargSuggestionsCities, TargSuggestionsRegions, TargSuggestionsSchools, TargetGroup, Users

Constant Summary collapse

AccessRole =

Current user's role

API::Types::Coercible::String.enum('admin', 'manager', 'reports')
ObjectType =

Object type

API::Types::Coercible::String.enum('ad', 'campaign', 'client', 'office')

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

#add_office_users(arguments = {}) ⇒ Vk::API::Ads::Responses::AddOfficeUsersResponse

Returns Adds managers and/or supervisors to advertising account.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.

Returns:

See Also:



5907
5908
5909
5910
5911
5912
5913
# File 'lib/vk/api/methods.rb', line 5907

def add_office_users(arguments = {})
  require "vk/api/ads/methods/add_office_users"
  method = Methods::AddOfficeUsers.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/add_office_users_response"
  Responses::AddOfficeUsersResponse.new(response.deep_symbolize_keys)
end

Returns Allows to check the ad link.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :link_type (String)

    Object type:; *'community' — community;; *'post' — community post;; *'application' — VK application;; *'video' — video;; *'site' — external site.

  • :link_url (String)

    Object URL.

  • :campaign_id (Integer)

    Campaign ID

Returns:

See Also:



5829
5830
5831
5832
5833
5834
5835
# File 'lib/vk/api/methods.rb', line 5829

def check_link(arguments = {})
  require "vk/api/ads/methods/check_link"
  method = Methods::CheckLink.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/check_link_response"
  Responses::CheckLinkResponse.new(response.deep_symbolize_keys)
end

#create_ads(arguments = {}) ⇒ Vk::API::Ads::Responses::CreateAdsResponse

Returns Creates ads.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe created ads. Description of 'ad_specification' objects see below.

Returns:

See Also:



5791
5792
5793
5794
5795
5796
5797
# File 'lib/vk/api/methods.rb', line 5791

def create_ads(arguments = {})
  require "vk/api/ads/methods/create_ads"
  method = Methods::CreateAds.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/create_ads_response"
  Responses::CreateAdsResponse.new(response.deep_symbolize_keys)
end

#create_campaigns(arguments = {}) ⇒ Vk::API::Ads::Responses::CreateCampaignsResponse

Returns Creates advertising campaigns.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe created campaigns. Description of 'campaign_specification' objects see below.

Returns:

See Also:



5704
5705
5706
5707
5708
5709
5710
# File 'lib/vk/api/methods.rb', line 5704

def create_campaigns(arguments = {})
  require "vk/api/ads/methods/create_campaigns"
  method = Methods::CreateCampaigns.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/create_campaigns_response"
  Responses::CreateCampaignsResponse.new(response.deep_symbolize_keys)
end

#create_clients(arguments = {}) ⇒ Vk::API::Ads::Responses::CreateClientsResponse

Returns Creates clients of an advertising agency.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe created campaigns. Description of 'client_specification' objects see below.

Returns:

See Also:



5654
5655
5656
5657
5658
5659
5660
# File 'lib/vk/api/methods.rb', line 5654

def create_clients(arguments = {})
  require "vk/api/ads/methods/create_clients"
  method = Methods::CreateClients.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/create_clients_response"
  Responses::CreateClientsResponse.new(response.deep_symbolize_keys)
end

#create_target_group(arguments = {}) ⇒ Vk::API::Ads::Responses::CreateTargetGroupResponse

Returns Creates a group to re-target ads for users who visited advertiser's site (viewed information about the product, registered, etc.).

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'Only for advertising agencies.'; ID of the client with the advertising account where the group will be created.;

  • :name (String)

    Name of the target group — a string up to 64 characters long.

  • :domain (String)

    Domain of the site where user accounting code will be placed.

  • :lifetime (Integer)

    'For groups with auditory created with pixel code only.'; ; Number of days after that users will be automatically removed from the group. '0' — not to remove users.;

Returns:

See Also:



6022
6023
6024
6025
6026
6027
6028
# File 'lib/vk/api/methods.rb', line 6022

def create_target_group(arguments = {})
  require "vk/api/ads/methods/create_target_group"
  method = Methods::CreateTargetGroup.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/create_target_group_response"
  Responses::CreateTargetGroupResponse.new(response.deep_symbolize_keys)
end

#delete_ads(arguments = {}) ⇒ Vk::API::Ads::Responses::DeleteAdsResponse

Returns Archives ads.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ids (String)

    Serialized JSON array with ad IDs.

Returns:

See Also:



5815
5816
5817
5818
5819
5820
5821
# File 'lib/vk/api/methods.rb', line 5815

def delete_ads(arguments = {})
  require "vk/api/ads/methods/delete_ads"
  method = Methods::DeleteAds.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/delete_ads_response"
  Responses::DeleteAdsResponse.new(response.deep_symbolize_keys)
end

#delete_campaigns(arguments = {}) ⇒ Vk::API::Ads::Responses::DeleteCampaignsResponse

Returns Archives advertising campaigns.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ids (String)

    Serialized JSON array with IDs of deleted campaigns.

Returns:

See Also:



5728
5729
5730
5731
5732
5733
5734
# File 'lib/vk/api/methods.rb', line 5728

def delete_campaigns(arguments = {})
  require "vk/api/ads/methods/delete_campaigns"
  method = Methods::DeleteCampaigns.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/delete_campaigns_response"
  Responses::DeleteCampaignsResponse.new(response.deep_symbolize_keys)
end

#delete_clients(arguments = {}) ⇒ Vk::API::Ads::Responses::DeleteClientsResponse

Returns Archives clients of an advertising agency.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ids (String)

    Serialized JSON array with IDs of deleted clients.

Returns:

See Also:



5678
5679
5680
5681
5682
5683
5684
# File 'lib/vk/api/methods.rb', line 5678

def delete_clients(arguments = {})
  require "vk/api/ads/methods/delete_clients"
  method = Methods::DeleteClients.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/delete_clients_response"
  Responses::DeleteClientsResponse.new(response.deep_symbolize_keys)
end

#delete_target_group(arguments = {}) ⇒ Vk::API::Ads::Responses::DeleteTargetGroupResponse

Returns Deletes a retarget group.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'Only for advertising agencies.' ; ID of the client with the advertising account where the group will be created.;

  • :target_group_id (Integer)

    Group ID.

Returns:

See Also:



6051
6052
6053
6054
6055
6056
6057
# File 'lib/vk/api/methods.rb', line 6051

def delete_target_group(arguments = {})
  require "vk/api/ads/methods/delete_target_group"
  method = Methods::DeleteTargetGroup.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/delete_target_group_response"
  Responses::DeleteTargetGroupResponse.new(response.deep_symbolize_keys)
end

#get_accounts(arguments = {}) ⇒ Vk::API::Ads::Responses::GetAccountsResponse

Returns a list of advertising accounts.

Parameters:

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

Returns:

See Also:



5631
5632
5633
5634
5635
5636
5637
# File 'lib/vk/api/methods.rb', line 5631

def get_accounts(arguments = {})
  require "vk/api/ads/methods/get_accounts"
  method = Methods::GetAccounts.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_accounts_response"
  Responses::GetAccountsResponse.new(response.deep_symbolize_keys)
end

#get_ads(arguments = {}) ⇒ Vk::API::Ads::Responses::GetAdsResponse

Returns number of ads.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'Available and required for advertising agencies.' ID of the client ads are retrieved from.

  • :include_deleted (Boolean)

    Flag that specifies whether archived ads shall be shown:; *0 — show only active ads;; *1 — show all ads.;

  • :campaign_ids (String)

    Filter by advertising campaigns. ; Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.;

  • :ad_ids (String)

    Filter by ads. ; Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.;

  • :limit (Integer)

    Limit of number of returned ads. Used only if ad_ids parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.

  • :offset (Integer)

    Offset. Used in the same cases as 'limit' parameter.

Returns:

See Also:



5745
5746
5747
5748
5749
5750
5751
# File 'lib/vk/api/methods.rb', line 5745

def get_ads(arguments = {})
  require "vk/api/ads/methods/get_ads"
  method = Methods::GetAds.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_ads_response"
  Responses::GetAdsResponse.new(response.deep_symbolize_keys)
end

#get_ads_layout(arguments = {}) ⇒ Vk::API::Ads::Responses::GetAdsLayoutResponse

Returns descriptions of ad layouts.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'For advertising agencies.' ID of the client ads are retrieved from.

  • :include_deleted (Boolean)

    Flag that specifies whether archived ads shall be shown.; *0 — show only active ads;; *1 — show all ads.;

  • :campaign_ids (String)

    Filter by advertising campaigns.; Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.;

  • :ad_ids (String)

    Filter by ads.; Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.;

  • :limit (Integer)

    Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.

  • :offset (Integer)

    Offset. Used in the same cases as 'limit' parameter.

Returns:

See Also:



5762
5763
5764
5765
5766
5767
5768
# File 'lib/vk/api/methods.rb', line 5762

def get_ads_layout(arguments = {})
  require "vk/api/ads/methods/get_ads_layout"
  method = Methods::GetAdsLayout.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_ads_layout_response"
  Responses::GetAdsLayoutResponse.new(response.deep_symbolize_keys)
end

#get_ads_posts_reach(arguments = {}) ⇒ Vk::API::Ads::Responses::GetAdsPostsReachResponse

Returns Allows to get detailed information about the ad post reach.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ads_ids (String)

    Ads IDS separated by comma.

Returns:

See Also:



5873
5874
5875
5876
5877
5878
5879
# File 'lib/vk/api/methods.rb', line 5873

def get_ads_posts_reach(arguments = {})
  require "vk/api/ads/methods/get_ads_posts_reach"
  method = Methods::GetAdsPostsReach.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_ads_posts_reach_response"
  Responses::GetAdsPostsReachResponse.new(response.deep_symbolize_keys)
end

#get_ads_targeting(arguments = {}) ⇒ Vk::API::Ads::Responses::GetAdsTargetingResponse

Returns Retuns ad targeting parameters.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'For advertising agencies.' ID of the client ads are retrieved from.

  • :include_deleted (Boolean)

    flag that specifies whether archived ads shall be shown:; *0 — show only active ads;; *1 — show all ads.

  • :campaign_ids (String)

    Filter by advertising campaigns.; Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.;

  • :ad_ids (String)

    Filter by ads.; Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.

  • :limit (Integer)

    Limit of number of returned ads. Used only if 'ad_ids' parameter is null, and 'campaign_ids' parameter contains ID of only one campaign.

  • :offset (Integer)

    Offset needed to return a specific subset of results.

Returns:

See Also:



5779
5780
5781
5782
5783
5784
5785
# File 'lib/vk/api/methods.rb', line 5779

def get_ads_targeting(arguments = {})
  require "vk/api/ads/methods/get_ads_targeting"
  method = Methods::GetAdsTargeting.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_ads_targeting_response"
  Responses::GetAdsTargetingResponse.new(response.deep_symbolize_keys)
end

#get_budget(arguments = {}) ⇒ Vk::API::Ads::Responses::GetBudgetResponse

Returns current budget of the advertising account.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

Returns:

See Also:



5884
5885
5886
5887
5888
5889
5890
# File 'lib/vk/api/methods.rb', line 5884

def get_budget(arguments = {})
  require "vk/api/ads/methods/get_budget"
  method = Methods::GetBudget.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_budget_response"
  Responses::GetBudgetResponse.new(response.deep_symbolize_keys)
end

#get_campaigns(arguments = {}) ⇒ Vk::API::Ads::Responses::GetCampaignsResponse

Returns a list of campaigns in an advertising account.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'For advertising agencies'. ID of the client advertising campaigns are retrieved from.

  • :include_deleted (Boolean)

    Flag that specifies whether archived ads shall be shown.; *0 — show only active campaigns;; *1 — show all campaigns.;

  • :campaign_ids (String)

    Filter of advertising campaigns to show. ; Serialized JSON array with campaign IDs. Only campaigns that exist in 'campaign_ids' and belong to the specified advertising account will be shown. If the parameter is null, all campaigns will be shown.;

Returns:

See Also:



5692
5693
5694
5695
5696
5697
5698
# File 'lib/vk/api/methods.rb', line 5692

def get_campaigns(arguments = {})
  require "vk/api/ads/methods/get_campaigns"
  method = Methods::GetCampaigns.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_campaigns_response"
  Responses::GetCampaignsResponse.new(response.deep_symbolize_keys)
end

#get_categories(arguments = {}) ⇒ Vk::API::Ads::Responses::GetCategoriesResponse

Returns a list of possible ad categories.

Parameters:

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

Options Hash (arguments):

  • :lang (String)

    Language. The full list of supported languages is .

Returns:

See Also:



5963
5964
5965
5966
5967
5968
5969
# File 'lib/vk/api/methods.rb', line 5963

def get_categories(arguments = {})
  require "vk/api/ads/methods/get_categories"
  method = Methods::GetCategories.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_categories_response"
  Responses::GetCategoriesResponse.new(response.deep_symbolize_keys)
end

#get_clients(arguments = {}) ⇒ Vk::API::Ads::Responses::GetClientsResponse

Returns a list of advertising agency's clients.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

Returns:

See Also:



5642
5643
5644
5645
5646
5647
5648
# File 'lib/vk/api/methods.rb', line 5642

def get_clients(arguments = {})
  require "vk/api/ads/methods/get_clients"
  method = Methods::GetClients.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_clients_response"
  Responses::GetClientsResponse.new(response.deep_symbolize_keys)
end

#get_demographics(arguments = {}) ⇒ Vk::API::Ads::Responses::GetDemographicsResponse

Returns demographics for ads or campaigns.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ids_type (String)

    Type of requested objects listed in 'ids' parameter:; *ad — ads;; *campaign — campaigns.;

  • :ids (String)

    IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.

  • :period (String)

    Data grouping by dates:; *day — statistics by days;; *month — statistics by months;; *overall — overall statistics.; 'date_from' and 'date_to' parameters set temporary limits.

  • :date_from (String)

    Date to show statistics from. For different value of 'period' different date format is used:; *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011; **0 — day it was created on;; *month: YYYY-MM, example: 2011-09 — September 2011; **0 — month it was created in;; *overall: 0.

  • :date_to (String)

    Date to show statistics to. For different value of 'period' different date format is used:; *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011; **0 — current day;; *month: YYYY-MM, example: 2011-09 — September 2011; **0 — current month;; *overall: 0.

Returns:

See Also:



5861
5862
5863
5864
5865
5866
5867
# File 'lib/vk/api/methods.rb', line 5861

def get_demographics(arguments = {})
  require "vk/api/ads/methods/get_demographics"
  method = Methods::GetDemographics.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_demographics_response"
  Responses::GetDemographicsResponse.new(response.deep_symbolize_keys)
end

#get_flood_stats(arguments = {}) ⇒ Vk::API::Ads::Responses::GetFloodStatsResponse

Returns information about current state of a counter — number of remaining runs of methods and time to the next counter nulling in seconds.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

Returns:

See Also:



5995
5996
5997
5998
5999
6000
6001
# File 'lib/vk/api/methods.rb', line 5995

def get_flood_stats(arguments = {})
  require "vk/api/ads/methods/get_flood_stats"
  method = Methods::GetFloodStats.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_flood_stats_response"
  Responses::GetFloodStatsResponse.new(response.deep_symbolize_keys)
end

#get_office_users(arguments = {}) ⇒ Vk::API::Ads::Responses::GetOfficeUsersResponse

Returns a list of managers and supervisors of advertising account.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

Returns:

See Also:



5895
5896
5897
5898
5899
5900
5901
# File 'lib/vk/api/methods.rb', line 5895

def get_office_users(arguments = {})
  require "vk/api/ads/methods/get_office_users"
  method = Methods::GetOfficeUsers.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_office_users_response"
  Responses::GetOfficeUsersResponse.new(response.deep_symbolize_keys)
end

#get_rejection_reason(arguments = {}) ⇒ Vk::API::Ads::Responses::GetRejectionReasonResponse

Returns a reason of ad rejection for pre-moderation.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ad_id (Integer)

    Ad ID.

Returns:

See Also:



6007
6008
6009
6010
6011
6012
6013
# File 'lib/vk/api/methods.rb', line 6007

def get_rejection_reason(arguments = {})
  require "vk/api/ads/methods/get_rejection_reason"
  method = Methods::GetRejectionReason.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_rejection_reason_response"
  Responses::GetRejectionReasonResponse.new(response.deep_symbolize_keys)
end

#get_statistics(arguments = {}) ⇒ Vk::API::Ads::Responses::GetStatisticsResponse

Returns statistics of performance indicators for ads, campaigns, clients or the whole account.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ids_type (String)

    Type of requested objects listed in 'ids' parameter:; *ad — ads;; *campaign — campaigns;; *client — clients;; *office — account.;

  • :ids (String)

    IDs requested ads, campaigns, clients or account, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.

  • :period (String)

    Data grouping by dates:; *day — statistics by days;; *month — statistics by months;; *overall — overall statistics.; 'date_from' and 'date_to' parameters set temporary limits.

  • :date_from (String)

    Date to show statistics from. For different value of 'period' different date format is used:; *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011; **0 — day it was created on;; *month: YYYY-MM, example: 2011-09 — September 2011; **0 — month it was created in;; *overall: 0.;

  • :date_to (String)

    Date to show statistics to. For different value of 'period' different date format is used:; *day: YYYY-MM-DD, example: 2011-09-27 — September 27, 2011; **0 — current day;; *month: YYYY-MM, example: 2011-09 — September 2011; **0 — current month;; *overall: 0.

Returns:

See Also:



5845
5846
5847
5848
5849
5850
5851
# File 'lib/vk/api/methods.rb', line 5845

def get_statistics(arguments = {})
  require "vk/api/ads/methods/get_statistics"
  method = Methods::GetStatistics.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_statistics_response"
  Responses::GetStatisticsResponse.new(response.deep_symbolize_keys)
end

#get_suggestions(arguments = {}) ⇒ Vk::API::Ads::Responses::GetSuggestionsResponse

Returns a set of auto-suggestions for various targeting parameters.

Parameters:

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

Options Hash (arguments):

  • :section (String)

    Section, suggestions are retrieved in. Available values:; *countries — request of a list of countries. If q is not set or blank, a short list of countries is shown. Otherwise, a full list of countries is shown.; *regions — requested list of regions. 'country' parameter is required.; *cities — requested list of cities. 'country' parameter is required.; *districts — requested list of districts. 'cities' parameter is required.; *stations — requested list of subway stations. 'cities' parameter is required.; *streets — requested list of cities. 'cities' parameter is required.; *schools — requested list of educational organizations. 'cities' parameter is required.; *interests — requested list of interests.; *positions — requested list of positions (professions).; *group_types — requested list of group types.; *religions — requested list of religious commitments.; *browsers — requested list of browsers and mobile devices.;

  • :ids (String)

    Objects IDs separated by commas. If the parameter is passed, 'q, country, cities' should not be passed.

  • :q (String)

    Filter-line of the request (for countries, regions, cities, streets, schools, interests, positions).

  • :country (Integer)

    ID of the country objects are searched in.

  • :cities (String)

    IDs of cities where objects are searched in, separated with a comma.

  • :lang (String)

    Language of the returned string values. Supported languages:; *ru — Russian;; *ua — Ukrainian;; *en — English.;

Returns:

See Also:



5952
5953
5954
5955
5956
5957
5958
# File 'lib/vk/api/methods.rb', line 5952

def get_suggestions(arguments = {})
  require "vk/api/ads/methods/get_suggestions"
  method = Methods::GetSuggestions.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_suggestions_response"
  Responses::GetSuggestionsResponse.new(response.deep_symbolize_keys)
end

#get_target_groups(arguments = {}) ⇒ Vk::API::Ads::Responses::GetTargetGroupsResponse

Returns a list of target groups.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'Only for advertising agencies.'; ID of the client with the advertising account where the group will be created.;

  • :extended (Boolean)

    '1' — to return pixel code.

Returns:

See Also:



6064
6065
6066
6067
6068
6069
6070
# File 'lib/vk/api/methods.rb', line 6064

def get_target_groups(arguments = {})
  require "vk/api/ads/methods/get_target_groups"
  method = Methods::GetTargetGroups.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_target_groups_response"
  Responses::GetTargetGroupsResponse.new(response.deep_symbolize_keys)
end

#get_targeting_stats(arguments = {}) ⇒ Vk::API::Ads::Responses::GetTargetingStatsResponse

Returns the size of targeting audience, and also recommended values for CPC and CPM.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :criteria (String)

    Serialized JSON object that describes targeting parameters. Description of 'criteria' object see below.

  • :ad_id (Integer)

    ID of an ad which targeting parameters shall be analyzed.

  • :ad_format (Integer)

    Ad format. Possible values:; *'1' — image and text;; *'2' — big image;; *'3' — exclusive format;; *'4' — community, square image;; *'7' — special app format;; *'8' — special community format;; *'9' — post in community;; *'10' — app board.

  • :ad_platform (String)

    Platforms to use for ad showing. Possible values:; (for 'ad_format' = '1'); *'0' — VK and partner sites;; *'1' — VK only.; (for 'ad_format' = '9'); *'all' — all platforms;; *'desktop' — desktop version;; *'mobile' — mobile version and apps.

  • :link_url (String)

    URL for the advertised object.

  • :link_domain (String)

    Domain of the advertised object.

Returns:

See Also:



5936
5937
5938
5939
5940
5941
5942
# File 'lib/vk/api/methods.rb', line 5936

def get_targeting_stats(arguments = {})
  require "vk/api/ads/methods/get_targeting_stats"
  method = Methods::GetTargetingStats.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_targeting_stats_response"
  Responses::GetTargetingStatsResponse.new(response.deep_symbolize_keys)
end

#get_upload_url(arguments = {}) ⇒ Vk::API::Ads::Responses::GetUploadUrlResponse

Returns URL to upload an ad photo to.

Parameters:

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

Options Hash (arguments):

  • :ad_format (Integer)

    Ad format:; *1 — image and text;; *2 — big image;; *3 — exclusive format;; *4 — community, square image;; *7 — special app format.

Returns:

See Also:



5974
5975
5976
5977
5978
5979
5980
# File 'lib/vk/api/methods.rb', line 5974

def get_upload_url(arguments = {})
  require "vk/api/ads/methods/get_upload_url"
  method = Methods::GetUploadUrl.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_upload_url_response"
  Responses::GetUploadUrlResponse.new(response.deep_symbolize_keys)
end

#get_video_upload_url(arguments = {}) ⇒ Vk::API::Ads::Responses::GetVideoUploadUrlResponse

Returns URL to upload an ad video to.

Parameters:

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

Returns:

See Also:



5984
5985
5986
5987
5988
5989
5990
# File 'lib/vk/api/methods.rb', line 5984

def get_video_upload_url(arguments = {})
  require "vk/api/ads/methods/get_video_upload_url"
  method = Methods::GetVideoUploadUrl.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/get_video_upload_url_response"
  Responses::GetVideoUploadUrlResponse.new(response.deep_symbolize_keys)
end

#import_target_contacts(arguments = {}) ⇒ Vk::API::Ads::Responses::ImportTargetContactsResponse

Returns Imports a list of advertiser's contacts to count VK registered users against the target group.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'Only for advertising agencies.' ; ID of the client with the advertising account where the group will be created.;

  • :target_group_id (Integer)

    Target group ID.

  • :contacts (String)

    List of phone numbers, emails or user IDs separated with a comma.

Returns:

See Also:



6078
6079
6080
6081
6082
6083
6084
# File 'lib/vk/api/methods.rb', line 6078

def import_target_contacts(arguments = {})
  require "vk/api/ads/methods/import_target_contacts"
  method = Methods::ImportTargetContacts.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/import_target_contacts_response"
  Responses::ImportTargetContactsResponse.new(response.deep_symbolize_keys)
end

#remove_office_users(arguments = {}) ⇒ Vk::API::Ads::Responses::RemoveOfficeUsersResponse

Returns Removes managers and/or supervisors from advertising account.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :ids (String)

    Serialized JSON array with IDs of deleted managers.

Returns:

See Also:



5919
5920
5921
5922
5923
5924
5925
# File 'lib/vk/api/methods.rb', line 5919

def remove_office_users(arguments = {})
  require "vk/api/ads/methods/remove_office_users"
  method = Methods::RemoveOfficeUsers.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/remove_office_users_response"
  Responses::RemoveOfficeUsersResponse.new(response.deep_symbolize_keys)
end

#update_ads(arguments = {}) ⇒ Vk::API::Ads::Responses::UpdateAdsResponse

Returns Edits ads.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe changes in ads. Description of 'ad_edit_specification' objects see below.

Returns:

See Also:



5803
5804
5805
5806
5807
5808
5809
# File 'lib/vk/api/methods.rb', line 5803

def update_ads(arguments = {})
  require "vk/api/ads/methods/update_ads"
  method = Methods::UpdateAds.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/update_ads_response"
  Responses::UpdateAdsResponse.new(response.deep_symbolize_keys)
end

#update_campaigns(arguments = {}) ⇒ Vk::API::Ads::Responses::UpdateCampaignsResponse

Returns Edits advertising campaigns.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe changes in campaigns. Description of 'campaign_mod' objects see below.

Returns:

See Also:



5716
5717
5718
5719
5720
5721
5722
# File 'lib/vk/api/methods.rb', line 5716

def update_campaigns(arguments = {})
  require "vk/api/ads/methods/update_campaigns"
  method = Methods::UpdateCampaigns.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/update_campaigns_response"
  Responses::UpdateCampaignsResponse.new(response.deep_symbolize_keys)
end

#update_clients(arguments = {}) ⇒ Vk::API::Ads::Responses::UpdateClientsResponse

Returns Edits clients of an advertising agency.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :data (String)

    Serialized JSON array of objects that describe changes in clients. Description of 'client_mod' objects see below.

Returns:

See Also:



5666
5667
5668
5669
5670
5671
5672
# File 'lib/vk/api/methods.rb', line 5666

def update_clients(arguments = {})
  require "vk/api/ads/methods/update_clients"
  method = Methods::UpdateClients.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/update_clients_response"
  Responses::UpdateClientsResponse.new(response.deep_symbolize_keys)
end

#update_target_group(arguments = {}) ⇒ Vk::API::Ads::Responses::UpdateTargetGroupResponse

Returns Edits a retarget group.

Parameters:

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

Options Hash (arguments):

  • :account_id (Integer)

    Advertising account ID.

  • :client_id (Integer)

    'Only for advertising agencies.' ; ID of the client with the advertising account where the group will be created.;

  • :target_group_id (Integer)

    Group ID.

  • :name (String)

    New name of the target group — a string up to 64 characters long.

  • :domain (String)

    Domain of the site where user accounting code will be placed.

  • :lifetime (Integer)

    'Only for the groups that get audience from sites with user accounting code.'; Time in days when users added to a retarget group will be automatically excluded from it. ; '0' – automatic exclusion is off.

Returns:

See Also:



6038
6039
6040
6041
6042
6043
6044
# File 'lib/vk/api/methods.rb', line 6038

def update_target_group(arguments = {})
  require "vk/api/ads/methods/update_target_group"
  method = Methods::UpdateTargetGroup.new(arguments)
  response = method.call(@client)
  require "vk/api/ads/responses/update_target_group_response"
  Responses::UpdateTargetGroupResponse.new(response.deep_symbolize_keys)
end