| 1 | #pragma once |
| 2 | |
| 3 | /// @file |
| 4 | /// @brief Responses returned by the media repo. |
| 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 | #include <string> |
| 13 | |
| 14 | namespace mtx { |
| 15 | namespace responses { |
| 16 | |
| 17 | //! Represents the response of `POST /_matrix/media/r0/upload` |
| 18 | struct ContentURI |
| 19 | { |
| 20 | //! The MXC URI for the uploaded content. |
| 21 | std::string content_uri; |
| 22 | |
| 23 | friend void from_json(const nlohmann::json &obj, ContentURI &response); |
| 24 | }; |
| 25 | } |
| 26 | } |
| 27 | |