11#ifndef OCTANE_API_CLIENT_API_CLIENT_H_
12#define OCTANE_API_CLIENT_API_CLIENT_H_
23 std::uint64_t lastCheckedTime;
25 struct ConnectionStatus {
38 ConnectionStatus connectionStatus{ .isConnected =
false };
111 std::string_view name);
129 std::string_view name);
150 std::optional<std::uint64_t>
id = std::nullopt);
262 std::vector<std::uint8_t> createBinary(
263 const std::variant<std::string,
264 std::vector<uint8_t>,
265 std::vector<FileInfo>>& input);
Types which are used to return values in api client.
Definition: api_client.h:21
Result< Response, ErrorResponse > disconnectRoom(std::uint64_t id, std::string_view name)
Disconnects from the room.
Definition: api_client.cpp:117
Result< Response, ErrorResponse > uploadContent(const Content &content)
Uploads content to the room.
Definition: api_client.cpp:245
Result< Response, ErrorResponse > deleteContent()
Deletes the room's content.
Definition: api_client.cpp:226
Result< Content, ErrorResponse > getContent()
Gets the room's content.
Definition: api_client.cpp:181
Result< Response, ErrorResponse > deleteRoom(std::optional< std::uint64_t > id=std::nullopt)
Deletes the room.
Definition: api_client.cpp:159
Result< RoomStatus, ErrorResponse > getRoomStatus(std::optional< std::uint64_t > id=std::nullopt)
Gets the room's status.
Definition: api_client.cpp:137
~ApiClient() noexcept
Destroy the Api Client object.
Definition: api_client.cpp:28
Result< RoomId, ErrorResponse > createRoom(std::string_view name)
Creates a room.
Definition: api_client.cpp:83
Result< Response, ErrorResponse > init()
Run this method at first.(Since no exeptions are allowed in the constructor, we need this method to i...
Definition: api_client.cpp:34
Result< Response, ErrorResponse > connectRoom(std::uint64_t id, std::string_view name)
Connects to the room.
Definition: api_client.cpp:98
Wrapper class that bifurcates the values indicated by normal and quasi-normal states.
Definition: result.h:38
Definition: api_bridge.h:20
Define constants which are used on compiling.
Definition: api_client.cpp:20
constexpr auto DEFAULT_API_TOKEN
Default API token.
Definition: config.h:26
constexpr auto DEFAULT_API_ORIGIN
Default API origin.
Definition: config.h:28
constexpr auto DEFAULT_API_BASE_URL
Default base URL.
Definition: config.h:30
Define type to represent the result, inspired by Rust's "Result".
Structure used as result for getContent, has data and ContentStatus and inherits Response.
Definition: api_result_types.h:132
Structure used as result for health, has the server's status and message.
Definition: api_result_types.h:41