module; #include export module routemon:rwgps; import std; import :http.client; import :log; namespace net = boost::asio; namespace routemon::rwgps { export struct route_summary { std::int64_t id; std::int64_t user_id; std::string url; std::string name; std::string description; }; struct pagination { std::size_t record_count; std::size_t page_count; std::size_t page_size; std::optional next_page_url; }; struct get_routes_meta { pagination pagination; }; struct get_routes_response { std::vector routes; get_routes_meta meta; }; export class client { log::logger l_; http::client hc_; std::string api_key_; std::string auth_token_; auto get_routes_page(std::size_t page) -> get_routes_response; public: explicit client( net::io_context& ioc, log::logger const& l, std::string api_key, std::string auth_token); auto get_all_routes() -> std::vector; }; } // namespace routemon::rwgps