-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
262527e
commit 79b4a19
Showing
4 changed files
with
62 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef CLIENT_H | ||
#define CLIENT_H | ||
|
||
#include "HttpClient.h" | ||
#include <iostream> | ||
#include <string> | ||
|
||
using json = nlohmann::json; | ||
|
||
enum class TextColor { | ||
BLACK, | ||
RED, | ||
GREEN, | ||
YELLOW, | ||
BLUE, | ||
MAGENTA, | ||
CYAN, | ||
WHITE, | ||
GRAY, | ||
LIGHT_RED, | ||
LIGHT_GREEN, | ||
LIGHT_YELLOW, | ||
LIGHT_BLUE, | ||
LIGHT_MAGENTA, | ||
LIGHT_CYAN, | ||
LIGHT_GRAY, | ||
DARK_RED, | ||
DARK_GREEN, | ||
DARK_YELLOW, | ||
DARK_BLUE, | ||
DARK_MAGENTA, | ||
DARK_CYAN, | ||
DARK_GRAY, | ||
RESET | ||
}; | ||
|
||
void printMenu(); | ||
void addUser(hv::HttpClient& httpClient); | ||
void printUser(const std::string& jsonStr); | ||
void printUser(json jsonData); | ||
void printWeather(json jsonData); | ||
void setTextColor(TextColor color); | ||
void getAllUsersInfo(hv::HttpClient& httpClient); | ||
void getUserById(hv::HttpClient& httpClient); | ||
void deleteUserById(hv::HttpClient& httpClient); | ||
void editUserById(hv::HttpClient& httpClient); | ||
void getWeather(hv::HttpClient& httpClient); | ||
std::string getBasicAuthHeader(); | ||
std::string base64_encode(const std::string &input); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters