2020-09-20 01:21:28 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define ON 1
|
|
|
|
#define OFF 0
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
#include <math.h>
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <regex>
|
|
|
|
#include <switch.h>
|
|
|
|
|
|
|
|
#include "progress_event.hpp"
|
2021-02-06 17:24:47 +00:00
|
|
|
#include "json.hpp"
|
2020-09-20 01:21:28 +01:00
|
|
|
|
|
|
|
void downloadFile(const char *url, const char *output, int api);
|
2021-02-08 20:30:58 +00:00
|
|
|
std::vector<std::pair<std::string, std::string>> getLinks(const char *url);
|
2020-09-20 01:21:28 +01:00
|
|
|
std::string fetchTitle(const char *url);
|
2021-02-06 17:24:47 +00:00
|
|
|
std::string downloadPage(const char* url, std::vector<std::string> headers = {}, std::string body = "");
|
|
|
|
nlohmann::json getRequest(std::string url, std::vector<std::string> headers = {}, std::string body = "");
|