aboutsummaryrefslogtreecommitdiff
path: root/oop2eindopdr/main.cpp
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-12-23 15:33:44 +0100
committerlonkaars <loek@pipeframe.xyz>2022-12-23 15:33:44 +0100
commitc98f9337940128178401bb6b2d242ce577080ca4 (patch)
tree6dcf8da983709cf3c4d33e793eed3f8bb68501d7 /oop2eindopdr/main.cpp
parent295ee857b9b46c27e80051700278e3075590d823 (diff)
half-implemented TCG API client class
Diffstat (limited to 'oop2eindopdr/main.cpp')
-rw-r--r--oop2eindopdr/main.cpp39
1 files changed, 23 insertions, 16 deletions
diff --git a/oop2eindopdr/main.cpp b/oop2eindopdr/main.cpp
index c042ffe..62afcac 100644
--- a/oop2eindopdr/main.cpp
+++ b/oop2eindopdr/main.cpp
@@ -3,7 +3,7 @@
#include "main.h"
#include "Pokedex.h"
-#include "PokemonCard.h"
+#include "PokemonTCGAPIClient.h"
using std::endl;
using std::cout;
@@ -11,30 +11,37 @@ using std::cout;
Pokedex* g_pokedex = nullptr;
int interactive_mode() {
- std::string gert;
- bool user_exit = false;
- while (!user_exit) {
- cout << "interactive mode" << endl;
- std::cin >> gert;
- }
+ std::string gert;
+ bool user_exit = false;
+ while (!user_exit) {
+ cout << "interactive mode" << endl;
+ std::cin >> gert;
+ }
return EXIT_SUCCESS;
}
int export_mode(int argc, char** argv) {
- cout << "export mode! let's convert " << std::string(argv[1]) << " to " << std::string(argv[2]) << endl;
+ cout << "export mode! let's convert " << std::string(argv[1]) << " to " << std::string(argv[2]) << endl;
return EXIT_SUCCESS;
}
int main(int argc, char** argv) {
- if (argc == 1) { // no arguments specified
- return interactive_mode();
- } else if (argc == 2 || argc == 3) {
- return export_mode(argc, argv);
- } else { // three or more arguments
- cout << "too many arguments specified!" << endl;
- return EXIT_FAILURE;
- }
+ PokemonTCGAPIClient api_client_test;
+ std::vector<std::string> sets = api_client_test.get_sets();
+ for (auto s : sets)
+ cout << s << endl;
+
+ return EXIT_SUCCESS;
+
+ if (argc == 1) { // no arguments specified
+ return interactive_mode();
+ } else if (argc == 2 || argc == 3) {
+ return export_mode(argc, argv);
+ } else { // three or more arguments
+ cout << "too many arguments specified!" << endl;
+ return EXIT_FAILURE;
+ }
return EXIT_SUCCESS;
}