-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedsmv1_sysinfo.h
66 lines (54 loc) · 1.11 KB
/
edsmv1_sysinfo.h
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef EDSMV1_SYSINFO_H
#define EDSMV1_SYSINFO_H
#include "utils/restclient.h"
class EDSMV1SysInfo
{
RestClient::parameters p;
public:
EDSMV1SysInfo() = delete;
EDSMV1SysInfo(const std::string& name)
{
p["systemName"] = name;
p["showCoordinates"] = "1";
p["showPermit"] = "1";
p["showInformation"] = "1";
p["showPrimaryStar"] = "1";
}
constexpr bool isGet() const
{
return true;
}
const auto& params() const
{
return p;
}
const std::string& api() const
{
const static std::string v{"system"};
return v;
}
};
class EDSMV1SysBodies
{
RestClient::parameters p;
public:
EDSMV1SysBodies() = delete;
EDSMV1SysBodies(const std::string& name)
{
p["systemName"] = name;
}
constexpr bool isGet() const
{
return true;
}
const auto& params() const
{
return p;
}
const std::string& api() const
{
const static std::string v{"https://www.edsm.net/api-system-v1/bodies"};
return v;
}
};
#endif // EDSMV1_SYSINFO_H