-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproviders.hpp
34 lines (27 loc) · 995 Bytes
/
providers.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <string>
using namespace std;
// CONSTANTS
// From https://www.cplusplus.com/reference/ctime/strftime/
const string TIME1 = "%T"; // "12:34:56"
const string TIME2 = "%R"; // "12:34"
const string DATE1 = "%a %d %b %Y"; // "Fri 25 Dec 2020"
const string DATE2 = "%d/%m/%Y"; // "25/12/2020"
const string TIMEDATE1 = "%a %d %b %R"; // "Thu 24 Jun 17:30"
const string TIMEDATE2 = TIME2 + " " + DATE2; // "17:30 24/06/2021"
const string ETH0 = "eth0";
const string WLAN0 = "wlan0";
const string EXCHANGE_URL = "https://api.cryptonator.com/api/ticker/";
const string USD = "btc-usd";
const string EUR = "btc-eur";
class Provider
{
public:
Provider();
~Provider();
static string getIp();
static string getTimeInfo(string format);
static string getBtcExchangeRate(string currency);
static string getTemperature(string city);
static string getQuoteOfTheDay();
static string getStocks();
};