-
Notifications
You must be signed in to change notification settings - Fork 12
/
gecko.h
86 lines (68 loc) · 2.51 KB
/
gecko.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
Main header file : gecko.h
includes all other header files -- should be only file #included
The parameters of methods in function classes follow the following necessity formula:
- REQUIRED <type> -> TRULY REQUIRED : no values supplied by default; must be set by user
- OPTIONAL const char* -> TRULY OPTIONAL : not included in API calls by default; default value NULL
- OPTIONAL <type> -> TRULY OPTIONAL : value set by default; included in API calls
*/
#include "simple.h"
#include "coins.h"
#include "contract.h"
#include "exchanges.h"
#include "finance.h"
#include "indexes.h"
#include "derivatives.h"
#include "status_updates.h"
#include "events.h"
#include "exchange_rates.h"
#include "trending.h"
#include "global.h"
#include "asset_platforms.h"
#include "companies.h"
#include "categories.h"
// namespace containing all CoinGecko API thingies
namespace gecko {
// Purpose: main class used to access all function classes
// Status: functional - ping() untested
class api : private web {
public:
// object for user to access the CoinGecko API 'simple' functions.
simpleFunctions simple;
// ... 'coins' functions ...
coinsFunctions coins;
// ... 'contract' functions ...
contractFunctions contract;
// ... 'exchanges' functions ...
exchangesFunctions exchanges;
// ... 'finance' functions ...
financeFunctions finance;
// ... 'indexes' functions ...
indexesFunctions indexes;
// ... 'derivatives' functions ...
derivativesFunctions derivatives;
// ... 'status_updates' functions ...
status_updatesFunctions status_updates;
// ... 'events' functions ...
eventsFunctions events;
// ... 'exchanges_rates' functions ...
exchange_ratesFunctions exchange_rates;
// ... 'trending' functions ...
trendingFunctions trending;
// ... 'global' functions ...
globalFunctions global;
// ... 'asset_platforms' functions ...
assetPlatformsFunctions asset_platforms;
// ... 'companies' functions ...
companiesFunctions companies;
// ... 'categories' functions ...
categoriesFunctions categories;
// Action: checks status of CoinGecko API
// Returns: true/false (online/offline)
// Refer: https://www.coingecko.com/api/documentations/v3
// Example:
// if (ping()) { ... } else { ... }
// Notes: should be checked before using any API functions
DllExport bool ping(); // just one function for 'ping', might as well put it in api.
};
}