1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-07-17 01:42:25 +02:00

Преобразование OPI -> OInt (workflow)

This commit is contained in:
Vitaly the Alpaca
2024-06-23 17:46:57 +00:00
committed by Vitaly the Alpaca (bot)
parent 29536c20f7
commit 5357dfdfda
20 changed files with 3887 additions and 3835 deletions

File diff suppressed because it is too large Load Diff

View File

@ -450,7 +450,7 @@ EndFunction
// Token - String - Token - token
// Base - String - Database identifier - base
// Table - String - Table identifier - table
// Data - Structure, Array of Structure - Set or array of sets of Key : Value pairs > Field : Indicator - data
// Data - Structure, Array of Structure - - data
//
// Returns:
// Map Of KeyAndValue - serialized JSON response from Airtable

View File

@ -175,7 +175,7 @@ EndFunction
// Parameters:
// Token - String - Token - token
// Path - String - Path to the object - path
// Detailed - Boolean - Adds additional information fields for media files - detail
// Detailed - Boolean - - detail
//
// Returns:
// Map Of KeyAndValue - serialized JSON response from Dropbox
@ -200,7 +200,7 @@ EndFunction
// Parameters:
// Token - String - Token - token
// Path - String - Path to the directory. Optional if the cursor is specified - path
// Detailed - Boolean - Adds additional information fields for media files - detail
// Detailed - Boolean - - detail
// Cursor - String - Cursor from the previous request to get the next set of files - cursor
//
// Returns:
@ -311,7 +311,7 @@ EndFunction
//
// Parameters:
// Token - String - Token - token
// JobID - String - ID of the asynchronous job from the UploadFileByURL response - job
// JobID - String - - job
//
// Returns:
// Map Of KeyAndValue - serialized JSON response from Dropbox
@ -540,7 +540,7 @@ Function GetTagList(Val Token, Val Paths) Export
EndFunction
// Add tag
// Adds a new text tag to a file or directory
//
//
// Parameters:
// Token - String - Token - token
@ -717,7 +717,7 @@ Function AddUsersToFolder(Val Token, Val FolderID, Val EmailAddresses, Val ViewO
EndFunction
// Get asynchronous change status
// Gets the status of the asynchronous access change job
//
//
// Parameters:
// Token - String - Token - token

View File

@ -25,7 +25,7 @@
// SOFTWARE.
// https://github.com/Bayselonarrend/OpenIntegrations
// If you don't know where to start, you should find the method GetStandardParameters()
// ()
// and read comments
// BSLLS:Typo-off
@ -76,7 +76,7 @@ Function GetAuthorizationLink(Parameters = "") Export
EndFunction
// Get token
// Gets the token by the code obtained during authorization via the link from GetAuthorizationLink
//
//
// Parameters:
// Code - String - Code obtained from authorization See GetAuthorizationLink - code
@ -482,7 +482,7 @@ EndFunction
Function GetStandardParameters(Val Parameters = "")
// Here is the definition of the data needed for work.
// .
// For Twitter, this is quite a significant set, which is due to the presence of 2 APIs at once,
// which, at the same time, are not created for different tasks, but are simply versions of each other.
// The current version of the API is v2 and it requires obtaining temporary tokens. Despite the fact,
@ -493,7 +493,7 @@ Function GetStandardParameters(Val Parameters = "")
// The world gigacorporation of Elon Musk, by the way, a reminder ;)
// P.S The "Twitter Developer settings page" is often mentioned further" - this
// " - this
// https://developer.twitter.com/en/portal/dashboard and chosing of project from list (key icon)
Parameters_ = New Map;

View File

@ -25,7 +25,7 @@
// SOFTWARE.
// https://github.com/Bayselonarrend/OpenIntegrations
// If you don't know where to start, you should find the method GetStandardParameters()
// ()
// and read comments
// BSLLS:NumberOfOptionalParams-off

View File

@ -101,7 +101,7 @@ Function GetUserData(Val Token, Val UserID) Export
EndFunction
// Get online users
// Gets the status of a user or several users by ID
//
//
// Parameters:
// Token - String - Viber Token - token

View File

@ -1,5 +1,5 @@
<package-def>
<module name="OPI_Cryptography" file="tools/Modules/internal/Modules/OPI_Cryptography.os"/>
<module name="OPI_Cryptography" file=""/>
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
<module name="OPI_TestDataRetrieval" file="tools/Modules/OPI_TestDataRetrieval.os"/>

View File

@ -590,38 +590,20 @@ EndProcedure
Procedure YDisk_GetDiskInfo() Export
Token = OPI_TestDataRetrieval.GetParameter("YandexDisk_Token");
Map = "Map";
TestParameters = New Structure;
OPI_TestDataRetrieval.ParameterToCollection("YandexDisk_Token", TestParameters);
Result = OPI_YandexDisk.GetDiskInformation(Token);
OPI_TestDataRetrieval.WriteLog(Result, "GetDiskInformation");
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип(Map).Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["system_folders"]).ИмеетТип(Map);
OPI_TestDataRetrieval.ExpectsThat(Result["user"]).ИмеетТип(Map);
OPI_Tools.Pause(5);
(TestParameters);
EndProcedure
Procedure YDisk_CreateFolder() Export
Token = OPI_TestDataRetrieval.GetParameter("YandexDisk_Token");
Path = "/" + String(New UUID);
Result = OPI_YandexDisk.CreateFolder(Token, Path);
OPI_TestDataRetrieval.WriteLog(Result, "CreateFolder");
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип("Map").Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["type"]).Равно("dir");
OPI_TestDataRetrieval.ExpectsThat(Result["path"]).Равно("disk:" + Path);
TestParameters = New Structure;
OPI_TestDataRetrieval.ParameterToCollection("YandexDisk_Token", TestParameters);
(TestParameters);
OPI_YandexDisk.DeleteObject(Token, Path, False);
OPI_Tools.Pause(5);
EndProcedure
Procedure YDisk_UploadByUrlAndGetObject() Export
@ -3369,6 +3351,24 @@ Procedure Check_VKVideo(Val Result)
EndProcedure
Procedure (Val Result)
= "Map";
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип().Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["system_folders"]).ИмеетТип();
OPI_TestDataRetrieval.ExpectsThat(Result["user"]).ИмеетТип();
EndProcedure
Procedure (Val Result, Val Path)
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип("Map").Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["type"]).Равно("dir");
OPI_TestDataRetrieval.ExpectsThat(Result["path"]).Равно("disk:" + Path);
EndProcedure
Procedure Check_GKObject(Val Result, Val Name, Val Description)
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип("Map");
@ -6967,6 +6967,44 @@ EndProcedure
#EndRegion
#Region YandexDisk
Procedure (FunctionParameters)
Token = FunctionParameters["YandexDisk_Token"];
Result = OPI_YandexDisk.GetDiskInformation(Token);
// END
OPI_TestDataRetrieval.WriteLog(Result, "GetDiskInformation", "YandexDisk");
(Result);
OPI_Tools.Pause(5);
EndProcedure
Procedure (FunctionParameters)
Token = FunctionParameters["YandexDisk_Token"];
Path = "/" + String(New UUID);
Result = OPI_YandexDisk.CreateFolder(Token, Path);
// END
OPI_TestDataRetrieval.WriteLog(Result, "CreateFolder", "YandexDisk");
(Result, Path);
OPI_YandexDisk.DeleteObject(Token, Path, False);
OPI_Tools.Pause(5);
EndProcedure
#EndRegion
#EndRegion
#EndRegion

View File

@ -450,7 +450,7 @@ EndFunction
// Token - String - Token - token
// Base - String - Database identifier - base
// Table - String - Table identifier - table
// Data - Structure, Array of Structure - Set or array of sets of Key : Value pairs > Field : Indicator - data
// Data - Structure, Array of Structure - - data
//
// Returns:
// Map Of KeyAndValue - serialized JSON response from Airtable

View File

@ -175,7 +175,7 @@ EndFunction
// Parameters:
// Token - String - Token - token
// Path - String - Path to the object - path
// Detailed - Boolean - Adds additional information fields for media files - detail
// Detailed - Boolean - - detail
//
// Returns:
// Map Of KeyAndValue - serialized JSON response from Dropbox
@ -200,7 +200,7 @@ EndFunction
// Parameters:
// Token - String - Token - token
// Path - String - Path to the directory. Optional if the cursor is specified - path
// Detailed - Boolean - Adds additional information fields for media files - detail
// Detailed - Boolean - - detail
// Cursor - String - Cursor from the previous request to get the next set of files - cursor
//
// Returns:
@ -311,7 +311,7 @@ EndFunction
//
// Parameters:
// Token - String - Token - token
// JobID - String - ID of the asynchronous job from the UploadFileByURL response - job
// JobID - String - - job
//
// Returns:
// Map Of KeyAndValue - serialized JSON response from Dropbox
@ -540,7 +540,7 @@ Function GetTagList(Val Token, Val Paths) Export
EndFunction
// Add tag
// Adds a new text tag to a file or directory
//
//
// Parameters:
// Token - String - Token - token
@ -717,7 +717,7 @@ Function AddUsersToFolder(Val Token, Val FolderID, Val EmailAddresses, Val ViewO
EndFunction
// Get asynchronous change status
// Gets the status of the asynchronous access change job
//
//
// Parameters:
// Token - String - Token - token

View File

@ -590,38 +590,20 @@ EndProcedure
Procedure YDisk_GetDiskInfo() Export
Token = OPI_TestDataRetrieval.GetParameter("YandexDisk_Token");
Map = "Map";
TestParameters = New Structure;
OPI_TestDataRetrieval.ParameterToCollection("YandexDisk_Token", TestParameters);
Result = OPI_YandexDisk.GetDiskInformation(Token);
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "GetDiskInfo");
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип(Map).Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["system_folders"]).ИмеетТип(Map);
OPI_TestDataRetrieval.ExpectsThat(Result["user"]).ИмеетТип(Map);
OPI_Tools.Pause(5);
(TestParameters);
EndProcedure
Procedure YDisk_CreateFolder() Export
Token = OPI_TestDataRetrieval.GetParameter("YandexDisk_Token");
Path = "/" + String(New UUID);
Result = OPI_YandexDisk.CreateFolder(Token, Path);
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateFolder");
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип("Map").Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["type"]).Равно("dir");
OPI_TestDataRetrieval.ExpectsThat(Result["path"]).Равно("disk:" + Path);
TestParameters = New Structure;
OPI_TestDataRetrieval.ParameterToCollection("YandexDisk_Token", TestParameters);
(TestParameters);
OPI_YandexDisk.DeleteObject(Token, Path, False);
OPI_Tools.Pause(5);
EndProcedure
Procedure YDisk_UploadByUrlAndGetObject() Export
@ -1225,7 +1207,7 @@ Procedure GC_CreateDeleteCalendar() Export
Result = OPI_GoogleCalendar.DeleteCalendarFromList(Token, Calendar);
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteListCalendar");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "DeleteCalendarInСпandwithtoа");
Check_Empty(Result);
@ -2639,7 +2621,7 @@ Procedure AT_CreateField() Export
Result = OPI_Airtable.ModifyField(Token, Base, Table, Field, Name, Description);
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "EditField");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "ModifyField");
OPI_TestDataRetrieval.ExpectsThat(Result["name"]).Равно(Name);
OPI_TestDataRetrieval.ExpectsThat(Result["description"]).Равно(Description);
@ -3369,6 +3351,24 @@ Procedure Check_VKVideo(Val Result)
EndProcedure
Procedure (Val Result)
= "Map";
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип().Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["system_folders"]).ИмеетТип();
OPI_TestDataRetrieval.ExpectsThat(Result["user"]).ИмеетТип();
EndProcedure
Procedure (Val Result, Val Path)
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип("Map").Заполнено();
OPI_TestDataRetrieval.ExpectsThat(Result["type"]).Равно("dir");
OPI_TestDataRetrieval.ExpectsThat(Result["path"]).Равно("disk:" + Path);
EndProcedure
Procedure Check_GKObject(Val Result, Val Name, Val Description)
OPI_TestDataRetrieval.ExpectsThat(Result).ИмеетТип("Map");
@ -4708,7 +4708,7 @@ Procedure VK_MakeRepost(FunctionParameters)
// END
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "Repost", "VK");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "MakeRepost", "VK");
Check_VKRepost(Result);
@ -4788,7 +4788,7 @@ Procedure VK_CreateAdCampaign(FunctionParameters)
// END
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateAdCampaign", "VK");
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateAdvertisingCampaign", "VK");
Check_VKCampaign(Result);
@ -6967,6 +6967,44 @@ EndProcedure
#EndRegion
#Region YandexDisk
Procedure (FunctionParameters)
Token = FunctionParameters["YandexDisk_Token"];
Result = OPI_YandexDisk.GetDiskInformation(Token);
// END
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "GetDiskInfo", "YandexDisk");
(Result);
OPI_Tools.Pause(5);
EndProcedure
Procedure (FunctionParameters)
Token = FunctionParameters["YandexDisk_Token"];
Path = "/" + String(New UUID);
Result = OPI_YandexDisk.CreateFolder(Token, Path);
// END
// !OInt OPI_TestDataRetrieval.WriteLog(Result, "CreateFolder", "YandexDisk");
(Result, Path);
OPI_YandexDisk.DeleteObject(Token, Path, False);
OPI_Tools.Pause(5);
EndProcedure
#EndRegion
#EndRegion
#EndRegion

View File

@ -25,7 +25,7 @@
// SOFTWARE.
// https://github.com/Bayselonarrend/OpenIntegrations
// If you don't know where to start, you should find the method GetStandardParameters()
// ()
// and read comments
// BSLLS:Typo-off
@ -76,7 +76,7 @@ Function GetAuthorizationLink(Parameters = "") Export
EndFunction
// Get token
// Gets the token by the code obtained during authorization via the link from GetAuthorizationLink
//
//
// Parameters:
// Code - String - Code obtained from authorization See GetAuthorizationLink - code
@ -482,7 +482,7 @@ EndFunction
Function GetStandardParameters(Val Parameters = "")
// Here is the definition of the data needed for work.
// .
// For Twitter, this is quite a significant set, which is due to the presence of 2 APIs at once,
// which, at the same time, are not created for different tasks, but are simply versions of each other.
// The current version of the API is v2 and it requires obtaining temporary tokens. Despite the fact,
@ -493,7 +493,7 @@ Function GetStandardParameters(Val Parameters = "")
// The world gigacorporation of Elon Musk, by the way, a reminder ;)
// P.S The "Twitter Developer settings page" is often mentioned further" - this
// " - this
// https://developer.twitter.com/en/portal/dashboard and chosing of project from list (key icon)
Parameters_ = New Map;

View File

@ -25,7 +25,7 @@
// SOFTWARE.
// https://github.com/Bayselonarrend/OpenIntegrations
// If you don't know where to start, you should find the method GetStandardParameters()
// ()
// and read comments
// BSLLS:NumberOfOptionalParams-off

View File

@ -101,7 +101,7 @@ Function GetUserData(Val Token, Val UserID) Export
EndFunction
// Get online users
// Gets the status of a user or several users by ID
//
//
// Parameters:
// Token - String - Viber Token - token

View File

@ -543,7 +543,7 @@
NewLine.Метод = "CreatePosts";
NewLine.МетодПоиска = "CREATEPOSTS";
NewLine.Параметр = "--data";
NewLine.Описание = "Set or array of sets of Key : Value pairs > Field : Indicator";
NewLine.Описание = "";
NewLine.Область = "Record management";

View File

@ -142,7 +142,7 @@
NewLine.Метод = "GetObjectInformation";
NewLine.МетодПоиска = "GETOBJECTINFORMATION";
NewLine.Параметр = "--detail";
NewLine.Описание = "Adds additional information fields for media files (optional, def. val. - False)";
NewLine.Описание = " (optional, def. val. - False)";
NewLine.Область = "File and directory management";
@ -173,7 +173,7 @@
NewLine.Метод = "GetListOfFolderFiles";
NewLine.МетодПоиска = "GETLISTOFFOLDERFILES";
NewLine.Параметр = "--detail";
NewLine.Описание = "Adds additional information fields for media files (optional, def. val. - False)";
NewLine.Описание = " (optional, def. val. - False)";
NewLine.Область = "File and directory management";
@ -297,7 +297,7 @@
NewLine.Метод = "GetUploadStatusByURL";
NewLine.МетодПоиска = "GETUPLOADSTATUSBYURL";
NewLine.Параметр = "--job";
NewLine.Описание = "ID of the asynchronous job from the UploadFileByURL response";
NewLine.Описание = "";
NewLine.Область = "File and directory management";
@ -548,7 +548,6 @@
NewLine.Параметр = "--token";
NewLine.Описание = "Token";
NewLine.Область = "Tags managment";
NewLine.ОписаниеМетода = "Adds a new text tag to a file or directory";
NewLine = CompositionTable.Add();
@ -734,7 +733,6 @@
NewLine.Параметр = "--token";
NewLine.Описание = "Token";
NewLine.Область = "Shared access settings";
NewLine.ОписаниеМетода = "Gets the status of the asynchronous access change job";
NewLine = CompositionTable.Add();

View File

@ -43,8 +43,7 @@
NewLine.Параметр = "--code";
NewLine.Описание = "Code obtained from authorization See GetAuthorizationLink";
NewLine.Область = "Data and settings";
NewLine.ОписаниеМетода = "Gets the token by the code obtained during authorization via the link from GetAuthorizationLink
|
NewLine.ОписаниеМетода = "|
| The structure of the JSON authentication data (parameter --auth):
| {
| ""redirect_uri"" : """",

View File

@ -75,7 +75,6 @@
NewLine.Параметр = "--token";
NewLine.Описание = "Viber Token";
NewLine.Область = "Settings and information";
NewLine.ОписаниеМетода = "Gets the status of a user or several users by ID";
NewLine = CompositionTable.Add();

View File

@ -1,21 +1,21 @@
<package-def>
<module name="OPI_Криптография" file="tools/Modules/internal/Modules/OPI_Криптография.os"/>
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
<module name="OPI_ПолучениеДанныхТестов" file="tools/Modules/OPI_ПолучениеДанныхТестов.os"/>
<module name="OPI_Slack" file="core/Modules/OPI_Slack.os"/>
<module name="OPI_Dropbox" file="core/Modules/OPI_Dropbox.os"/>
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
<module name="OPI_VK" file="core/Modules/OPI_VK.os"/>
<module name="OPI_Telegram" file="core/Modules/OPI_Telegram.os"/>
<module name="OPI_Airtable" file="core/Modules/OPI_Airtable.os"/>
<module name="OPI_Bitrix24" file="core/Modules/OPI_Bitrix24.os"/>
<module name="OPI_Dropbox" file="core/Modules/OPI_Dropbox.os"/>
<module name="OPI_GoogleCalendar" file="core/Modules/OPI_GoogleCalendar.os"/>
<module name="OPI_GoogleDrive" file="core/Modules/OPI_GoogleDrive.os"/>
<module name="OPI_GoogleSheets" file="core/Modules/OPI_GoogleSheets.os"/>
<module name="OPI_GoogleWorkspace" file="core/Modules/OPI_GoogleWorkspace.os"/>
<module name="OPI_Notion" file="core/Modules/OPI_Notion.os"/>
<module name="OPI_Slack" file="core/Modules/OPI_Slack.os"/>
<module name="OPI_Telegram" file="core/Modules/OPI_Telegram.os"/>
<module name="OPI_ПреобразованиеТипов" file="tools/Modules/OPI_ПреобразованиеТипов.os"/>
<module name="OPI_Twitter" file="core/Modules/OPI_Twitter.os"/>
<module name="OPI_Инструменты" file="tools/Modules/internal/Modules/OPI_Инструменты.os"/>
<module name="OPI_Viber" file="core/Modules/OPI_Viber.os"/>
<module name="OPI_VK" file="core/Modules/OPI_VK.os"/>
<module name="OPI_YandexDisk" file="core/Modules/OPI_YandexDisk.os"/>
<module name="OPI_YandexID" file="core/Modules/OPI_YandexID.os"/>
<module name="OPI_Инструменты" file="tools/Modules/internal/Modules/OPI_Инструменты.os"/>
<module name="OPI_Криптография" file="tools/Modules/internal/Modules/OPI_Криптография.os"/>
<module name="OPI_ПолучениеДанныхТестов" file="tools/Modules/OPI_ПолучениеДанныхТестов.os"/>
<module name="OPI_ПреобразованиеТипов" file="tools/Modules/OPI_ПреобразованиеТипов.os"/>
<module name="OPI_GoogleWorkspace" file="core/Modules/OPI_GoogleWorkspace.os"/>
</package-def>