Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#nullable enable

namespace SoundCloud
{
public partial interface IOauthClient
{
/// <summary>
/// Authorize using OAuth authentication.
/// </summary>
/// <param name="apiKey"></param>

public void AuthorizeUsingOAuth(
string apiKey);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#nullable enable

namespace SoundCloud
{
public partial interface IOauthClient
{
/// <summary>
/// Revokes OAuth access for the calling application.<br/>
/// Invalidates access tokens for the client application that issued the current access token.<br/>
/// Returns 400 if disconnect is not supported for the current token.
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::SoundCloud.ApiException"></exception>
global::System.Threading.Tasks.Task RevokesOAuthAccessForTheCallingApplicationAsync(
global::SoundCloud.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Revokes OAuth access for the calling application.<br/>
/// Invalidates access tokens for the client application that issued the current access token.<br/>
/// Returns 400 if disconnect is not supported for the current token.
/// </summary>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::SoundCloud.ApiException"></exception>
global::System.Threading.Tasks.Task<global::SoundCloud.AutoSDKHttpResponse> RevokesOAuthAccessForTheCallingApplicationAsResponseAsync(
global::SoundCloud.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
49 changes: 49 additions & 0 deletions src/libs/SoundCloud/Generated/SoundCloud.IOauthClient.g.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

#nullable enable

namespace SoundCloud
{
/// <summary>
/// Authentication and Authorization Endpoints.<br/>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public partial interface IOauthClient : global::System.IDisposable
{
/// <summary>
/// The HttpClient instance.
/// </summary>
public global::System.Net.Http.HttpClient HttpClient { get; }

/// <summary>
/// The base URL for the API.
/// </summary>
public System.Uri? BaseUri { get; }

/// <summary>
/// The authorizations to use for the requests.
/// </summary>
public global::System.Collections.Generic.List<global::SoundCloud.EndPointAuthorization> Authorizations { get; }

/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }
/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::SoundCloud.AutoSDKClientOptions Options { get; }


/// <summary>
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }


}
}
10 changes: 10 additions & 0 deletions src/libs/SoundCloud/Generated/SoundCloud.ISoundCloudClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public partial interface ISoundCloudClient : global::System.IDisposable
/// </summary>
public MiscellaneousClient Miscellaneous { get; }

/// <summary>
/// Authentication and Authorization Endpoints.
/// </summary>
public OauthClient Oauth { get; }

/// <summary>
/// Playlists Endpoints.
/// </summary>
Expand All @@ -76,6 +81,11 @@ public partial interface ISoundCloudClient : global::System.IDisposable
/// </summary>
public SearchClient Search { get; }

/// <summary>
/// System Playlists Endpoints (e.g. track stations, artist stations).
/// </summary>
public SystemPlaylistsClient SystemPlaylists { get; }

/// <summary>
/// Tracks Endpoints.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

#nullable enable

namespace SoundCloud
{
public partial interface ISystemPlaylistsClient
{
/// <summary>
/// Authorize using OAuth authentication.
/// </summary>
/// <param name="apiKey"></param>

public void AuthorizeUsingOAuth(
string apiKey);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#nullable enable

namespace SoundCloud
{
public partial interface ISystemPlaylistsClient
{
/// <summary>
/// Returns a system playlist.
/// </summary>
/// <param name="id"></param>
/// <param name="access">
/// Default Value: playable,preview
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::SoundCloud.ApiException"></exception>
global::System.Threading.Tasks.Task<global::SoundCloud.SystemPlaylist> ReturnsASystemPlaylistAsync(
string id,
global::System.Collections.Generic.IList<global::SoundCloud.GetSystemPlaylistsAcces>? access = default,
global::SoundCloud.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Returns a system playlist.
/// </summary>
/// <param name="id"></param>
/// <param name="access">
/// Default Value: playable,preview
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::SoundCloud.ApiException"></exception>
global::System.Threading.Tasks.Task<global::SoundCloud.AutoSDKHttpResponse<global::SoundCloud.SystemPlaylist>> ReturnsASystemPlaylistAsResponseAsync(
string id,
global::System.Collections.Generic.IList<global::SoundCloud.GetSystemPlaylistsAcces>? access = default,
global::SoundCloud.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

#nullable enable

namespace SoundCloud
{
/// <summary>
/// System Playlists Endpoints (e.g. track stations, artist stations).<br/>
/// If no httpClient is provided, a new one will be created.<br/>
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
public partial interface ISystemPlaylistsClient : global::System.IDisposable
{
/// <summary>
/// The HttpClient instance.
/// </summary>
public global::System.Net.Http.HttpClient HttpClient { get; }

/// <summary>
/// The base URL for the API.
/// </summary>
public System.Uri? BaseUri { get; }

/// <summary>
/// The authorizations to use for the requests.
/// </summary>
public global::System.Collections.Generic.List<global::SoundCloud.EndPointAuthorization> Authorizations { get; }

/// <summary>
/// Gets or sets a value indicating whether the response content should be read as a string.
/// True by default in debug builds, false otherwise.
/// When false, successful responses are deserialized directly from the response stream for better performance.
/// Error responses are always read as strings regardless of this setting,
/// ensuring <see cref="ApiException.ResponseBody"/> is populated.
/// </summary>
public bool ReadResponseAsString { get; set; }
/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::SoundCloud.AutoSDKClientOptions Options { get; }


/// <summary>
///
/// </summary>
global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace SoundCloud.JsonConverters
{
/// <inheritdoc />
public sealed class GetSystemPlaylistsAccesJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::SoundCloud.GetSystemPlaylistsAcces>
{
/// <inheritdoc />
public override global::SoundCloud.GetSystemPlaylistsAcces Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::SoundCloud.GetSystemPlaylistsAccesExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::SoundCloud.GetSystemPlaylistsAcces)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::SoundCloud.GetSystemPlaylistsAcces);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::SoundCloud.GetSystemPlaylistsAcces value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::SoundCloud.GetSystemPlaylistsAccesExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace SoundCloud.JsonConverters
{
/// <inheritdoc />
public sealed class GetSystemPlaylistsAccesNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::SoundCloud.GetSystemPlaylistsAcces?>
{
/// <inheritdoc />
public override global::SoundCloud.GetSystemPlaylistsAcces? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::SoundCloud.GetSystemPlaylistsAccesExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::SoundCloud.GetSystemPlaylistsAcces)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::SoundCloud.GetSystemPlaylistsAcces?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::SoundCloud.GetSystemPlaylistsAcces? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::SoundCloud.GetSystemPlaylistsAccesExtensions.ToValueString(value.Value));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ namespace SoundCloud

typeof(global::SoundCloud.JsonConverters.GetTracksRelatedAccesNullableJsonConverter),

typeof(global::SoundCloud.JsonConverters.GetSystemPlaylistsAccesJsonConverter),

typeof(global::SoundCloud.JsonConverters.GetSystemPlaylistsAccesNullableJsonConverter),

typeof(global::SoundCloud.JsonConverters.GetUsersPlaylistsAccesJsonConverter),

typeof(global::SoundCloud.JsonConverters.GetUsersPlaylistsAccesNullableJsonConverter),
Expand Down Expand Up @@ -276,6 +280,7 @@ namespace SoundCloud
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::SoundCloud.Track>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.Playlist), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.AllOf<object, global::SoundCloud.User>), TypeInfoPropertyName = "AllOfObjectUser2", GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.SystemPlaylist), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.Playlists), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::SoundCloud.Playlist>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.Activities), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
Expand Down Expand Up @@ -326,6 +331,8 @@ namespace SoundCloud
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.GetPlaylistsTracksAcces), TypeInfoPropertyName = "GetPlaylistsTracksAcces2", GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::SoundCloud.GetTracksRelatedAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.GetTracksRelatedAcces), TypeInfoPropertyName = "GetTracksRelatedAcces2", GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::SoundCloud.GetSystemPlaylistsAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.GetSystemPlaylistsAcces), TypeInfoPropertyName = "GetSystemPlaylistsAcces2", GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::SoundCloud.GetUsersPlaylistsAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::SoundCloud.GetUsersPlaylistsAcces), TypeInfoPropertyName = "GetUsersPlaylistsAcces2", GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::SoundCloud.GetUsersTracksAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
Expand Down Expand Up @@ -360,6 +367,7 @@ namespace SoundCloud
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetPlaylistsAcces2>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetPlaylistsTracksAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetTracksRelatedAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetSystemPlaylistsAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetUsersPlaylistsAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetUsersTracksAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List<global::SoundCloud.GetUsersLikesTracksAcces>), GenerationMode = global::System.Text.Json.Serialization.JsonSourceGenerationMode.Metadata)]
Expand Down
Loading