kopia lustrzana https://gitlab.com/tomaszg/geostat
27 wiersze
745 B
C++
27 wiersze
745 B
C++
#pragma once
|
|
|
|
#include "api.h"
|
|
|
|
#include <string>
|
|
|
|
class Okapi : Api {
|
|
private:
|
|
std::string url;
|
|
std::string key;
|
|
|
|
static size_t write_cb(char* ptr, size_t size, size_t nmemb, void* userdata);
|
|
std::string curl_post(std::string url, std::string post);
|
|
std::string get_user_caches_json(std::string uuid, int count = 0, int offset = 0);
|
|
// std::string get_cache_json(std::string code);
|
|
std::string get_caches_json(std::string codes);
|
|
|
|
public:
|
|
Okapi(std::string server_url, std::string consumer_key) : url(server_url), key(consumer_key) {}
|
|
|
|
// Cache get_cache(std::string code);
|
|
Caches get_caches(std::vector<std::string> codes);
|
|
Caches get_user_caches(std::string uuid, int count = 0);
|
|
|
|
std::string get_uuid(std::string username);
|
|
};
|