Skip to content

Commit 986a7b5

Browse files
authored
Merge pull request #300 from llnulldisk/master
Update to Bot API 7.2
2 parents 0910c16 + 283cc4b commit 986a7b5

116 files changed

Lines changed: 5870 additions & 1482 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,16 @@ set(SRC_LIST
3838
src/tools/FileTools.cpp
3939
src/tools/StringTools.cpp
4040
src/types/BotCommandScope.cpp
41+
src/types/ChatBoostSource.cpp
4142
src/types/ChatMember.cpp
4243
src/types/InlineQueryResult.cpp
4344
src/types/InputFile.cpp
4445
src/types/InputMedia.cpp
4546
src/types/InputMessageContent.cpp
4647
src/types/MenuButton.cpp
47-
src/types/PassportElementError.cpp)
48+
src/types/MessageOrigin.cpp
49+
src/types/PassportElementError.cpp
50+
src/types/ReactionType.cpp)
4851

4952
# libs
5053
## threads

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ Documentation is located [here](http://reo7sp.github.io/tgbot-cpp).
99

1010
## State
1111

12-
- [x] Telegram Bot API 6.5
12+
- [x] Telegram Bot API 7.2
13+
- [ ] [MaybeInaccessibleMessage](https://core.telegram.org/bots/api#maybeinaccessiblemessage)
14+
- [ ] [Message->pinnedMessage](https://core.telegram.org/bots/api#message)
15+
- [ ] [CallbackQuery->message](https://core.telegram.org/bots/api#callbackquery)
16+
- [ ] [Deep Linking](https://core.telegram.org/bots/features#deep-linking)
1317

1418

1519
## Sample
@@ -64,7 +68,12 @@ Dependencies:
6468
You can install dependencies on Debian-based distibutives with these commands:
6569

6670
```sh
67-
sudo apt-get install g++ make binutils cmake libboost-system-dev libssl-dev zlib1g-dev libcurl4-openssl-dev
71+
sudo apt install g++ make binutils cmake libboost-system-dev libssl-dev zlib1g-dev libcurl4-openssl-dev
72+
```
73+
74+
Optionally, install the dependencies for testing and documenting
75+
```sh
76+
sudo apt install libboost-test-dev doxygen
6877
```
6978

7079
You can compile and install the library with these commands:
@@ -99,8 +108,8 @@ Taken from [Vcpkg - Quick Start: Windows](https://github.com/Microsoft/vcpkg/#qu
99108

100109
Prerequisites:
101110
- Windows 7 or newer
102-
- Git
103-
- Visual Studio 2015 Update 3 or greater with the English language pack
111+
- [Git][https://git-scm.com/downloads]
112+
- [Visual Studio][https://visualstudio.microsoft.com] 2015 Update 3 or greater with the English language pack
104113

105114
First, download and bootstrap vcpkg itself; it can be installed anywhere, but generally we recommend using vcpkg as a submodule for CMake projects, and installing it globally for Visual Studio projects. We recommend somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`, since otherwise you may run into path issues for some port build systems.
106115

include/tgbot/Api.h

Lines changed: 533 additions & 282 deletions
Large diffs are not rendered by default.

include/tgbot/TgTypeParser.h

Lines changed: 190 additions & 12 deletions
Large diffs are not rendered by default.

include/tgbot/types/Animation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Animation {
4747
/**
4848
* @brief Optional. Animation thumbnail as defined by sender
4949
*/
50-
PhotoSize::Ptr thumb;
50+
PhotoSize::Ptr thumbnail;
5151

5252
/**
5353
* @brief Optional. Original animation filename as defined by sender

include/tgbot/types/Audio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Audio {
6666
/**
6767
* @brief Optional. Thumbnail of the album cover to which the music file belongs
6868
*/
69-
PhotoSize::Ptr thumb;
69+
PhotoSize::Ptr thumbnail;
7070
};
7171
}
7272

include/tgbot/types/Birthdate.h

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#ifndef TGBOT_BIRTHDATE_H
2+
#define TGBOT_BIRTHDATE_H
3+
4+
#include <cstdint>
5+
#include <memory>
6+
7+
namespace TgBot {
8+
9+
/**
10+
* @ingroup types
11+
*/
12+
class Birthdate {
13+
14+
public:
15+
typedef std::shared_ptr<Birthdate> Ptr;
16+
17+
/**
18+
* @brief Day of the user's birth; 1-31
19+
*/
20+
std::uint8_t day;
21+
22+
/**
23+
* @brief Month of the user's birth; 1-12
24+
*/
25+
std::uint8_t month;
26+
27+
/**
28+
* @brief Optional. Year of the user's birth
29+
*/
30+
std::uint16_t year;
31+
};
32+
}
33+
34+
#endif //TGBOT_BIRTHDATE_H
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef TGBOT_BOTDESCRIPTION_H
2+
#define TGBOT_BOTDESCRIPTION_H
3+
4+
#include <memory>
5+
#include <string>
6+
7+
namespace TgBot {
8+
9+
/**
10+
* @brief This object represents the bot's description.
11+
*
12+
* @ingroup types
13+
*/
14+
class BotDescription {
15+
public:
16+
typedef std::shared_ptr<BotDescription> Ptr;
17+
18+
/**
19+
* @brief The bot's description
20+
*/
21+
std::string description;
22+
};
23+
}
24+
25+
#endif //TGBOT_BOTDESCRIPTION_H

include/tgbot/types/BotName.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef TGBOT_BOTNAME_H
2+
#define TGBOT_BOTNAME_H
3+
4+
#include <memory>
5+
#include <string>
6+
7+
namespace TgBot {
8+
9+
/**
10+
* @brief This object represents the bot's name.
11+
*
12+
* @ingroup types
13+
*/
14+
class BotName {
15+
public:
16+
typedef std::shared_ptr<BotName> Ptr;
17+
18+
/**
19+
* @brief The bot's name
20+
*/
21+
std::string name;
22+
};
23+
}
24+
25+
#endif //TGBOT_BOTNAME_H
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef TGBOT_BOTSHORTDESCRIPTION_H
2+
#define TGBOT_BOTSHORTDESCRIPTION_H
3+
4+
#include <memory>
5+
#include <string>
6+
7+
namespace TgBot {
8+
9+
/**
10+
* @brief This object represents the bot's short description.
11+
*
12+
* @ingroup types
13+
*/
14+
class BotShortDescription {
15+
public:
16+
typedef std::shared_ptr<BotShortDescription> Ptr;
17+
18+
/**
19+
* @brief The bot's short description
20+
*/
21+
std::string shortDescription;
22+
};
23+
}
24+
25+
#endif //TGBOT_BOTSHORTDESCRIPTION_H

0 commit comments

Comments
 (0)