diff options
Diffstat (limited to 'oop2eindopdr/PokemonTCGAPIClient.cpp')
-rw-r--r-- | oop2eindopdr/PokemonTCGAPIClient.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/oop2eindopdr/PokemonTCGAPIClient.cpp b/oop2eindopdr/PokemonTCGAPIClient.cpp index 3285f6a..087296d 100644 --- a/oop2eindopdr/PokemonTCGAPIClient.cpp +++ b/oop2eindopdr/PokemonTCGAPIClient.cpp @@ -3,17 +3,11 @@ #include <iostream> #include <cpr/cpr.h> -PokemonTCGAPIClient::PokemonTCGAPIClient() { - -} - -PokemonTCGAPIClient::~PokemonTCGAPIClient() { - -} +PokemonTCGAPIClient::PokemonTCGAPIClient() { } +PokemonTCGAPIClient::~PokemonTCGAPIClient() { } nlohmann::json PokemonTCGAPIClient::raw_request(const char* endpoint, cpr::Parameters params) { - std::string full_url = API_URL; - full_url.append(endpoint); + std::string full_url = API_URL + std::string(endpoint); cpr::Response res = cpr::Get(cpr::Url{full_url}, params); return nlohmann::json::parse(res.text); } |