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 song collectSingleResult(jsonifier::string_view
string);
58 jsonifier::string collectClientId();
60 virtual ~sound_cloud_request_builder() =
default;
63 class DiscordCoreAPI_Dll sound_cloud_api :
public sound_cloud_request_builder {
65 sound_cloud_api(config_manager* configManagerNew,
const snowflake guildId);
67 co_routine<void, false> downloadAndStreamAudio(
const song songNew,
68 std::coroutine_handle<co_routine<void, false>::promise_type> threadHandle = std::coroutine_handle<co_routine<void, false>::promise_type>{},
69 uint64_t currentReconnectTries = 0);
71 void weFailedToDownloadOrDecode(
const song& songNew, std::coroutine_handle<co_routine<void, false>::promise_type> threadHandle, uint64_t recursionDepth);
73 jsonifier::vector<song> searchForSong(jsonifier::string_view searchQuery, uint64_t limit);
78 std::atomic_bool areWeWorkingBool{
false };
83 jsonifier::string preset{};
84 jsonifier::string url{};
88 jsonifier::vector<transcoding> transcodings{};
91 struct second_download_url {
92 jsonifier::string url{};
95 struct raw_sound_cloud_song {
96 jsonifier::string trackAuthorization{};
97 jsonifier::string description{};
98 jsonifier::string artworkUrl{};
99 jsonifier::string viewUrl{};
100 jsonifier::string title{};
105 struct sound_cloud_search_results {
106 jsonifier::vector<raw_sound_cloud_song> collection{};
110 jsonifier::string visualUrl{};
112 jsonifier::string urn{};
116 discord_core_api::discord_core_internal::media media{};
117 jsonifier::string trackAuthorization{};
118 jsonifier::string description{};
119 jsonifier::string artworkUrl{};
120 jsonifier::string avatarUrl{};
121 jsonifier::string viewUrl{};
122 jsonifier::string title{};
124 jsonifier::string url{};
128 struct welcome_element {
129 jsonifier::string hydratable{};
134 jsonifier::vector<welcome_element> data{};
The main namespace for the forward-facing interfaces.