Package com.vk.api.sdk.queries.ads
Class AdsGetStatisticsQuery
- java.lang.Object
-
- com.vk.api.sdk.client.ApiRequest<R>
-
- com.vk.api.sdk.client.AbstractQueryBuilder<AdsGetStatisticsQuery,java.util.List<GetStatisticsResponse>>
-
- com.vk.api.sdk.queries.ads.AdsGetStatisticsQuery
-
public class AdsGetStatisticsQuery extends AbstractQueryBuilder<AdsGetStatisticsQuery,java.util.List<GetStatisticsResponse>>
Query for Ads.getStatistics method
-
-
Constructor Summary
Constructors Constructor Description AdsGetStatisticsQuery(VkApiClient client, UserActor actor, int accountId, GetStatisticsIdsType idsType, java.lang.String ids, GetStatisticsPeriod 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 AdsGetStatisticsQueryaccountId(int value)Advertising account ID.protected AdsGetStatisticsQuerydateFrom(java.lang.String value)Date to show statistics from.protected AdsGetStatisticsQuerydateTo(java.lang.String value)Date to show statistics to.protected java.util.List<java.lang.String>essentialKeys()Get list of required parameter namesprotected AdsGetStatisticsQuerygetThis()Get reference to this objectprotected AdsGetStatisticsQueryids(java.lang.String value)IDs requested ads, campaigns, clients or account, separated with a comma, depending on the value set in 'ids_type'.protected AdsGetStatisticsQueryidsType(GetStatisticsIdsType value)Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns,, *client — clients,, *office — account.protected AdsGetStatisticsQueryperiod(GetStatisticsPeriod value)Data grouping by dates: *day — statistics by days,, *month — statistics by months,, *overall — overall statistics.AdsGetStatisticsQuerystatsFields(java.lang.String... value)stats_fields Additional fields to add to statisticsAdsGetStatisticsQuerystatsFields(java.util.List<java.lang.String> value)Additional fields to add to 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
-
AdsGetStatisticsQuery
public AdsGetStatisticsQuery(VkApiClient client, UserActor actor, int accountId, GetStatisticsIdsType idsType, java.lang.String ids, GetStatisticsPeriod 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 AdsGetStatisticsQuery 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 AdsGetStatisticsQuery idsType(GetStatisticsIdsType value)
Type of requested objects listed in 'ids' parameter: *ad — ads,, *campaign — campaigns,, *client — clients,, *office — account.- Parameters:
value- value of "ids type" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
ids
protected AdsGetStatisticsQuery ids(java.lang.String value)
IDs requested ads, campaigns, clients or account, 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 AdsGetStatisticsQuery period(GetStatisticsPeriod 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 AdsGetStatisticsQuery 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 AdsGetStatisticsQuery 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.
-
statsFields
public AdsGetStatisticsQuery statsFields(java.lang.String... value)
stats_fields Additional fields to add to statistics- Parameters:
value- value of "stats fields" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
statsFields
public AdsGetStatisticsQuery statsFields(java.util.List<java.lang.String> value)
Additional fields to add to statistics- Parameters:
value- value of "stats fields" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
getThis
protected AdsGetStatisticsQuery getThis()
Description copied from class:AbstractQueryBuilderGet reference to this object- Specified by:
getThisin classAbstractQueryBuilder<AdsGetStatisticsQuery,java.util.List<GetStatisticsResponse>>- 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<AdsGetStatisticsQuery,java.util.List<GetStatisticsResponse>>- Returns:
- list of names
-
-