Romani Gate, v1.1
Posted on

Web service for an interaction with the Instagram* Direct API.
Support a sending of a photo message to a specified user.
* Запрещена в России / Banned in Russia.
Change Log
- Support a sending of a photo message to a specified user.
Features
- log in a bot account;
- working mode:
- run as a web service;
- control via the JSON-RPC like API;
- commands:
- send a text message to a specified user;
- send a link message to a specified user:
- automatic extract links from a message body;
- send a photo message to a specified user:
- automatic upload a specified photo to the Instagram* Direct:
- by an absolute path;
- by a path relative to a current working directory;
- automatic upload a specified photo to the Instagram* Direct:
- read a history of a thread with a specified user:
- automatic detect a thread ID;
- support a pagination of a history;
- filter a history by a specified user;
- restrict a history by a specified message ID;
- automatic extract a text from a link message.
* Запрещена в России / Banned in Russia.
Commands
General Command
General command format in the JSON Schema format:
{
"type": "object",
"required": ["name", "parameters"],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"enum": ["send_message", "send_photo", "get_thread_history"]
},
"parameters": {
"type": "object",
"additionalProperties": false,
"patternProperties": {".+": {}}
}
}
}
Send Photo Command
Send photo command format in the JSON Schema format:
{
"type": "object",
"required": ["name", "parameters"],
"additionalProperties": false,
"properties": {
"name": {"type": "string", "enum": ["send_photo"]},
"parameters": {
"type": "object",
"required": ["user_id", "filename"],
"additionalProperties": false,
"properties": {
"user_id": {"type": "string", "pattern": "^\\d+$"},
"filename": {"type": "string", "minLength": 1}
}
}
}
}
Example:
{
"name": "send_photo",
"parameters": {"user_id": "1599620166", "filename": "cat.jpg"}
}