You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
749 B
31 lines
749 B
#pragma once |
|
|
|
#include "spotify.h" |
|
#include "cpr/cprtypes.h" |
|
#include "cpr/parameters.h" |
|
#include <nlohmann/json.hpp> |
|
#include <cpr/cpr.h> |
|
#include <istream> |
|
#include <sstream> |
|
#include <string> |
|
#include <spdlog/spdlog.h> |
|
#include <iostream> |
|
#include <cstdio> |
|
#include "Base64.hpp" |
|
#include <optional> |
|
|
|
using json = nlohmann::json; |
|
|
|
class spotify { |
|
|
|
const std::string API_NAME_BASE = "https://api.spotify.com/"; |
|
std::string access_token; |
|
cpr::Header auth_header; |
|
|
|
public: |
|
void verify_logged_in(); |
|
spotify(std::string access_token); |
|
spotify(std::string client_id, std::string client_secret); |
|
std::optional<json> get_track(std::string track_id) ; |
|
std::optional<std::string> track_id_from_link(std::string link); |
|
};
|
|
|