![Main](https://github.com/Bayselonarrend/OpenIntegrations/raw/main/Media/main.gif#gh-dark-mode-only#gh-dark-mode-only) ![Main-light](https://github.com/Bayselonarrend/OpenIntegrations/raw/main/Media/main-light.gif#gh-light-mode-only) # Open Integrations Package ![Версия](https://img.shields.io/badge/1C_version-8.3.9-yellow) [![OpenYellow](https://img.shields.io/endpoint?url=https://openyellow.org/data/badges/2/736878759.json)](https://openyellow.org/grid?data=top&repo=736878759)
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 ```bsl 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) ```bash 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](https://en.openintegrations.dev/docs/Start/CLI_version)
## Releases ## [![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/bayselonarrend/OpenIntegrations/total?logo=github)](https://github.com/Bayselonarrend/OpenIntegrations/releases/latest)

#### 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): ```powershell opm install oint ``` Or from a downloaded ospx file: ```powershell 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](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. ![Docs](https://github.com/Bayselonarrend/OpenIntegrations/raw/main/Media/docs_eng.png?4) 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