18 return "https://api.audio.com";
23 static const std::string loginPage =
24 std::string(
"https://audio.com/audacity/link?clientId=") +
32 return "1741964426607541";
38 return "https://audio.com/auth/sign-in/success";
47 std::string_view audioID, std::string_view token)
const
49 return "http://audio.com/audacity/upload?audioId=" + std::string(audioID) +
50 "&token=" + std::string(token) +
56 return std::chrono::seconds(3);
61 return {
"audio/x-wavpack",
"audio/x-flac",
"audio/x-wav" };
73 if (language.Contains(L
"-") && language.Length() > 2)
74 return wxString::Format(
"%s;q=1.0, %s;q=0.7, *;q=0.5", language, language.Left(2)).ToStdString();
76 return wxString::Format(
"%s;q=1.0, *;q=0.5", language).ToStdString();
Configuration for the audio.com.
MimeTypesList GetPreferredAudioFormats() const
Preferred audio format.
std::string GetAcceptLanguageValue() const
Returns the preferred language.
std::string_view GetOAuthRedirectURL() const
OAuth2 redirect URL. Only used to satisfy the protocol.
std::string GetAPIUrl(std::string_view apiURI) const
Helper to construct the full URLs for the API.
std::chrono::milliseconds GetProgressCallbackTimeout() const
Timeout between progress callbacks.
MimeType GetDownloadMime() const
Return the mime type server should store the file. This is a requirement from audiocom.
std::string_view GetOAuthLoginPage() const
Page to open in browser to initiate OAuth.
std::string GetFinishUploadPage(std::string_view audioID, std::string_view token) const
Helper to construct the page URL for the anonymous upload last stage.
std::string_view GetOAuthClientID() const
OAuth2 client ID.
std::string_view GetAPIEndpoint() const
API endpoint.
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.
std::vector< std::string > MimeTypesList
Ordered list of mime types.