1 | #pragma once |
2 | |
3 | /// @file |
4 | /// @brief Return value of the server and API version query. |
5 | |
6 | #if __has_include(<nlohmann/json_fwd.hpp>) |
7 | #include <nlohmann/json_fwd.hpp> |
8 | #else |
9 | #include <nlohmann/json.hpp> |
10 | #endif |
11 | |
12 | namespace mtx { |
13 | namespace responses { |
14 | |
15 | //! Response from the `GET /_matrix/client/versions` endpoint. |
16 | // |
17 | //! Gets the versions of the specification supported by the server. |
18 | struct Versions |
19 | { |
20 | //! The supported versions. |
21 | std::vector<std::string> versions; |
22 | |
23 | friend void from_json(const nlohmann::json &obj, Versions &response); |
24 | }; |
25 | } |
26 | } |
27 | |