diff options
Diffstat (limited to 'oop2eindopdr/PokemonTCGAPIClient.h')
-rw-r--r-- | oop2eindopdr/PokemonTCGAPIClient.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/oop2eindopdr/PokemonTCGAPIClient.h b/oop2eindopdr/PokemonTCGAPIClient.h index cbbcf0d..9910425 100644 --- a/oop2eindopdr/PokemonTCGAPIClient.h +++ b/oop2eindopdr/PokemonTCGAPIClient.h @@ -13,15 +13,26 @@ public: private: const char* API_URL = "https://api.pokemontcg.io/v2"; + /** + * @brief send http(s) GET request to `endpoint` with `params` and return the + * response as parsed JSON + */ virtual nlohmann::json raw_request(const char* endpoint, cpr::Parameters params); + /** @brief get minimal card info for parsing into card (no trading value) */ virtual nlohmann::json raw_get_cards(const char* query); + /** @brief get full card info by card id */ virtual nlohmann::json raw_get_card(const char* id); + /** @brief get list of valid sets */ virtual nlohmann::json raw_get_sets(const char* query); public: + /** @brief get list of cards that contain `query` in name or id field */ virtual std::vector<PokemonCard*> get_cards_by_query(const char* query); + /** @brief get list of cards in set */ virtual std::vector<PokemonCard*> get_set_cards(const char* set_name); + /** @brief get full card info by card id */ virtual PokemonCard* get_full_card(const char* id); + /** @brief get list of valid sets */ virtual std::vector<std::string> get_sets(); }; |