1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00

Переработка тестов Viber

This commit is contained in:
Anton
2024-09-12 20:35:30 +03:00
parent 1be42a7e18
commit 6c663c5f40
48 changed files with 5383 additions and 4912 deletions

View File

@@ -1,8 +1,6 @@

ButtonArray = New Array;
ButtonArray.Add("Button 1");
ButtonArray.Add("Button 2");
ButtonArray.Add("Button 3");
Keyboard = OPI_Viber.CreateKeyboardFromArrayButton(ButtonArray); //Structure
JSON = OPI_Tools.JSONString(Keyboard); //String
 ButtonArray = New Array;
ButtonArray.Add("Button 1");
ButtonArray.Add("Button 2");
ButtonArray.Add("Button 3");
Result = OPI_Viber.CreateKeyboardFromArrayButton(ButtonArray);

View File

@@ -1,3 +1,2 @@

Response = OPI_Viber.GetChannelInformation(ChannelToken); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Token = "523b58ba82afffaa-7ef3b426...";
Result = OPI_Viber.GetChannelInformation(Token);

View File

@@ -1,3 +1,4 @@

Response = OPI_Viber.GetOnlineUsers(Token, UserID); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Token = "523b58ba82afffaa-7ef3b426...";
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Result = OPI_Viber.GetOnlineUsers(Token, UserID);

View File

@@ -1,3 +1,4 @@

Response = OPI_Viber.GetUserData(Token, UserID); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Token = "523b58ba82afffaa-7ef3b426...";
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Result = OPI_Viber.GetUserData(Token, UserID);

View File

@@ -1,6 +1,14 @@

BotToken = "523b5b25ed27e6ec-111111111111111-2222222222222222";
UserID = "d3jxe1111111111jYGgZg==";
Response = OPI_Viber.SendContact(BotToken, "John Doe", "+749521231", UserID, False); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Name = "Petr Petrov";
Phone = "+123456789";
UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;
Result = OPI_Viber.SendContact(Token, Name, Phone, UserID, SendingToChannel);
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;
Result = OPI_Viber.SendContact(Token, Name, Phone, UserID, SendingToChannel);

View File

@@ -1,6 +1,14 @@

ChannelToken = "523b58ba82afffaa-111111111111111-2222222222222222";
UserID = "tMNGh111111111D+bT4g==";
Response = OPI_Viber.SendFile(ChannelToken, "https://api.athenaeum.digital/1.txt", UserID, True, "txt"); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Extension = "docx";
URL = "https://openintegrations.dev/test_data/document.docx";
UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;
Result = OPI_Viber.SendFile(Token, URL, UserID, SendingToChannel, Extension);
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;
Result = OPI_Viber.SendFile(Token, URL, UserID, SendingToChannel, Extension);

View File

@@ -1,6 +1,14 @@

ChannelToken = "523b58ba82afffaa-111111111111111-2222222222222222";
UserID = "tMNGh111111111D+bT4g==";
Response = OPI_Viber.SendImage(ChannelToken, "https://api.athenaeum.digital/logo.png", UserID, True, "Alpaca"); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Description = "TestMessage";
URL = "https://openintegrations.dev/test_data/picture.jpg";
UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;
Result = OPI_Viber.SendImage(Token, URL, UserID, SendingToChannel, Description);
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;
Result = OPI_Viber.SendImage(Token, URL, UserID, SendingToChannel, Description);

View File

@@ -1,6 +1,13 @@

BotToken = "523b5b25ed27e6ec-111111111111111-2222222222222222";
UserID = "d3jxe1111111111jYGgZg==";
Response = OPI_Viber.SendLink(BotToken, "https://github.com/Bayselonarrend", UserID, False); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 URL = "https://github.com/Bayselonarrend/OpenIntegrations";
UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;
Result = OPI_Viber.SendLink(Token, URL, UserID, SendingToChannel);
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;
Result = OPI_Viber.SendLink(Token, URL, UserID, SendingToChannel);

View File

@@ -1,6 +1,14 @@

BotToken = "523b5b25ed27e6ec-111111111111111-2222222222222222";
UserID = "d3jxe1111111111jYGgZg==";
Response = OPI_Viber.SendLocation(BotToken, "55.75", "37.6167", UserID, False); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Latitude = "48.87373649724122";
Longitude = "2.2954639195323967";
UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;
Result = OPI_Viber.SendLocation(Token, Latitude, Longitude, UserID, SendingToChannel);
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;
Result = OPI_Viber.SendLocation(Token, Latitude, Longitude, UserID, SendingToChannel);

View File

@@ -1,14 +1,20 @@

BotToken = "523b5b25ed27e6ec-111111111111111-2222222222222222";
UserID = "d3jxe1111111111jYGgZg==";
ButtonArray = New Array;
ButtonArray.Add("Button 1");
ButtonArray.Add("Button 2");
ButtonArray.Add("Button 3");
Keyboard = OPI_Viber.CreateKeyboardFromArrayButton(ButtonArray);
Response = OPI_Viber.SendTextMessage(BotToken, "Hello", UserID, False, Keyboard); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
 Text = "TestMessage";
UserID = "d3jxe61Z4W73nmNkjYGgZg==";
Token = "523b5b25ed27e6ec-fdf013e4...";
SendingToChannel = False;
ButtonArray = New Array;
ButtonArray.Add("Button 1");
ButtonArray.Add("Button 2");
ButtonArray.Add("Button 3");
Keyboard = OPI_Viber.CreateKeyboardFromArrayButton(ButtonArray);
Result = OPI_Viber.SendTextMessage(Token, Text, UserID, SendingToChannel, Keyboard);
UserID = "tMNGhftyUPrB3r1lD+bT4g==";
Token = "523b58ba82afffaa-7ef3b426...";
SendingToChannel = True;
Result = OPI_Viber.SendTextMessage(Token, Text, UserID, SendingToChannel, Keyboard);