Skip to content

Commit df78faa

Browse files
committed
Changed domain vk.com -> vk.ru
1 parent 251652e commit df78faa

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

Data/Scripts/Lang/ru.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"just_me": "Только я"
2727
},
2828
"browser": {
29-
"title": "Авторизация на vk.com"
29+
"title": "Авторизация на vk.ru"
3030
},
3131
"errors": {
3232
"no_albums": "В вашем профиле нет ни одного альбома."

Data/Scripts/bit.ly.nut

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
clientId <- "62e3f09c348d5696c9805ef1f200d5663b026283";
22
clientSecret <- "8acf539a452aae12f0d8156140f9cc3d05bd7cf6";
3-
redirectUri <- "https://oauth.vk.com/blank.html";
4-
redirectUrlEscaped <- "https:\\/\\/oauth\\.vk\\.com\\/blank\\.html";
3+
redirectUri <- "https://svistunov.dev/blank.html";;
4+
redirectUrlEscaped <- "https:\\/\\/svistunov\\.dev\\/blank\\.html";
55
code <- "";
66
login <- "";
77
//Docs: https://dev.bitly.com/get_started.html

Data/Scripts/dropbox.nut

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ appKey <- GetEnvDecode("IU_DROPBOX_APP_KEY");
22
appSecret <- GetEnvDecode("IU_DROPBOX_APP_SECRET");
33
accessType <- "app_folder";
44

5-
redirectUri <- "https://oauth.vk.com/blank.html";
6-
redirectUrlEscaped <- "https:\\/\\/oauth\\.vk\\.com\\/blank\\.html";
5+
redirectUri <- "https://svistunov.dev/blank.html";
6+
redirectUrlEscaped <- "https:\\/\\/svistunov\\.dev\\/blank\\.html";
77

88
authStep1Url <- "https://api.dropbox.com/1/oauth/request_token";
99
authStep2Url <- "https://api.dropbox.com/1/oauth/access_token";

Data/Scripts/vk.cc.nut

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ serviceKey <- "d909ba70d909ba70d909ba70ccd943bde3dd909d909ba70825007ca7ecade18db
55
function ShortenUrl(url, options) {
66
nm.addQueryParam("url", url);
77
nm.addQueryParam("private", "0");
8-
nm.setUrl("https://api.vk.com/method/utils.getShortLink?v=" + apiVersion + "&access_token=" + serviceKey);
8+
nm.setUrl("https://api.vk.ru/method/utils.getShortLink?v=" + apiVersion + "&access_token=" + serviceKey);
99
nm.doPost("");
1010

1111
if (nm.responseCode() == 200) {

Data/Scripts/vk.nut

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
clientId <- "4851603";
2-
redirectUri <- "https://oauth.vk.com/blank.html";
3-
redirectUrlEscaped <- "https:\\/\\/oauth\\.vk\\.com\\/blank\\.html";
2+
redirectUri <- "https://oauth.vk.ru/blank.html";
3+
redirectUrlEscaped <- "https:\\/\\/oauth\\.vk\\.ru\\/blank\\.html";
44
apiVersion <- "5.131";
55
expiresIn <- 0;
66
testMode <- "1"; // not used
@@ -68,7 +68,7 @@ function OnNavigateError(data) {
6868

6969
function checkResponse(json) {
7070
try {
71-
WriteLog("error", "vk.com error: " + json.error.error_msg);
71+
WriteLog("error", "vk.ru error: " + json.error.error_msg);
7272
return 0;
7373
} catch ( ex ) {
7474

@@ -99,12 +99,12 @@ function Authenticate() {
9999
ServerParams.setParam("expiresIn", "");
100100
ServerParams.setParam("tokenTime", "");
101101
local browser = CWebBrowser();
102-
browser.setTitle(tr("vk.browser.title", "Vk.com authorization"))
102+
browser.setTitle(tr("vk.browser.title", "vk.ru authorization"))
103103
browser.setOnUrlChangedCallback(OnUrlChangedCallback, null);
104104
//browser.setOnNavigateErrorCallback(OnNavigateError, null);
105105
//browser.setOnLoadFinishedCallback(OnLoadFinished, null);
106106

107-
local url = "https://oauth.vk.com/authorize?" +
107+
local url = "https://oauth.vk.ru/authorize?" +
108108
"client_id=" + clientId +
109109
"&scope=photos" +
110110
"&redirect_uri=" + nm.urlEncode(redirectUri) +
@@ -149,7 +149,7 @@ function DoLogout() {
149149
function GetFolderList(list) {
150150
local userId = ServerParams.getParam("userId");
151151
local token = ServerParams.getParam("token");
152-
nm.doGet("https://api.vk.com/method/photos.getAlbums?owner_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
152+
nm.doGet("https://api.vk.ru/method/photos.getAlbums?owner_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
153153
if (nm.responseCode() != 200) {
154154
return 0;
155155
}
@@ -165,7 +165,7 @@ function GetFolderList(list) {
165165
album.setTitle(item.title);
166166
album.setSummary(item.description );
167167
album.setAccessType(StringPrivacyToAccessType(item.privacy_view.category));
168-
album.setViewUrl("https://vk.com/album" + userId + "_" + item.id);
168+
album.setViewUrl("https://vk.ru/album" + userId + "_" + item.id);
169169
list.AddFolderItem(album);
170170
}
171171
return 1;
@@ -174,7 +174,7 @@ function GetFolderList(list) {
174174
function GetFirstAlbumId() {
175175
local userId = ServerParams.getParam("userId");
176176
local token = ServerParams.getParam("token");
177-
nm.doGet("https://api.vk.com/method/photos.getAlbums?owner_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
177+
nm.doGet("https://api.vk.ru/method/photos.getAlbums?owner_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
178178
if ( nm.responseCode() != 200 ) {
179179
return 0;
180180
}
@@ -204,7 +204,7 @@ function CreateFolder(parentAlbum, album) {
204204
nm.addQueryParam("privacy_view", AccessTypeToPrivacy(accessType));
205205
nm.addQueryParam("privacy_comment", AccessTypeToPrivacy(accessType));
206206

207-
nm.setUrl("https://api.vk.com/method/photos.createAlbum?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
207+
nm.setUrl("https://api.vk.ru/method/photos.createAlbum?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
208208

209209
nm.doPost("");
210210
if ( nm.responseCode() != 200 && nm.responseCode() != 201 ) {
@@ -220,7 +220,7 @@ function CreateFolder(parentAlbum, album) {
220220
album.setSummary(t.response.description);
221221
album.setAccessType(StringPrivacyToAccessType(t.response.privacy_view.category));
222222
album.setTitle(t.response.title);
223-
album.setViewUrl("https://vk.com/album" + userId + "_" + t.response.id);
223+
album.setViewUrl("https://vk.ru/album" + userId + "_" + t.response.id);
224224

225225
return 1;
226226
}
@@ -240,7 +240,7 @@ function ModifyFolder(album) {
240240
nm.addQueryParam("owner_id", userId);
241241
nm.addQueryParam("privacy_view", AccessTypeToPrivacy(accessType));
242242
nm.addQueryParam("privacy_comment", AccessTypeToPrivacy(accessType));
243-
nm.setUrl("https://api.vk.com/method/photos.editAlbum?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
243+
nm.setUrl("https://api.vk.ru/method/photos.editAlbum?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
244244

245245
nm.doPost("");
246246
if ( nm.responseCode() == 200 ) {
@@ -273,7 +273,7 @@ function UploadFile(FileName, options) {
273273
}
274274
local thumbWidth = options.getParam("THUMBWIDTH");
275275
thumbWidth = thumbWidth.tointeger();
276-
nm.doGet("https://api.vk.com/method/photos.getUploadServer?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token+"&album_id="+albumId);
276+
nm.doGet("https://api.vk.ru/method/photos.getUploadServer?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token+"&album_id="+albumId);
277277
if ( nm.responseCode() != 200 ) {
278278
return 0;
279279
}
@@ -298,7 +298,7 @@ function UploadFile(FileName, options) {
298298
nm.addQueryParam("photo_sizes", "1");
299299
nm.addQueryParam("https", "1");
300300

301-
nm.setUrl("https://api.vk.com/method/photos.save?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
301+
nm.setUrl("https://api.vk.ru/method/photos.save?user_id=" + userId +"&v=" + apiVersion + "&access_token=" + token);
302302

303303
nm.doPost("");
304304
if ( nm.responseCode() >= 200 && nm.responseCode() <= 299 ) {
@@ -327,7 +327,7 @@ function UploadFile(FileName, options) {
327327

328328
options.setDirectUrl(directUrl);
329329
options.setThumbUrl(thumbUrl);
330-
options.setViewUrl("https://vk.com/photo" + userId + "_" + item.id);
330+
options.setViewUrl("https://vk.ru/photo" + userId + "_" + item.id);
331331

332332
return 1;
333333
}

0 commit comments

Comments
 (0)