38 namespace discord_core_internal {
40 class DiscordCoreAPI_Dll sound_cloud_request_builder :
public https_client_core {
42 sound_cloud_request_builder(config_manager* configManagerNew);
44 song collectFinalSong(
const song& songNew);
47 static jsonifier::string clientId;
48 static constexpr jsonifier::string_view baseUrl02{
"https://api-v2.soundcloud.com" };
49 static constexpr jsonifier::string_view baseUrl{
"https://soundcloud.com" };
50 static constexpr jsonifier::string_view appVersion{
"1681464840" };
52 jsonifier::vector<song> collectSearchResults(jsonifier::string_view songQuery, uint64_t limit = 20);
54 song constructDownloadInfo(
const song& songNew, uint64_t currentRecursionDepth);
56 jsonifier::vector<song> collectPlaylist(jsonifier::string_view
string);
58 song collectSingleResult(jsonifier::string_view
string);
60 jsonifier::string collectClientId();
62 virtual ~sound_cloud_request_builder() =
default;
65 class DiscordCoreAPI_Dll sound_cloud_api :
public sound_cloud_request_builder {
67 sound_cloud_api(config_manager* configManagerNew,
const snowflake guildId);
69 co_routine<void, false> downloadAndStreamAudio(
const song songNew,
70 std::coroutine_handle<co_routine<void, false>::promise_type> threadHandle = std::coroutine_handle<co_routine<void, false>::promise_type>{},
71 uint64_t currentReconnectTries = 0);
73 void weFailedToDownloadOrDecode(
const song& songNew, std::coroutine_handle<co_routine<void, false>::promise_type> threadHandle, uint64_t recursionDepth);
75 jsonifier::vector<song> searchForSong(jsonifier::string_view searchQuery, uint64_t limit);
80 std::atomic_bool areWeWorkingBool{
false };
84 enum class search_type { single_song_with_id = 0, single_song_without_id = 1, playlist = 2 };
87 jsonifier::string preset{};
88 jsonifier::string url{};
91 struct second_download_url {
92 jsonifier::string url{};
96 std::vector<transcoding> transcodings{};
99 struct raw_sound_cloud_song {
100 jsonifier::string trackAuthorization{};
101 jsonifier::string description{};
102 jsonifier::string artworkUrl{};
103 jsonifier::string viewUrl{};
104 jsonifier::string title{};
109 struct sound_cloud_search_results {
110 jsonifier::vector<raw_sound_cloud_song> collection{};
114 jsonifier::string trackAuthorization{};
115 jsonifier::string description{};
116 jsonifier::string artworkUrl{};
117 jsonifier::string avatarUrl{};
118 jsonifier::string viewUrl{};
119 jsonifier::string title{};
124 struct welcome_element {
125 jsonifier::raw_json_data data{};
126 jsonifier::string hydratable{};
130 std::vector<welcome_element> data{};
The main namespace for the forward-facing interfaces.