diff options
| author | Aotrix <[email protected]> | 2025-03-25 04:33:46 +0100 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-03-25 04:33:46 +0100 |
| commit | 6ba1abb1458c4b4ffad3723f15ad52a504b8c264 (patch) | |
| tree | 56917c27cb0f08c5f96000306e7294e0597befb1 /src/main.cpp | |
| parent | e578e5b065f3eb7872a128723035dede6879cc07 (diff) | |
key input is more flexible
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 54079a7..780883f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,7 +6,10 @@ int main() { HearthstoneAPIHandler hs_handler; // TODO: use a parser on get_cards returned value - std::cout << hs_handler.get_cards("678?locale=fr_FR") << std::endl; + // 642; 678 + const unsigned int card_id = 678; + std::cout << hs_handler.get_cards(std::format("{}?locale=fr_FR", card_id)) + << std::endl; pqxx::connection cx{ "postgresql://aotrix@localhost:5432/hearthstonegameinfo"}; @@ -15,6 +18,7 @@ int main() { // TODO: for test purposes // use get_cards output instead? - add_cards_to_database(hs_handler.get_cards("678?locale=fr_FR"), tx); + add_cards_to_database( + hs_handler.get_cards(std::format("{}?locale=fr_FR", card_id)), tx); return 0; } |
