#pragma once #include #include #include namespace bnet { class ApiUrl { public: ApiUrl(const std::string& iContentType, const std::string& iRegion); void setRegion(const std::string& iRegion); void setLocale(const std::string& iLocale); void setGameMode(const std::string& iGameMode); void setPage(uint64_t iPage); void setPageSize(uint64_t iPageSize); bool hasRegion() const; bool hasLocale() const; bool hasGameMode() const; bool hasPage() const; bool hasPageSize() const; std::string text() const; private: std::string_view kLOCALE_KEY{"locale"}; std::string_view kGAME_MODE_KEY{"gameMode"}; std::string_view kPAGE_KEY{"page"}; std::string_view kPAGE_SIZE_KEY{"pageSize"}; std::string mContentType; std::string mRegion; std::unordered_map aParameters; void setValue(std::string_view iKey, const std::string& iValue); bool hasValue(std::string_view iKey) const; }; }; // namespace bnet