7.8 KiB
Open Integrations Package
A set of tools for integration with popular APIs: console application (Windows/Linux) and library (extension) for 1C:Enterprise/OneScript, consisting of a common set of ready-made functions for working with many well-known cloud services
The implemented methods perform specific tasks (such as SendMessage
or CreatePost
), allowing them to be used without delving into the implementation details. However, the code is highly decomposed – authorization methods, data retrieval, etc., are separated into individual functions where possible. This makes it easy to add new methods, even if they are not yet implemented in the library at the current time.
List of currently available APIs:
Work example
Sending picture to Telegram chat for 1C/OneScript
Token = "6129457865:AAFyzNYOAFbu...";
ChatID = "461699897";
Text = "Cool pic";
Picture = "C:/picture.jpg"; // URL, disk path or Binary data
Result = OPI_Telegram.SendImage(Token, ChatID, Text, Picture);
Same thing, but for CLI (bash example)
oint telegram SendImage \
--token "6129457865:AAFyzNYOAFbu..." \
--chat 461699897 \
--text "Cool pic" \
--picture "picture.jpg"
You can use the standard >
redirect or the oint's --out
option to save the response in the console. For more details of working with the CLI version, see the corresponding documentation section
Releases
The library releases come in five versions:
- As a CLI application for Windows and Linux (exe, rpm, deb)
- As XML extension files for loading via the configurator
- As an EDT extension project
- As a standalone extension file in cfe format
- As a OneScript extension package in ospx format
When using the 1C and OneScript versions, you can also simply copy the code of common modules from the releases into your project by hand. However, regardless of the chosen installation method, you should get the files from Release, because the repository source files themselves contain intermediate data and functions under development.
-
To start working in 1C it is enough to download the CFE file (or XML upload) of the extension and load it into the extensions list of your configuration
-
To start working in OneScript, you need to install the package
From the package hub (RU version only):
opm install oint
Or from a downloaded ospx file:
opm install -f "./OInt-x.x.x.ospx"
-
To get started with the CLI (command line application), you need to download the Windows installer or one of the package variants for Linux from the releases, according to the operating system you are using
With any installation option, the OInt CLI is started with the
oint
command from the command line (installation from Installer for Windows may require a reboot)
Warning
Also, there is a single exe-file delivery for the CLI application. To run it, .Net Framework 4.8 or the relevant version of Mono is required. This delivery option has performance issues, so we recommend using it only if it is impossible to use other variants on the target system
Documentation
OpenIntegrations has detailed documentation with examples available at https://en.openintegrations.dev. There you can find both general guidelines for getting started with each specific API and descriptions of each method with code examples, parameters, and return values.
The CLI version of OpenIntegrations has its own built-in help for all methods. The help is displayed when calling the library without a method, a method without options, or by specifying the --help
option.
- Open Integrations Package (OpenIntegrations)
Licensed under the MIT License