Skip to content

Commit 32cd434

Browse files
committed
Merge branch 'sdk1_0_7_api_5_126_8' into 'master'
SDK v1.0.7 based on v5.126.8 API schema See merge request a.ashurok/java-sdk-public!2
2 parents 0846b28 + eecc71b commit 32cd434

File tree

744 files changed

+46191
-3385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

744 files changed

+46191
-3385
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Java library for VK API interaction, includes OAuth 2.0 authorization and API methods. Full VK API features documentation can be found [here](http://vk.com/dev).
66

7-
This library has been created using the VK API JSON Schema. It can be found [here](https://github.com/VKCOM/vk-api-schema). It uses VK API [version](https://vk.com/dev/versions) 5.73.
7+
This library has been created using the VK API JSON Schema. It can be found [here](https://github.com/VKCOM/vk-api-schema). It uses VK API [version](https://vk.com/dev/versions) 5.126.
88

99
## 1. Prerequisites
1010

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ subprojects {
22
apply plugin: 'java'
33

44
group 'com.vk.api'
5-
version '1.0.6'
5+
version '1.0.7'
66

77
sourceCompatibility = 1.8
88
targetCompatibility = 1.8

examples/group-oauth/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dependencies {
1515
compile group: 'com.google.guava', name: 'guava', version: guavaVersion
1616
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: log4jVersion
1717
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4jVersion
18-
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: log4jVersion
1918
compile group: 'org.eclipse.jetty', name: 'jetty-server', version: jettyVersion
2019

2120
testCompile group: 'org.testng', name: 'testng', version: testngVersion

sdk/src/main/java/com/vk/api/sdk/actions/Ads.java

Lines changed: 81 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.vk.api.sdk.client.AbstractAction;
44
import com.vk.api.sdk.client.VkApiClient;
55
import com.vk.api.sdk.client.actors.UserActor;
6+
import com.vk.api.sdk.objects.ads.UserSpecification;
7+
import com.vk.api.sdk.objects.ads.UserSpecificationCutted;
68
import com.vk.api.sdk.objects.enums.AdsIdsType;
79
import com.vk.api.sdk.objects.enums.AdsLinkType;
810
import com.vk.api.sdk.objects.enums.AdsPeriod;
@@ -27,6 +29,8 @@
2729
import com.vk.api.sdk.queries.ads.AdsGetClientsQuery;
2830
import com.vk.api.sdk.queries.ads.AdsGetDemographicsQuery;
2931
import com.vk.api.sdk.queries.ads.AdsGetFloodStatsQuery;
32+
import com.vk.api.sdk.queries.ads.AdsGetLookalikeRequestsQuery;
33+
import com.vk.api.sdk.queries.ads.AdsGetMusiciansQuery;
3034
import com.vk.api.sdk.queries.ads.AdsGetOfficeUsersQuery;
3135
import com.vk.api.sdk.queries.ads.AdsGetPostsReachQuery;
3236
import com.vk.api.sdk.queries.ads.AdsGetRejectionReasonQuery;
@@ -44,7 +48,9 @@
4448
import com.vk.api.sdk.queries.ads.AdsUpdateAdsQuery;
4549
import com.vk.api.sdk.queries.ads.AdsUpdateCampaignsQuery;
4650
import com.vk.api.sdk.queries.ads.AdsUpdateClientsQuery;
51+
import com.vk.api.sdk.queries.ads.AdsUpdateOfficeUsersQuery;
4752
import com.vk.api.sdk.queries.ads.AdsUpdateTargetGroupQuery;
53+
import java.util.List;
4854

4955
/**
5056
* List of Ads methods
@@ -67,7 +73,21 @@ public Ads(VkApiClient client) {
6773
* @param data Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.
6874
* @return query
6975
*/
70-
public AdsAddOfficeUsersQuery addOfficeUsers(UserActor actor, int accountId, String data) {
76+
public AdsAddOfficeUsersQuery addOfficeUsers(UserActor actor, int accountId,
77+
UserSpecificationCutted... data) {
78+
return new AdsAddOfficeUsersQuery(getClient(), actor, accountId, data);
79+
}
80+
81+
/**
82+
* Adds managers and/or supervisors to advertising account.
83+
*
84+
* @param actor vk actor
85+
* @param accountId Advertising account ID.
86+
* @param data Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.
87+
* @return query
88+
*/
89+
public AdsAddOfficeUsersQuery addOfficeUsers(UserActor actor, int accountId,
90+
List<UserSpecificationCutted> data) {
7191
return new AdsAddOfficeUsersQuery(getClient(), actor, accountId, data);
7292
}
7393

@@ -127,11 +147,12 @@ public AdsCreateClientsQuery createClients(UserActor actor, int accountId, Strin
127147
* @param actor vk actor
128148
* @param accountId Advertising account ID.
129149
* @param name Name of the target group — a string up to 64 characters long.
150+
* @param lifetime 'For groups with auditory created with pixel code only.', , Number of days after that users will be automatically removed from the group.
130151
* @return query
131152
*/
132-
public AdsCreateTargetGroupQuery createTargetGroup(UserActor actor, int accountId,
133-
String name) {
134-
return new AdsCreateTargetGroupQuery(getClient(), actor, accountId, name);
153+
public AdsCreateTargetGroupQuery createTargetGroup(UserActor actor, int accountId, String name,
154+
int lifetime) {
155+
return new AdsCreateTargetGroupQuery(getClient(), actor, accountId, name, lifetime);
135156
}
136157

137158
/**
@@ -297,6 +318,24 @@ public AdsGetFloodStatsQuery getFloodStats(UserActor actor, int accountId) {
297318
return new AdsGetFloodStatsQuery(getClient(), actor, accountId);
298319
}
299320

321+
/**
322+
* @param actor vk actor
323+
* @param accountId
324+
* @return query
325+
*/
326+
public AdsGetLookalikeRequestsQuery getLookalikeRequests(UserActor actor, int accountId) {
327+
return new AdsGetLookalikeRequestsQuery(getClient(), actor, accountId);
328+
}
329+
330+
/**
331+
* @param actor vk actor
332+
* @param artistName
333+
* @return query
334+
*/
335+
public AdsGetMusiciansQuery getMusicians(UserActor actor, String artistName) {
336+
return new AdsGetMusiciansQuery(getClient(), actor, artistName);
337+
}
338+
300339
/**
301340
* Returns a list of managers and supervisors of advertising account.
302341
*
@@ -356,12 +395,10 @@ public AdsGetStatisticsQuery getStatistics(UserActor actor, int accountId, AdsId
356395
*
357396
* @param actor vk actor
358397
* @param section 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 streets. '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.
359-
* @param cities IDs of cities where objects are searched in, separated with a comma.
360398
* @return query
361399
*/
362-
public AdsGetSuggestionsQueryWithCities getSuggestionsWithCities(UserActor actor,
363-
AdsSection section, String cities) {
364-
return new AdsGetSuggestionsQueryWithCities(getClient(), actor, section, cities);
400+
public AdsGetSuggestionsQuery getSuggestions(UserActor actor, AdsSection section) {
401+
return new AdsGetSuggestionsQuery(getClient(), actor, section);
365402
}
366403

367404
/**
@@ -383,20 +420,22 @@ public AdsGetSuggestionsQueryWithRegions getSuggestionsRegions(UserActor actor,
383420
* @param section 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 streets. '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.
384421
* @return query
385422
*/
386-
public AdsGetSuggestionsQuery getSuggestions(UserActor actor, AdsSection section) {
387-
return new AdsGetSuggestionsQuery(getClient(), actor, section);
423+
public AdsGetSuggestionsQueryWithSchools getSuggestionsSchools(UserActor actor,
424+
AdsSection section) {
425+
return new AdsGetSuggestionsQueryWithSchools(getClient(), actor, section);
388426
}
389427

390428
/**
391429
* Returns a set of auto-suggestions for various targeting parameters.
392430
*
393431
* @param actor vk actor
394432
* @param section 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 streets. '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.
433+
* @param cities IDs of cities where objects are searched in, separated with a comma.
395434
* @return query
396435
*/
397-
public AdsGetSuggestionsQueryWithSchools getSuggestionsSchools(UserActor actor,
398-
AdsSection section) {
399-
return new AdsGetSuggestionsQueryWithSchools(getClient(), actor, section);
436+
public AdsGetSuggestionsQueryWithCities getSuggestionsWithCities(UserActor actor,
437+
AdsSection section, String cities) {
438+
return new AdsGetSuggestionsQueryWithCities(getClient(), actor, section, cities);
400439
}
401440

402441
/**
@@ -506,17 +545,44 @@ public AdsUpdateClientsQuery updateClients(UserActor actor, int accountId, Strin
506545
return new AdsUpdateClientsQuery(getClient(), actor, accountId, data);
507546
}
508547

548+
/**
549+
* Adds managers and/or supervisors to advertising account.
550+
*
551+
* @param actor vk actor
552+
* @param accountId Advertising account ID.
553+
* @param data Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.
554+
* @return query
555+
*/
556+
public AdsUpdateOfficeUsersQuery updateOfficeUsers(UserActor actor, int accountId,
557+
UserSpecification... data) {
558+
return new AdsUpdateOfficeUsersQuery(getClient(), actor, accountId, data);
559+
}
560+
561+
/**
562+
* Adds managers and/or supervisors to advertising account.
563+
*
564+
* @param actor vk actor
565+
* @param accountId Advertising account ID.
566+
* @param data Serialized JSON array of objects that describe added managers. Description of 'user_specification' objects see below.
567+
* @return query
568+
*/
569+
public AdsUpdateOfficeUsersQuery updateOfficeUsers(UserActor actor, int accountId,
570+
List<UserSpecification> data) {
571+
return new AdsUpdateOfficeUsersQuery(getClient(), actor, accountId, data);
572+
}
573+
509574
/**
510575
* Edits a retarget group.
511576
*
512577
* @param actor vk actor
513578
* @param accountId Advertising account ID.
514579
* @param targetGroupId Group ID.
515580
* @param name New name of the target group — a string up to 64 characters long.
581+
* @param lifetime '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.
516582
* @return query
517583
*/
518584
public AdsUpdateTargetGroupQuery updateTargetGroup(UserActor actor, int accountId,
519-
int targetGroupId, String name) {
520-
return new AdsUpdateTargetGroupQuery(getClient(), actor, accountId, targetGroupId, name);
585+
int targetGroupId, String name, int lifetime) {
586+
return new AdsUpdateTargetGroupQuery(getClient(), actor, accountId, targetGroupId, name, lifetime);
521587
}
522588
}
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
package com.vk.api.sdk.actions;
2+
3+
import com.vk.api.sdk.client.AbstractAction;
4+
import com.vk.api.sdk.client.VkApiClient;
5+
import com.vk.api.sdk.client.actors.UserActor;
6+
import com.vk.api.sdk.queries.adsweb.AdswebGetAdCategoriesQuery;
7+
import com.vk.api.sdk.queries.adsweb.AdswebGetAdUnitCodeQuery;
8+
import com.vk.api.sdk.queries.adsweb.AdswebGetAdUnitsQuery;
9+
import com.vk.api.sdk.queries.adsweb.AdswebGetFraudHistoryQuery;
10+
import com.vk.api.sdk.queries.adsweb.AdswebGetSitesQuery;
11+
import com.vk.api.sdk.queries.adsweb.AdswebGetStatisticsQuery;
12+
13+
/**
14+
* List of Adsweb methods
15+
*/
16+
public class Adsweb extends AbstractAction {
17+
/**
18+
* Constructor
19+
*
20+
* @param client vk api client
21+
*/
22+
public Adsweb(VkApiClient client) {
23+
super(client);
24+
}
25+
26+
/**
27+
* @param actor vk actor
28+
* @param officeId
29+
* @return query
30+
*/
31+
public AdswebGetAdCategoriesQuery getAdCategories(UserActor actor, int officeId) {
32+
return new AdswebGetAdCategoriesQuery(getClient(), actor, officeId);
33+
}
34+
35+
/**
36+
* @param actor vk actor
37+
* @return query
38+
*/
39+
public AdswebGetAdUnitCodeQuery getAdUnitCode(UserActor actor) {
40+
return new AdswebGetAdUnitCodeQuery(getClient(), actor);
41+
}
42+
43+
/**
44+
* @param actor vk actor
45+
* @param officeId
46+
* @return query
47+
*/
48+
public AdswebGetAdUnitsQuery getAdUnits(UserActor actor, int officeId) {
49+
return new AdswebGetAdUnitsQuery(getClient(), actor, officeId);
50+
}
51+
52+
/**
53+
* @param actor vk actor
54+
* @param officeId
55+
* @return query
56+
*/
57+
public AdswebGetFraudHistoryQuery getFraudHistory(UserActor actor, int officeId) {
58+
return new AdswebGetFraudHistoryQuery(getClient(), actor, officeId);
59+
}
60+
61+
/**
62+
* @param actor vk actor
63+
* @param officeId
64+
* @return query
65+
*/
66+
public AdswebGetSitesQuery getSites(UserActor actor, int officeId) {
67+
return new AdswebGetSitesQuery(getClient(), actor, officeId);
68+
}
69+
70+
/**
71+
* @param actor vk actor
72+
* @param officeId
73+
* @param idsType
74+
* @param ids
75+
* @param period
76+
* @param dateFrom
77+
* @param dateTo
78+
* @return query
79+
*/
80+
public AdswebGetStatisticsQuery getStatistics(UserActor actor, int officeId, String idsType,
81+
String ids, String period, String dateFrom, String dateTo) {
82+
return new AdswebGetStatisticsQuery(getClient(), actor, officeId, idsType, ids, period, dateFrom, dateTo);
83+
}
84+
}

0 commit comments

Comments
 (0)