├── .github
└── workflows
│ ├── examples-config.json
│ ├── run-examples.yml
│ ├── run-tests.yml
│ ├── tagged-release.yml
│ ├── tests-config.json
│ └── update-doc.yml
├── CMakeLists.txt
├── LICENSE
├── README.md
├── docs
├── Makefile
├── _templates
│ └── versioning.html
├── api.rst
├── api
│ ├── banana.rst
│ ├── banana
│ │ ├── agents.rst
│ │ ├── agents
│ │ │ ├── beast.rst
│ │ │ ├── cpr.rst
│ │ │ ├── httplib.rst
│ │ │ └── winapi.rst
│ │ └── basic_types.rst
│ ├── tg.rst
│ └── tg
│ │ ├── methods.rst
│ │ ├── methods
│ │ ├── add_sticker_to_set.rst
│ │ ├── answer_callback_query.rst
│ │ ├── answer_inline_query.rst
│ │ ├── answer_pre_checkout_query.rst
│ │ ├── answer_shipping_query.rst
│ │ ├── answer_web_app_query.rst
│ │ ├── approve_chat_join_request.rst
│ │ ├── ban_chat_member.rst
│ │ ├── ban_chat_sender_chat.rst
│ │ ├── close.rst
│ │ ├── close_forum_topic.rst
│ │ ├── close_general_forum_topic.rst
│ │ ├── copy_message.rst
│ │ ├── copy_messages.rst
│ │ ├── create_chat_invite_link.rst
│ │ ├── create_forum_topic.rst
│ │ ├── create_invoice_link.rst
│ │ ├── create_new_sticker_set.rst
│ │ ├── decline_chat_join_request.rst
│ │ ├── delete_chat_photo.rst
│ │ ├── delete_chat_sticker_set.rst
│ │ ├── delete_forum_topic.rst
│ │ ├── delete_message.rst
│ │ ├── delete_messages.rst
│ │ ├── delete_my_commands.rst
│ │ ├── delete_sticker_from_set.rst
│ │ ├── delete_sticker_set.rst
│ │ ├── delete_webhook.rst
│ │ ├── edit_chat_invite_link.rst
│ │ ├── edit_forum_topic.rst
│ │ ├── edit_general_forum_topic.rst
│ │ ├── edit_message_caption.rst
│ │ ├── edit_message_live_location.rst
│ │ ├── edit_message_media.rst
│ │ ├── edit_message_reply_markup.rst
│ │ ├── edit_message_text.rst
│ │ ├── export_chat_invite_link.rst
│ │ ├── forward_message.rst
│ │ ├── forward_messages.rst
│ │ ├── get_chat.rst
│ │ ├── get_chat_administrators.rst
│ │ ├── get_chat_member.rst
│ │ ├── get_chat_member_count.rst
│ │ ├── get_chat_menu_button.rst
│ │ ├── get_custom_emoji_stickers.rst
│ │ ├── get_file.rst
│ │ ├── get_forum_topic_icon_stickers.rst
│ │ ├── get_game_high_scores.rst
│ │ ├── get_me.rst
│ │ ├── get_my_commands.rst
│ │ ├── get_my_default_administrator_rights.rst
│ │ ├── get_my_description.rst
│ │ ├── get_my_name.rst
│ │ ├── get_my_short_description.rst
│ │ ├── get_sticker_set.rst
│ │ ├── get_updates.rst
│ │ ├── get_user_chat_boosts.rst
│ │ ├── get_user_profile_photos.rst
│ │ ├── get_webhook_info.rst
│ │ ├── hide_general_forum_topic.rst
│ │ ├── leave_chat.rst
│ │ ├── log_out.rst
│ │ ├── pin_chat_message.rst
│ │ ├── promote_chat_member.rst
│ │ ├── reopen_forum_topic.rst
│ │ ├── reopen_general_forum_topic.rst
│ │ ├── restrict_chat_member.rst
│ │ ├── revoke_chat_invite_link.rst
│ │ ├── send_animation.rst
│ │ ├── send_audio.rst
│ │ ├── send_chat_action.rst
│ │ ├── send_contact.rst
│ │ ├── send_dice.rst
│ │ ├── send_document.rst
│ │ ├── send_game.rst
│ │ ├── send_invoice.rst
│ │ ├── send_location.rst
│ │ ├── send_media_group.rst
│ │ ├── send_message.rst
│ │ ├── send_photo.rst
│ │ ├── send_poll.rst
│ │ ├── send_sticker.rst
│ │ ├── send_venue.rst
│ │ ├── send_video.rst
│ │ ├── send_video_note.rst
│ │ ├── send_voice.rst
│ │ ├── set_chat_administrator_custom_title.rst
│ │ ├── set_chat_description.rst
│ │ ├── set_chat_menu_button.rst
│ │ ├── set_chat_permissions.rst
│ │ ├── set_chat_photo.rst
│ │ ├── set_chat_sticker_set.rst
│ │ ├── set_chat_title.rst
│ │ ├── set_custom_emoji_sticker_set_thumbnail.rst
│ │ ├── set_game_score.rst
│ │ ├── set_message_reaction.rst
│ │ ├── set_my_commands.rst
│ │ ├── set_my_default_administrator_rights.rst
│ │ ├── set_my_description.rst
│ │ ├── set_my_name.rst
│ │ ├── set_my_short_description.rst
│ │ ├── set_passport_data_errors.rst
│ │ ├── set_sticker_emoji_list.rst
│ │ ├── set_sticker_keywords.rst
│ │ ├── set_sticker_mask_position.rst
│ │ ├── set_sticker_position_in_set.rst
│ │ ├── set_sticker_set_thumb.rst
│ │ ├── set_sticker_set_thumbnail.rst
│ │ ├── set_sticker_set_title.rst
│ │ ├── set_webhook.rst
│ │ ├── stop_message_live_location.rst
│ │ ├── stop_poll.rst
│ │ ├── unban_chat_member.rst
│ │ ├── unban_chat_sender_chat.rst
│ │ ├── unhide_general_forum_topic.rst
│ │ ├── unpin_all_chat_messages.rst
│ │ ├── unpin_all_forum_topic_messages.rst
│ │ ├── unpin_all_general_forum_topic_messages.rst
│ │ ├── unpin_chat_message.rst
│ │ └── upload_sticker_file.rst
│ │ ├── types.rst
│ │ └── types
│ │ ├── animation.rst
│ │ ├── audio.rst
│ │ ├── bot_command.rst
│ │ ├── bot_command_scope.rst
│ │ ├── bot_command_scope_all_chat_administrators.rst
│ │ ├── bot_command_scope_all_group_chats.rst
│ │ ├── bot_command_scope_all_private_chats.rst
│ │ ├── bot_command_scope_chat.rst
│ │ ├── bot_command_scope_chat_administrators.rst
│ │ ├── bot_command_scope_chat_member.rst
│ │ ├── bot_command_scope_default.rst
│ │ ├── bot_description.rst
│ │ ├── bot_name.rst
│ │ ├── bot_short_description.rst
│ │ ├── callback_game.rst
│ │ ├── callback_query.rst
│ │ ├── chat.rst
│ │ ├── chat_administrator_rights.rst
│ │ ├── chat_boost.rst
│ │ ├── chat_boost_added.rst
│ │ ├── chat_boost_removed.rst
│ │ ├── chat_boost_source.rst
│ │ ├── chat_boost_source_gift_code.rst
│ │ ├── chat_boost_source_giveaway.rst
│ │ ├── chat_boost_source_premium.rst
│ │ ├── chat_boost_updated.rst
│ │ ├── chat_invite_link.rst
│ │ ├── chat_join_request.rst
│ │ ├── chat_location.rst
│ │ ├── chat_member.rst
│ │ ├── chat_member_administrator.rst
│ │ ├── chat_member_banned.rst
│ │ ├── chat_member_left.rst
│ │ ├── chat_member_member.rst
│ │ ├── chat_member_owner.rst
│ │ ├── chat_member_restricted.rst
│ │ ├── chat_member_updated.rst
│ │ ├── chat_permissions.rst
│ │ ├── chat_photo.rst
│ │ ├── chat_shared.rst
│ │ ├── chosen_inline_result.rst
│ │ ├── contact.rst
│ │ ├── dice.rst
│ │ ├── document.rst
│ │ ├── encrypted_credentials.rst
│ │ ├── encrypted_passport_element.rst
│ │ ├── external_reply_info.rst
│ │ ├── file.rst
│ │ ├── force_reply.rst
│ │ ├── forum_topic.rst
│ │ ├── forum_topic_closed.rst
│ │ ├── forum_topic_created.rst
│ │ ├── forum_topic_edited.rst
│ │ ├── forum_topic_reopened.rst
│ │ ├── game.rst
│ │ ├── game_high_score.rst
│ │ ├── general_forum_topic_hidden.rst
│ │ ├── general_forum_topic_unhidden.rst
│ │ ├── giveaway.rst
│ │ ├── giveaway_completed.rst
│ │ ├── giveaway_created.rst
│ │ ├── giveaway_winners.rst
│ │ ├── inaccessible_message.rst
│ │ ├── inline_keyboard_button.rst
│ │ ├── inline_keyboard_markup.rst
│ │ ├── inline_query.rst
│ │ ├── inline_query_result.rst
│ │ ├── inline_query_result_article.rst
│ │ ├── inline_query_result_audio.rst
│ │ ├── inline_query_result_cached_audio.rst
│ │ ├── inline_query_result_cached_document.rst
│ │ ├── inline_query_result_cached_gif.rst
│ │ ├── inline_query_result_cached_mpeg4_gif.rst
│ │ ├── inline_query_result_cached_photo.rst
│ │ ├── inline_query_result_cached_sticker.rst
│ │ ├── inline_query_result_cached_video.rst
│ │ ├── inline_query_result_cached_voice.rst
│ │ ├── inline_query_result_contact.rst
│ │ ├── inline_query_result_document.rst
│ │ ├── inline_query_result_game.rst
│ │ ├── inline_query_result_gif.rst
│ │ ├── inline_query_result_location.rst
│ │ ├── inline_query_result_mpeg4_gif.rst
│ │ ├── inline_query_result_photo.rst
│ │ ├── inline_query_result_venue.rst
│ │ ├── inline_query_result_video.rst
│ │ ├── inline_query_result_voice.rst
│ │ ├── inline_query_results_button.rst
│ │ ├── input_contact_message_content.rst
│ │ ├── input_file.rst
│ │ ├── input_invoice_message_content.rst
│ │ ├── input_location_message_content.rst
│ │ ├── input_media.rst
│ │ ├── input_media_animation.rst
│ │ ├── input_media_audio.rst
│ │ ├── input_media_document.rst
│ │ ├── input_media_photo.rst
│ │ ├── input_media_video.rst
│ │ ├── input_message_content.rst
│ │ ├── input_sticker.rst
│ │ ├── input_text_message_content.rst
│ │ ├── input_venue_message_content.rst
│ │ ├── invoice.rst
│ │ ├── keyboard_button.rst
│ │ ├── keyboard_button_poll_type.rst
│ │ ├── keyboard_button_request_chat.rst
│ │ ├── keyboard_button_request_user.rst
│ │ ├── keyboard_button_request_users.rst
│ │ ├── labeled_price.rst
│ │ ├── link_preview_options.rst
│ │ ├── location.rst
│ │ ├── login_url.rst
│ │ ├── mask_position.rst
│ │ ├── maybe_inaccessible_message.rst
│ │ ├── menu_button.rst
│ │ ├── menu_button_commands.rst
│ │ ├── menu_button_default.rst
│ │ ├── menu_button_web_app.rst
│ │ ├── message.rst
│ │ ├── message_auto_delete_timer_changed.rst
│ │ ├── message_entity.rst
│ │ ├── message_id.rst
│ │ ├── message_origin.rst
│ │ ├── message_origin_channel.rst
│ │ ├── message_origin_chat.rst
│ │ ├── message_origin_hidden_user.rst
│ │ ├── message_origin_user.rst
│ │ ├── message_reaction_count_updated.rst
│ │ ├── message_reaction_updated.rst
│ │ ├── order_info.rst
│ │ ├── passport_data.rst
│ │ ├── passport_element_error.rst
│ │ ├── passport_element_error_data_field.rst
│ │ ├── passport_element_error_file.rst
│ │ ├── passport_element_error_files.rst
│ │ ├── passport_element_error_front_side.rst
│ │ ├── passport_element_error_reverse_side.rst
│ │ ├── passport_element_error_selfie.rst
│ │ ├── passport_element_error_translation_file.rst
│ │ ├── passport_element_error_translation_files.rst
│ │ ├── passport_element_error_unspecified.rst
│ │ ├── passport_file.rst
│ │ ├── photo_size.rst
│ │ ├── poll.rst
│ │ ├── poll_answer.rst
│ │ ├── poll_option.rst
│ │ ├── pre_checkout_query.rst
│ │ ├── proximity_alert_triggered.rst
│ │ ├── reaction_count.rst
│ │ ├── reaction_type.rst
│ │ ├── reaction_type_custom_emoji.rst
│ │ ├── reaction_type_emoji.rst
│ │ ├── reply_keyboard_markup.rst
│ │ ├── reply_keyboard_remove.rst
│ │ ├── reply_parameters.rst
│ │ ├── response_parameters.rst
│ │ ├── sent_web_app_message.rst
│ │ ├── shipping_address.rst
│ │ ├── shipping_option.rst
│ │ ├── shipping_query.rst
│ │ ├── sticker.rst
│ │ ├── sticker_set.rst
│ │ ├── story.rst
│ │ ├── successful_payment.rst
│ │ ├── switch_inline_query_chosen_chat.rst
│ │ ├── text_quote.rst
│ │ ├── update.rst
│ │ ├── user.rst
│ │ ├── user_chat_boosts.rst
│ │ ├── user_profile_photos.rst
│ │ ├── user_shared.rst
│ │ ├── users_shared.rst
│ │ ├── venue.rst
│ │ ├── video.rst
│ │ ├── video_chat_ended.rst
│ │ ├── video_chat_participants_invited.rst
│ │ ├── video_chat_scheduled.rst
│ │ ├── video_chat_started.rst
│ │ ├── video_note.rst
│ │ ├── voice.rst
│ │ ├── voice_chat_ended.rst
│ │ ├── voice_chat_participants_invited.rst
│ │ ├── voice_chat_scheduled.rst
│ │ ├── voice_chat_started.rst
│ │ ├── web_app_data.rst
│ │ ├── web_app_info.rst
│ │ ├── webhook_info.rst
│ │ └── write_access_allowed.rst
├── conf.py
├── guide.rst
├── guide
│ └── quick.rst
├── index.rst
├── make.bat
├── requirements.txt
└── utils
│ └── goal-note.rst
├── examples
├── CMakeLists.txt
├── agent-any-blocking.cpp
├── agent-beast-async.cpp
├── agent-beast-blocking.cpp
├── agent-beast-coro.cpp
├── agent-cpr-async.cpp
├── agent-cpr-blocking.cpp
├── agent-default-async.cpp
├── agent-default-blocking.cpp
├── agent-httplib-async.cpp
├── agent-httplib-blocking.cpp
├── agent-winapi-async.cpp
├── agent-winapi-blocking.cpp
├── custom-agent-blocking.cpp
├── examples_util.hpp
├── generic-api-call.cpp
└── vcpkg.json
├── include
└── banana
│ ├── agent
│ └── any.hpp
│ ├── api.hpp
│ ├── detail
│ ├── api_enums.hpp
│ ├── api_traits.hpp
│ ├── api_types_fwd.hpp
│ ├── generated
│ │ ├── api.hpp
│ │ ├── api_enums.hpp
│ │ ├── api_traits.hpp
│ │ ├── api_types_fwd.hpp
│ │ ├── meta.hpp
│ │ ├── types.hpp
│ │ └── types_fwd.hpp
│ ├── response_handler.hpp
│ └── serializer.hpp
│ ├── meta.hpp
│ ├── types.hpp
│ ├── types_fwd.hpp
│ └── utils
│ ├── agent.hpp
│ ├── basic_types.hpp
│ ├── dynamic_optional.hpp
│ └── expected.hpp
├── script
├── api.json
├── api.py
├── custom2json.py
├── custom_v2.json
├── json2cpp.py
├── json2rst.py
├── load_api.py
└── requirements.txt
├── source
├── CMakeLists.txt
├── agents
│ ├── CMakeLists.txt
│ ├── beast
│ │ ├── CMakeLists.txt
│ │ └── banana
│ │ │ └── agent
│ │ │ ├── beast.cpp
│ │ │ └── beast.hpp
│ ├── cpr
│ │ ├── CMakeLists.txt
│ │ └── banana
│ │ │ └── agent
│ │ │ ├── cpr.cpp
│ │ │ └── cpr.hpp
│ ├── default
│ │ ├── CMakeLists.txt
│ │ └── banana
│ │ │ └── agent
│ │ │ └── default.hpp
│ ├── httplib
│ │ ├── CMakeLists.txt
│ │ └── banana
│ │ │ └── agent
│ │ │ ├── httplib.cpp
│ │ │ └── httplib.hpp
│ └── winapi
│ │ ├── CMakeLists.txt
│ │ └── banana
│ │ └── agent
│ │ ├── winapi.cpp
│ │ └── winapi.hpp
├── core.cpp
├── generated
│ ├── resp_impl.cxx
│ └── serialize_impl.cxx
└── serialization.hpp
├── tests
├── CMakeLists.txt
├── doctest.h
├── main.cpp
├── test_deserialization.cpp
├── test_dynamic_optional.cpp
├── test_serialization.cpp
├── test_serialization_generated.cpp
└── util.hpp
└── third_party
└── json
└── nlohmann
└── json.hpp
/.github/workflows/examples-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "tests": [
3 | { "cmd": ["banana-example-agent-default-blocking"] },
4 | { "cmd": ["banana-example-agent-default-async"] },
5 | { "cmd": ["banana-example-agent-any-blocking"] },
6 | { "cmd": ["banana-example-agent-cpr-blocking"] },
7 | { "cmd": ["banana-example-agent-cpr-async"] },
8 | { "cmd": ["banana-example-agent-winapi-blocking"], "optional": true },
9 | { "cmd": ["banana-example-agent-winapi-async"], "optional": true },
10 | { "cmd": ["banana-example-agent-beast-blocking"] },
11 | { "cmd": ["banana-example-agent-beast-async"] },
12 | { "cmd": ["banana-example-agent-beast-coro"], "optional": true },
13 | { "cmd": ["banana-example-agent-httplib-blocking"] },
14 | { "cmd": ["banana-example-agent-httplib-async"] },
15 | { "cmd": ["banana-example-custom-agent-blocking"], "optional": true },
16 | { "cmd": ["banana-example-generic-api-call"] }
17 | ]
18 | }
--------------------------------------------------------------------------------
/.github/workflows/tagged-release.yml:
--------------------------------------------------------------------------------
1 | name: Tagged Release
2 |
3 | on:
4 | push:
5 | tags:
6 | - "v*"
7 |
8 | jobs:
9 | pre-release:
10 | runs-on: ubuntu-latest
11 | name: Publish Release ${{github.ref}}
12 |
13 | steps:
14 | - name: Checkout
15 | uses: actions/checkout@v2
16 |
17 | - name: Publish
18 | uses: marvinpinto/action-automatic-releases@latest
19 | with:
20 | repo_token: ${{ secrets.GITHUB_TOKEN }}
21 | draft: true
22 | prerelease: false
23 |
--------------------------------------------------------------------------------
/.github/workflows/tests-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "tests": [
3 | {
4 | "cmd": ["banana-tests"]
5 | }
6 | ]
7 | }
--------------------------------------------------------------------------------
/.github/workflows/update-doc.yml:
--------------------------------------------------------------------------------
1 | name: Update Documentation
2 |
3 | on:
4 | push:
5 | tags:
6 | - "v*"
7 | branches:
8 | - master
9 |
10 | jobs:
11 | docs:
12 | runs-on: ubuntu-latest
13 | name: Build and update docs
14 |
15 | steps:
16 | - uses: actions/checkout@v2
17 | with:
18 | fetch-depth: 0
19 |
20 | - name: Install python
21 | uses: actions/setup-python@v2
22 | with:
23 | python-version: '3.10'
24 |
25 | - name: Install python deps
26 | working-directory: "docs"
27 | shell: bash
28 | run: pip install -r requirements.txt
29 |
30 | - name: Clone documentation branch
31 | uses: actions/checkout@v2
32 | with:
33 | ref: "gh-pages"
34 | path: gh-pages
35 |
36 | - name: Build documentation
37 | working-directory: "docs"
38 | shell: bash
39 | run: |
40 | sphinx-multiversion . _build
41 | cp -r _build/* ../gh-pages
42 |
43 | - name: Publish Docs to gh-pages
44 | uses: peaceiris/actions-gh-pages@v3
45 | with:
46 | github_token: ${{ secrets.GITHUB_TOKEN }}
47 | publish_dir: gh-pages
48 |
--------------------------------------------------------------------------------
/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(banana)
3 |
4 | include(FetchContent)
5 |
6 | set(BANANA_VERSION_MAJOR 0)
7 | set(BANANA_VERSION_MINOR 5)
8 | set(BANANA_VERSION_PATCH 0)
9 |
10 | set(BANANA_ROOT_DIR ${PROJECT_SOURCE_DIR})
11 |
12 | # === Configuration options ===
13 |
14 | option(BANANA_USE_BUNDLED_CPR "Use CPR submodule for CPR agent" OFF)
15 | option(BANANA_BUILD_EXAMPLES "Build banana examples" OFF)
16 |
17 | # === Configuration logging ===
18 |
19 | message(STATUS "[banana] Use bundled CPR: ${BANANA_USE_BUNDLED_CPR}")
20 | message(STATUS "[banana] Build examples: ${BANANA_BUILD_EXAMPLES}")
21 |
22 | # TODO: replace with raw curl?
23 | if(BANANA_USE_BUNDLED_CPR)
24 | # Don't build cpr tests
25 | set(BUILD_CPR_TESTS OFF CACHE BOOL "" FORCE)
26 |
27 | find_package(CURL)
28 |
29 | if(CURL_FOUND)
30 | # Use the system curl for faster builds
31 | set(USE_SYSTEM_CURL ON CACHE BOOL "" FORCE)
32 | endif()
33 |
34 | FetchContent_Declare(cpr
35 | GIT_REPOSITORY https://github.com/whoshuu/cpr.git
36 | GIT_TAG f4622efcb59d84071ae11404ae61bd821c1c344b
37 | )
38 | FetchContent_MakeAvailable(cpr)
39 | endif()
40 |
41 |
42 | # === Library ===
43 |
44 | add_subdirectory(source)
45 |
46 | # === Testing ===
47 |
48 | if (${PROJECT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
49 | add_subdirectory(tests)
50 | endif()
51 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020-2021 Smertig
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = .
9 | BUILDDIR = _build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/docs/_templates/versioning.html:
--------------------------------------------------------------------------------
1 | {% if versions %}
2 |
{{ _('Versions') }}
3 |
8 | {% endif %}
9 |
--------------------------------------------------------------------------------
/docs/api.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api:
2 |
3 | API Reference
4 | =============
5 |
6 | The page contains all information about API:
7 |
8 | .. toctree::
9 | :name: api
10 |
11 | Banana API
12 | Telegram API
13 |
--------------------------------------------------------------------------------
/docs/api/banana.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-banana:
2 |
3 | Banana API
4 | ==========
5 |
6 | The page contains all information about banana API:
7 |
8 | .. toctree::
9 | :name: api_banana
10 |
11 | Banana Basic Types
12 | Banana Agents
13 |
--------------------------------------------------------------------------------
/docs/api/banana/basic_types.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-banana-basic_types:
2 |
3 | Banana Basic Types
4 | ==================
5 |
6 | Basic types are the types that make up all the structures used in Telegram API including method arguments and their return values.
7 |
8 | File
9 | ``#include ``
10 |
11 | .. cpp:type:: banana::boolean_t = bool
12 |
13 | Boolean type (`true` or `false`).
14 |
15 | .. cpp:type:: banana::float_t = double
16 |
17 | Floating point type.
18 |
19 | .. cpp:type:: banana::integer_t = std::int64_t
20 |
21 | Signed 64-bit integer type.
22 |
23 | .. cpp:type:: banana::string_t = std::string
24 |
25 | Utf-8 string.
26 |
27 | .. cpp:type:: template banana::optional_t = banana::dynamic_optional
28 |
29 | Type representing a value that may not exist.
30 |
31 | .. cpp:type:: template banana::array_t = std::vector
32 |
33 | Type representing dynamically-sized array.
34 |
35 | .. cpp:type:: template banana::variant_t = std::variant
36 |
37 | Type representing the value of one of several possible types.
38 |
--------------------------------------------------------------------------------
/docs/api/tg.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg:
2 |
3 | Telegram API
4 | ============
5 |
6 | The page contains all information about telegram-specific API:
7 |
8 | .. toctree::
9 | :name: api_tg
10 |
11 | Telegram Types
12 | Telegram Methods
13 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/add_sticker_to_set.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-add_sticker_to_set:
2 |
3 | add_sticker_to_set
4 | ==================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result add_sticker_to_set(Agent&& agent, add_sticker_to_set_args_t args)
9 | .. cpp:function:: template \
10 | void add_sticker_to_set(Agent&& agent, add_sticker_to_set_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success.
17 |
18 | .. cpp:struct:: add_sticker_to_set_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`add_sticker_to_set`.
21 |
22 |
23 | .. cpp:member:: integer_t user_id
24 |
25 | User identifier of sticker set owner
26 |
27 | .. cpp:member:: string_t name
28 |
29 | Sticker set name
30 |
31 | .. cpp:member:: input_sticker_t sticker
32 |
33 | A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.
34 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/answer_web_app_query.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-answer_web_app_query:
2 |
3 | answer_web_app_query
4 | ====================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result answer_web_app_query(Agent&& agent, answer_web_app_query_args_t args)
9 | .. cpp:function:: template \
10 | void answer_web_app_query(Agent&& agent, answer_web_app_query_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned.
17 |
18 | .. cpp:struct:: answer_web_app_query_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`answer_web_app_query`.
21 |
22 |
23 | .. cpp:member:: string_t web_app_query_id
24 |
25 | Unique identifier for the query to be answered
26 |
27 | .. cpp:member:: inline_query_result_t result
28 |
29 | A JSON-serialized object describing the message to be sent
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/approve_chat_join_request.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-approve_chat_join_request:
2 |
3 | approve_chat_join_request
4 | =========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result approve_chat_join_request(Agent&& agent, approve_chat_join_request_args_t args)
9 | .. cpp:function:: template \
10 | void approve_chat_join_request(Agent&& agent, approve_chat_join_request_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
17 |
18 | .. cpp:struct:: approve_chat_join_request_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`approve_chat_join_request`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target channel (in the format @channelusername)
26 |
27 | .. cpp:member:: integer_t user_id
28 |
29 | Unique identifier of the target user
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/close.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-close:
2 |
3 | close
4 | =====
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result close(Agent&& agent)
9 | .. cpp:function:: template \
10 | void close(Agent&& agent, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to close the bot instance before moving it from one local server to another. You need to delete the webhook before calling this method to ensure that the bot isn't launched again after server restart. The method will return error 429 in the first 10 minutes after the bot is launched. Returns True on success. Requires no parameters.
17 |
18 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/close_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-close_forum_topic:
2 |
3 | close_forum_topic
4 | =================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result close_forum_topic(Agent&& agent, close_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void close_forum_topic(Agent&& agent, close_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
17 |
18 | .. cpp:struct:: close_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`close_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
27 | .. cpp:member:: integer_t message_thread_id
28 |
29 | Unique identifier for the target message thread of the forum topic
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/close_general_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-close_general_forum_topic:
2 |
3 | close_general_forum_topic
4 | =========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result close_general_forum_topic(Agent&& agent, close_general_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void close_general_forum_topic(Agent&& agent, close_general_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
17 |
18 | .. cpp:struct:: close_general_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`close_general_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/decline_chat_join_request.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-decline_chat_join_request:
2 |
3 | decline_chat_join_request
4 | =========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result decline_chat_join_request(Agent&& agent, decline_chat_join_request_args_t args)
9 | .. cpp:function:: template \
10 | void decline_chat_join_request(Agent&& agent, decline_chat_join_request_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success.
17 |
18 | .. cpp:struct:: decline_chat_join_request_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`decline_chat_join_request`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target channel (in the format @channelusername)
26 |
27 | .. cpp:member:: integer_t user_id
28 |
29 | Unique identifier of the target user
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_chat_photo.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_chat_photo:
2 |
3 | delete_chat_photo
4 | =================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_chat_photo(Agent&& agent, delete_chat_photo_args_t args)
9 | .. cpp:function:: template \
10 | void delete_chat_photo(Agent&& agent, delete_chat_photo_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success.
17 |
18 | .. cpp:struct:: delete_chat_photo_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_chat_photo`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target channel (in the format @channelusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_chat_sticker_set.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_chat_sticker_set:
2 |
3 | delete_chat_sticker_set
4 | =======================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_chat_sticker_set(Agent&& agent, delete_chat_sticker_set_args_t args)
9 | .. cpp:function:: template \
10 | void delete_chat_sticker_set(Agent&& agent, delete_chat_sticker_set_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success.
17 |
18 | .. cpp:struct:: delete_chat_sticker_set_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_chat_sticker_set`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_forum_topic:
2 |
3 | delete_forum_topic
4 | ==================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_forum_topic(Agent&& agent, delete_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void delete_forum_topic(Agent&& agent, delete_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success.
17 |
18 | .. cpp:struct:: delete_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
27 | .. cpp:member:: integer_t message_thread_id
28 |
29 | Unique identifier for the target message thread of the forum topic
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_messages.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_messages:
2 |
3 | delete_messages
4 | ===============
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_messages(Agent&& agent, delete_messages_args_t args)
9 | .. cpp:function:: template \
10 | void delete_messages(Agent&& agent, delete_messages_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success.
17 |
18 | .. cpp:struct:: delete_messages_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_messages`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target channel (in the format @channelusername)
26 |
27 | .. cpp:member:: array_t message_ids
28 |
29 | A JSON-serialized list of 1-100 identifiers of messages to delete. See deleteMessage for limitations on which messages can be deleted
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_my_commands.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_my_commands:
2 |
3 | delete_my_commands
4 | ==================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_my_commands(Agent&& agent, delete_my_commands_args_t args)
9 | .. cpp:function:: template \
10 | void delete_my_commands(Agent&& agent, delete_my_commands_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success.
17 |
18 | .. cpp:struct:: delete_my_commands_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_my_commands`.
21 |
22 |
23 | .. cpp:member:: optional_t scope
24 |
25 | A JSON-serialized object, describing scope of users for which the commands are relevant. Defaults to BotCommandScopeDefault.
26 |
27 | .. cpp:member:: optional_t language_code
28 |
29 | A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_sticker_from_set.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_sticker_from_set:
2 |
3 | delete_sticker_from_set
4 | =======================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_sticker_from_set(Agent&& agent, delete_sticker_from_set_args_t args)
9 | .. cpp:function:: template \
10 | void delete_sticker_from_set(Agent&& agent, delete_sticker_from_set_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete a sticker from a set created by the bot. Returns True on success.
17 |
18 | .. cpp:struct:: delete_sticker_from_set_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_sticker_from_set`.
21 |
22 |
23 | .. cpp:member:: string_t sticker
24 |
25 | File identifier of the sticker
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_sticker_set.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_sticker_set:
2 |
3 | delete_sticker_set
4 | ==================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_sticker_set(Agent&& agent, delete_sticker_set_args_t args)
9 | .. cpp:function:: template \
10 | void delete_sticker_set(Agent&& agent, delete_sticker_set_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to delete a sticker set that was created by the bot. Returns True on success.
17 |
18 | .. cpp:struct:: delete_sticker_set_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_sticker_set`.
21 |
22 |
23 | .. cpp:member:: string_t name
24 |
25 | Sticker set name
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/delete_webhook.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-delete_webhook:
2 |
3 | delete_webhook
4 | ==============
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result delete_webhook(Agent&& agent, delete_webhook_args_t args)
9 | .. cpp:function:: template \
10 | void delete_webhook(Agent&& agent, delete_webhook_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success.
17 |
18 | .. cpp:struct:: delete_webhook_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`delete_webhook`.
21 |
22 |
23 | .. cpp:member:: optional_t drop_pending_updates
24 |
25 | Pass True to drop all pending updates
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/edit_general_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-edit_general_forum_topic:
2 |
3 | edit_general_forum_topic
4 | ========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result edit_general_forum_topic(Agent&& agent, edit_general_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void edit_general_forum_topic(Agent&& agent, edit_general_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success.
17 |
18 | .. cpp:struct:: edit_general_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`edit_general_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
27 | .. cpp:member:: string_t name
28 |
29 | New topic name, 1-128 characters
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/export_chat_invite_link.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-export_chat_invite_link:
2 |
3 | export_chat_invite_link
4 | =======================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result export_chat_invite_link(Agent&& agent, export_chat_invite_link_args_t args)
9 | .. cpp:function:: template \
10 | void export_chat_invite_link(Agent&& agent, export_chat_invite_link_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to generate a new primary invite link for a chat; any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success.
17 |
18 | .. cpp:struct:: export_chat_invite_link_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`export_chat_invite_link`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target channel (in the format @channelusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_chat.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_chat:
2 |
3 | get_chat
4 | ========
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_chat(Agent&& agent, get_chat_args_t args)
9 | .. cpp:function:: template \
10 | void get_chat(Agent&& agent, get_chat_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success.
17 |
18 | .. cpp:struct:: get_chat_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_chat`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_chat_administrators.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_chat_administrators:
2 |
3 | get_chat_administrators
4 | =======================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result, Agent&&> get_chat_administrators(Agent&& agent, get_chat_administrators_args_t args)
9 | .. cpp:function:: template \
10 | void get_chat_administrators(Agent&& agent, get_chat_administrators_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected>``.
15 |
16 | Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects.
17 |
18 | .. cpp:struct:: get_chat_administrators_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_chat_administrators`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_chat_member.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_chat_member:
2 |
3 | get_chat_member
4 | ===============
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_chat_member(Agent&& agent, get_chat_member_args_t args)
9 | .. cpp:function:: template \
10 | void get_chat_member(Agent&& agent, get_chat_member_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success.
17 |
18 | .. cpp:struct:: get_chat_member_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_chat_member`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
26 |
27 | .. cpp:member:: integer_t user_id
28 |
29 | Unique identifier of the target user
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_chat_member_count.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_chat_member_count:
2 |
3 | get_chat_member_count
4 | =====================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_chat_member_count(Agent&& agent, get_chat_member_count_args_t args)
9 | .. cpp:function:: template \
10 | void get_chat_member_count(Agent&& agent, get_chat_member_count_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the number of members in a chat. Returns Int on success.
17 |
18 | .. cpp:struct:: get_chat_member_count_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_chat_member_count`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_chat_menu_button.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_chat_menu_button:
2 |
3 | get_chat_menu_button
4 | ====================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_chat_menu_button(Agent&& agent, get_chat_menu_button_args_t args)
9 | .. cpp:function:: template \
10 | void get_chat_menu_button(Agent&& agent, get_chat_menu_button_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success.
17 |
18 | .. cpp:struct:: get_chat_menu_button_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_chat_menu_button`.
21 |
22 |
23 | .. cpp:member:: optional_t chat_id
24 |
25 | Unique identifier for the target private chat. If not specified, default bot's menu button will be returned
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_custom_emoji_stickers.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_custom_emoji_stickers:
2 |
3 | get_custom_emoji_stickers
4 | =========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result, Agent&&> get_custom_emoji_stickers(Agent&& agent, get_custom_emoji_stickers_args_t args)
9 | .. cpp:function:: template \
10 | void get_custom_emoji_stickers(Agent&& agent, get_custom_emoji_stickers_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected>``.
15 |
16 | Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
17 |
18 | .. cpp:struct:: get_custom_emoji_stickers_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_custom_emoji_stickers`.
21 |
22 |
23 | .. cpp:member:: array_t custom_emoji_ids
24 |
25 | A JSON-serialized list of custom emoji identifiers. At most 200 custom emoji identifiers can be specified.
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_file.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_file:
2 |
3 | get_file
4 | ========
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_file(Agent&& agent, get_file_args_t args)
9 | .. cpp:function:: template \
10 | void get_file(Agent&& agent, get_file_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
17 |
18 | .. cpp:struct:: get_file_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_file`.
21 |
22 |
23 | .. cpp:member:: string_t file_id
24 |
25 | File identifier to get information about
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_forum_topic_icon_stickers.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_forum_topic_icon_stickers:
2 |
3 | get_forum_topic_icon_stickers
4 | =============================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result, Agent&&> get_forum_topic_icon_stickers(Agent&& agent)
9 | .. cpp:function:: template \
10 | void get_forum_topic_icon_stickers(Agent&& agent, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected>``.
15 |
16 | Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects.
17 |
18 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_me.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_me:
2 |
3 | get_me
4 | ======
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_me(Agent&& agent)
9 | .. cpp:function:: template \
10 | void get_me(Agent&& agent, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
17 |
18 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_my_commands.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_my_commands:
2 |
3 | get_my_commands
4 | ===============
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result, Agent&&> get_my_commands(Agent&& agent, get_my_commands_args_t args)
9 | .. cpp:function:: template \
10 | void get_my_commands(Agent&& agent, get_my_commands_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected>``.
15 |
16 | Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned.
17 |
18 | .. cpp:struct:: get_my_commands_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_my_commands`.
21 |
22 |
23 | .. cpp:member:: optional_t scope
24 |
25 | A JSON-serialized object, describing scope of users. Defaults to BotCommandScopeDefault.
26 |
27 | .. cpp:member:: optional_t language_code
28 |
29 | A two-letter ISO 639-1 language code or an empty string
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_my_default_administrator_rights.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_my_default_administrator_rights:
2 |
3 | get_my_default_administrator_rights
4 | ===================================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_my_default_administrator_rights(Agent&& agent, get_my_default_administrator_rights_args_t args)
9 | .. cpp:function:: template \
10 | void get_my_default_administrator_rights(Agent&& agent, get_my_default_administrator_rights_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success.
17 |
18 | .. cpp:struct:: get_my_default_administrator_rights_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_my_default_administrator_rights`.
21 |
22 |
23 | .. cpp:member:: optional_t for_channels
24 |
25 | Pass True to get default administrator rights of the bot in channels. Otherwise, default administrator rights of the bot for groups and supergroups will be returned.
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_my_description.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_my_description:
2 |
3 | get_my_description
4 | ==================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_my_description(Agent&& agent, get_my_description_args_t args)
9 | .. cpp:function:: template \
10 | void get_my_description(Agent&& agent, get_my_description_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the current bot description for the given user language. Returns BotDescription on success.
17 |
18 | .. cpp:struct:: get_my_description_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_my_description`.
21 |
22 |
23 | .. cpp:member:: optional_t language_code
24 |
25 | A two-letter ISO 639-1 language code or an empty string
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_my_name.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_my_name:
2 |
3 | get_my_name
4 | ===========
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_my_name(Agent&& agent, get_my_name_args_t args)
9 | .. cpp:function:: template \
10 | void get_my_name(Agent&& agent, get_my_name_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the current bot name for the given user language. Returns BotName on success.
17 |
18 | .. cpp:struct:: get_my_name_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_my_name`.
21 |
22 |
23 | .. cpp:member:: optional_t language_code
24 |
25 | A two-letter ISO 639-1 language code or an empty string
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_my_short_description.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_my_short_description:
2 |
3 | get_my_short_description
4 | ========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_my_short_description(Agent&& agent, get_my_short_description_args_t args)
9 | .. cpp:function:: template \
10 | void get_my_short_description(Agent&& agent, get_my_short_description_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success.
17 |
18 | .. cpp:struct:: get_my_short_description_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_my_short_description`.
21 |
22 |
23 | .. cpp:member:: optional_t language_code
24 |
25 | A two-letter ISO 639-1 language code or an empty string
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_sticker_set.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_sticker_set:
2 |
3 | get_sticker_set
4 | ===============
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_sticker_set(Agent&& agent, get_sticker_set_args_t args)
9 | .. cpp:function:: template \
10 | void get_sticker_set(Agent&& agent, get_sticker_set_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get a sticker set. On success, a StickerSet object is returned.
17 |
18 | .. cpp:struct:: get_sticker_set_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_sticker_set`.
21 |
22 |
23 | .. cpp:member:: string_t name
24 |
25 | Name of the sticker set
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_user_chat_boosts.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_user_chat_boosts:
2 |
3 | get_user_chat_boosts
4 | ====================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_user_chat_boosts(Agent&& agent, get_user_chat_boosts_args_t args)
9 | .. cpp:function:: template \
10 | void get_user_chat_boosts(Agent&& agent, get_user_chat_boosts_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.
17 |
18 | .. cpp:struct:: get_user_chat_boosts_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_user_chat_boosts`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the chat or username of the channel (in the format @channelusername)
26 |
27 | .. cpp:member:: integer_t user_id
28 |
29 | Unique identifier of the target user
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_user_profile_photos.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_user_profile_photos:
2 |
3 | get_user_profile_photos
4 | =======================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_user_profile_photos(Agent&& agent, get_user_profile_photos_args_t args)
9 | .. cpp:function:: template \
10 | void get_user_profile_photos(Agent&& agent, get_user_profile_photos_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
17 |
18 | .. cpp:struct:: get_user_profile_photos_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`get_user_profile_photos`.
21 |
22 |
23 | .. cpp:member:: integer_t user_id
24 |
25 | Unique identifier of the target user
26 |
27 | .. cpp:member:: optional_t offset
28 |
29 | Sequential number of the first photo to be returned. By default, all photos are returned.
30 |
31 | .. cpp:member:: optional_t limit
32 |
33 | Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
34 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/get_webhook_info.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-get_webhook_info:
2 |
3 | get_webhook_info
4 | ================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result get_webhook_info(Agent&& agent)
9 | .. cpp:function:: template \
10 | void get_webhook_info(Agent&& agent, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo object. If the bot is using getUpdates, will return an object with the url field empty.
17 |
18 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/hide_general_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-hide_general_forum_topic:
2 |
3 | hide_general_forum_topic
4 | ========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result hide_general_forum_topic(Agent&& agent, hide_general_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void hide_general_forum_topic(Agent&& agent, hide_general_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success.
17 |
18 | .. cpp:struct:: hide_general_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`hide_general_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/leave_chat.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-leave_chat:
2 |
3 | leave_chat
4 | ==========
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result leave_chat(Agent&& agent, leave_chat_args_t args)
9 | .. cpp:function:: template \
10 | void leave_chat(Agent&& agent, leave_chat_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method for your bot to leave a group, supergroup or channel. Returns True on success.
17 |
18 | .. cpp:struct:: leave_chat_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`leave_chat`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/log_out.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-log_out:
2 |
3 | log_out
4 | =======
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result log_out(Agent&& agent)
9 | .. cpp:function:: template \
10 | void log_out(Agent&& agent, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive updates. After a successful call, you can immediately log in on a local server, but will not be able to log in back to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.
17 |
18 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/reopen_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-reopen_forum_topic:
2 |
3 | reopen_forum_topic
4 | ==================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result reopen_forum_topic(Agent&& agent, reopen_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void reopen_forum_topic(Agent&& agent, reopen_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success.
17 |
18 | .. cpp:struct:: reopen_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`reopen_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
27 | .. cpp:member:: integer_t message_thread_id
28 |
29 | Unique identifier for the target message thread of the forum topic
30 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/reopen_general_forum_topic.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-reopen_general_forum_topic:
2 |
3 | reopen_general_forum_topic
4 | ==========================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result reopen_general_forum_topic(Agent&& agent, reopen_general_forum_topic_args_t args)
9 | .. cpp:function:: template \
10 | void reopen_general_forum_topic(Agent&& agent, reopen_general_forum_topic_args_t args, F&& callback)
11 |
12 | ``agent`` is any object satisfying :ref:`agent concept `.
13 |
14 | ``callback`` is any callable object accepting ``expected``.
15 |
16 | Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success.
17 |
18 | .. cpp:struct:: reopen_general_forum_topic_args_t
19 |
20 | Arguments that should be passed to :cpp:func:`reopen_general_forum_topic`.
21 |
22 |
23 | .. cpp:member:: variant_t chat_id
24 |
25 | Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
26 |
--------------------------------------------------------------------------------
/docs/api/tg/methods/set_chat_description.rst:
--------------------------------------------------------------------------------
1 | .. _banana-api-tg-methods-set_chat_description:
2 |
3 | set_chat_description
4 | ====================
5 |
6 | .. cpp:namespace:: banana::api
7 | .. cpp:function:: template \
8 | api_result