nicehash-api-cpp  0.0.1
nicehash-api.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #include "client.hpp"
6 
7 
8 class NiceHashApi {
9 private:
10  Client* client;
11  void throwExceptionIfAlgorithmInvalid (int algorithm_id);
12  void throwExceptionIfLocationInvalid (int location_id);
13 public:
14  // Global
15  std::string getCurrentGlobalStats ();
16  std::string getAverageGlobalStats ();
17 
18  // Provider
19  std::string getProviderStats (std::string address);
20  std::string getDetailedProviderStats (std::string address);
21  std::string getProviderWorkerStats (std::string address, int algorithm_id);
22  std::string getProviderWorkerStats (std::string address, std::string algorithm_name);
23 
24  // Orders
25  std::string getOrdersByAlgorithm (int algorithm_id, int location_id);
26  std::string getOrdersByAlgorithm (std::string algorithm_name, int location_id);
27  std::string getMultiAlgorithmInfo ();
28  std::string getSimpleMultiAlgorithmInfo ();
29 
30  // Helpers
31  int algorithmNameToId (std::string algorithm_name);
32  std::string algorithmIdToName (int algorithm_id);
33  std::string getApiVersion ();
34 
35  // Constructors
37  this->client = new Client;
38  };
39  NiceHashApi (Client* new_client) {
40  this->client = new_client;
41  };
42 };
std::string getCurrentGlobalStats()
Get current global stats.
std::string getSimpleMultiAlgorithmInfo()
std::string getAverageGlobalStats()
Get average (24h) global stats.
std::string getProviderWorkerStats(std::string address, int algorithm_id)
Get detailed stats for a provider&#39;s workers by algorithm id.
std::string getApiVersion()
Get API version.
std::string getDetailedProviderStats(std::string address)
Get detailed current stats for provider for all algorithms.
Definition: client.hpp:6
NiceHashApi(Client *new_client)
std::string getOrdersByAlgorithm(int algorithm_id, int location_id)
Get all orders for a given algorithm id.
int algorithmNameToId(std::string algorithm_name)
Convert an algorithm name to its id.
std::string getMultiAlgorithmInfo()
std::string getProviderStats(std::string address)
Get current stats for provider for all algorithms.
std::string algorithmIdToName(int algorithm_id)