Package com.vk.api.sdk.queries.ads
Class AdsGetDemographicsQuery
- java.lang.Object
-
- com.vk.api.sdk.client.ApiRequest<R>
-
- com.vk.api.sdk.client.AbstractQueryBuilder<AdsGetDemographicsQuery,java.util.List<GetDemographicsResponse>>
-
- com.vk.api.sdk.queries.ads.AdsGetDemographicsQuery
-
public class AdsGetDemographicsQuery extends AbstractQueryBuilder<AdsGetDemographicsQuery,java.util.List<GetDemographicsResponse>>
Query for Ads.getDemographics method
-
-
Constructor Summary
Constructors Constructor Description AdsGetDemographicsQuery(VkApiClient client, UserActor actor, int accountId, GetDemographicsIdsType idsType, java.lang.String ids, GetDemographicsPeriod period, java.lang.String dateFrom, java.lang.String dateTo)Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AdsGetDemographicsQueryaccountId(int value)Advertising account ID.protected AdsGetDemographicsQuerydateFrom(java.lang.String value)Date to show statistics from.protected AdsGetDemographicsQuerydateTo(java.lang.String value)Date to show statistics to.protected java.util.List<java.lang.String>essentialKeys()Get list of required parameter namesprotected AdsGetDemographicsQuerygetThis()Get reference to this objectprotected AdsGetDemographicsQueryids(java.lang.String value)IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'.protected AdsGetDemographicsQueryidsType(GetDemographicsIdsType value)Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns.protected AdsGetDemographicsQueryperiod(GetDemographicsPeriod value)Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics.-
Methods inherited from class com.vk.api.sdk.client.AbstractQueryBuilder
accessToken, build, captchaKey, captchaSid, clientSecret, confirm, getBody, getMethod, getParams, lang, toString, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, version
-
Methods inherited from class com.vk.api.sdk.client.ApiRequest
execute, executeAsRaw, executeAsString, getClient, getGson, getHeaders, getResponseClass, getUrl, setHeaders
-
-
-
-
Constructor Detail
-
AdsGetDemographicsQuery
public AdsGetDemographicsQuery(VkApiClient client, UserActor actor, int accountId, GetDemographicsIdsType idsType, java.lang.String ids, GetDemographicsPeriod period, java.lang.String dateFrom, java.lang.String dateTo)
Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters- Parameters:
client- VK API clientactor- actor with access tokenaccountId- value of "account id" parameter.idsType- value of "ids type" parameter.ids- value of "ids" parameter.period- value of "period" parameter.dateFrom- value of "date from" parameter.dateTo- value of "date to" parameter.
-
-
Method Detail
-
accountId
protected AdsGetDemographicsQuery accountId(int value)
Advertising account ID.- Parameters:
value- value of "account id" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
idsType
protected AdsGetDemographicsQuery idsType(GetDemographicsIdsType value)
Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns.- Parameters:
value- value of "ids type" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
ids
protected AdsGetDemographicsQuery ids(java.lang.String value)
IDs requested ads or campaigns, separated with a comma, depending on the value set in 'ids_type'. Maximum 2000 objects.- Parameters:
value- value of "ids" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
period
protected AdsGetDemographicsQuery period(GetDemographicsPeriod value)
Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics. 'date_from' and 'date_to' parameters set temporary limits.- Parameters:
value- value of "period" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
dateFrom
protected AdsGetDemographicsQuery dateFrom(java.lang.String value)
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.- Parameters:
value- value of "date from" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
dateTo
protected AdsGetDemographicsQuery dateTo(java.lang.String value)
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.- Parameters:
value- value of "date to" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
getThis
protected AdsGetDemographicsQuery getThis()
Description copied from class:AbstractQueryBuilderGet reference to this object- Specified by:
getThisin classAbstractQueryBuilder<AdsGetDemographicsQuery,java.util.List<GetDemographicsResponse>>- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
essentialKeys
protected java.util.List<java.lang.String> essentialKeys()
Description copied from class:AbstractQueryBuilderGet list of required parameter names- Specified by:
essentialKeysin classAbstractQueryBuilder<AdsGetDemographicsQuery,java.util.List<GetDemographicsResponse>>- Returns:
- list of names
-
-