Skip to content

Commit 2e628db

Browse files
author
Oleg Smirnov
committed
version 2.4.0
1 parent 4c6f418 commit 2e628db

564 files changed

Lines changed: 3077 additions & 1708 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VK SDK for Android
33

44
[![Maven Central](https://img.shields.io/maven-central/v/com.vk/androidsdk.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.vk%22%20AND%20a:%22androidsdk%22)
55

6-
Library for working with VK API, authorization through VK app, using VK functions. Minimal version of Android is 4.1
6+
Library for working with VK API, authorization through VK app, using VK functions. Minimal version of Android is 5.0
77

88
Prepare for Using VK SDK
99
----------
@@ -56,12 +56,12 @@ You can add next maven dependency in your project:
5656

5757
You may also need to add the following to your `project/build.gradle` file.
5858

59-
`implementation 'com.vk:androidsdk:2.2.3`
59+
`implementation 'com.vk:androidsdk:2.4.0`
6060

6161
For example, your `app/build.gradle` script will contains such dependencies:
6262
```
6363
dependencies {
64-
implementation 'com.vk:androidsdk:2.2.3
64+
implementation 'com.vk:androidsdk:2.4.0
6565
}
6666
```
6767

dependencies.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ SOFTWARE.
2323
*/
2424

2525
ext.sdkVersions = [
26-
code : '18',
27-
name : '2.3.0',
26+
code : '19',
27+
name : '2.4.0',
2828

29-
minSdk : 16,
30-
targetSdk : 28,
29+
minSdk : 21,
30+
targetSdk : 29,
3131
compileSdk : '29',
3232
buildTools : '29.0.3',
3333

vk-sdk-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VK SDK api for Android
22
==========
33

4-
To update it from current master please run tools/tasks/generator/generate_public_sdk_api.sh
4+
Current version is 5.122
55

66
there are 3 packages now
77

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2019 vk.com
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
// *********************************************************************
25+
// THIS FILE IS AUTO GENERATED!
26+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING.
27+
// *********************************************************************
28+
package com.vk.sdk.api
29+
30+
import com.vk.api.sdk.requests.VKRequest
31+
import kotlin.String
32+
33+
/**
34+
* Base class for all Api requests
35+
* @param methodName api method name
36+
*/
37+
open class ApiRequestBase<T>(
38+
methodName: String
39+
) : VKRequest<T>(method = methodName, requestApiVersion = Constants.API_VERSION)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2019 vk.com
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
// *********************************************************************
25+
// THIS FILE IS AUTO GENERATED!
26+
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING.
27+
// *********************************************************************
28+
package com.vk.sdk.api
29+
30+
import kotlin.String
31+
32+
object Constants {
33+
const val API_VERSION: String = "5.122"
34+
}

vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountBan.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// *********************************************************************
2828
package com.vk.sdk.api.account.methods
2929

30-
import com.vk.api.sdk.requests.VKRequest
30+
import com.vk.sdk.api.ApiRequestBase
3131
import com.vk.sdk.api.GsonHolder
3232
import com.vk.sdk.api.base.dto.BaseOkResponseDto
3333
import com.vk.sdk.api.base.responses.BaseOkResponse
@@ -39,7 +39,7 @@ import org.json.JSONObject
3939
*/
4040
class AccountBan(
4141
private val ownerId: Int? = null
42-
) : VKRequest<BaseOkResponseDto>("account.ban") {
42+
) : ApiRequestBase<BaseOkResponseDto>(methodName = "account.ban") {
4343
init {
4444
ownerId?.let { value ->
4545
addParam("owner_id", value)

vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountChangePassword.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// *********************************************************************
2828
package com.vk.sdk.api.account.methods
2929

30-
import com.vk.api.sdk.requests.VKRequest
30+
import com.vk.sdk.api.ApiRequestBase
3131
import com.vk.sdk.api.GsonHolder
3232
import com.vk.sdk.api.account.dto.AccountChangePasswordResponseDto
3333
import com.vk.sdk.api.account.responses.AccountChangePasswordResponse
@@ -49,7 +49,7 @@ class AccountChangePassword(
4949
private val restoreSid: String? = null,
5050
private val changePasswordHash: String? = null,
5151
private val oldPassword: String? = null
52-
) : VKRequest<AccountChangePasswordResponseDto>("account.changePassword") {
52+
) : ApiRequestBase<AccountChangePasswordResponseDto>(methodName = "account.changePassword") {
5353
init {
5454
addParam("new_password", newPassword)
5555
restoreSid?.let { value ->

vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetActiveOffers.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// *********************************************************************
2828
package com.vk.sdk.api.account.methods
2929

30-
import com.vk.api.sdk.requests.VKRequest
30+
import com.vk.sdk.api.ApiRequestBase
3131
import com.vk.sdk.api.GsonHolder
3232
import com.vk.sdk.api.account.dto.AccountGetActiveOffersResponseDto
3333
import com.vk.sdk.api.account.responses.AccountGetActiveOffersResponse
@@ -43,7 +43,7 @@ import org.json.JSONObject
4343
class AccountGetActiveOffers(
4444
private val offset: Int? = null,
4545
private val count: Int? = null
46-
) : VKRequest<AccountGetActiveOffersResponseDto>("account.getActiveOffers") {
46+
) : ApiRequestBase<AccountGetActiveOffersResponseDto>(methodName = "account.getActiveOffers") {
4747
init {
4848
offset?.let { value ->
4949
addParam("offset", value)

vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetAppPermissions.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// *********************************************************************
2828
package com.vk.sdk.api.account.methods
2929

30-
import com.vk.api.sdk.requests.VKRequest
30+
import com.vk.sdk.api.ApiRequestBase
3131
import com.vk.sdk.api.GsonHolder
3232
import com.vk.sdk.api.account.responses.AccountGetAppPermissionsResponse
3333
import kotlin.Int
@@ -40,7 +40,7 @@ import org.json.JSONObject
4040
*/
4141
class AccountGetAppPermissions(
4242
private val userId: Int
43-
) : VKRequest<Int>("account.getAppPermissions") {
43+
) : ApiRequestBase<Int>(methodName = "account.getAppPermissions") {
4444
init {
4545
addParam("user_id", userId)
4646
}

vk-sdk-api/src/main/java/com/vk/sdk/api/account/methods/AccountGetBanned.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// *********************************************************************
2828
package com.vk.sdk.api.account.methods
2929

30-
import com.vk.api.sdk.requests.VKRequest
30+
import com.vk.sdk.api.ApiRequestBase
3131
import com.vk.sdk.api.GsonHolder
3232
import com.vk.sdk.api.account.dto.AccountGetBannedResponseDto
3333
import com.vk.sdk.api.account.responses.AccountGetBannedResponse
@@ -42,7 +42,7 @@ import org.json.JSONObject
4242
class AccountGetBanned(
4343
private val offset: Int? = null,
4444
private val count: Int? = null
45-
) : VKRequest<AccountGetBannedResponseDto>("account.getBanned") {
45+
) : ApiRequestBase<AccountGetBannedResponseDto>(methodName = "account.getBanned") {
4646
init {
4747
offset?.let { value ->
4848
addParam("offset", value)

0 commit comments

Comments
 (0)