diff --git a/src/libs/SoundCloud/Generated/SoundCloud.ITracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs b/src/libs/SoundCloud/Generated/SoundCloud.ITracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs index a1eb5c2..f659b86 100644 --- a/src/libs/SoundCloud/Generated/SoundCloud.ITracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs +++ b/src/libs/SoundCloud/Generated/SoundCloud.ITracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs @@ -8,22 +8,41 @@ public partial interface ITracksClient /// Returns the newly created comment on success /// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task ReturnsTheNewlyCreatedCommentOnSuccessAsync( string trackUrn, + + global::SoundCloud.CreateTracksCommentsRequest request, global::SoundCloud.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); /// /// Returns the newly created comment on success /// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task> ReturnsTheNewlyCreatedCommentOnSuccessAsResponseAsync( string trackUrn, + + global::SoundCloud.CreateTracksCommentsRequest request, + global::SoundCloud.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Returns the newly created comment on success + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task ReturnsTheNewlyCreatedCommentOnSuccessAsync( + string trackUrn, + global::SoundCloud.CreateTracksCommentsRequestComment? comment = default, global::SoundCloud.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/SoundCloud/Generated/SoundCloud.TracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs b/src/libs/SoundCloud/Generated/SoundCloud.TracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs index 685a508..ea2f462 100644 --- a/src/libs/SoundCloud/Generated/SoundCloud.TracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs +++ b/src/libs/SoundCloud/Generated/SoundCloud.TracksClient.ReturnsTheNewlyCreatedCommentOnSuccess.g.cs @@ -27,11 +27,13 @@ public partial class TracksClient }; partial void PrepareReturnsTheNewlyCreatedCommentOnSuccessArguments( global::System.Net.Http.HttpClient httpClient, - ref string trackUrn); + ref string trackUrn, + global::SoundCloud.CreateTracksCommentsRequest request); partial void PrepareReturnsTheNewlyCreatedCommentOnSuccessRequest( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string trackUrn); + string trackUrn, + global::SoundCloud.CreateTracksCommentsRequest request); partial void ProcessReturnsTheNewlyCreatedCommentOnSuccessResponse( global::System.Net.Http.HttpClient httpClient, global::System.Net.Http.HttpResponseMessage httpResponseMessage); @@ -45,16 +47,21 @@ partial void ProcessReturnsTheNewlyCreatedCommentOnSuccessResponseContent( /// Returns the newly created comment on success /// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task ReturnsTheNewlyCreatedCommentOnSuccessAsync( string trackUrn, + + global::SoundCloud.CreateTracksCommentsRequest request, global::SoundCloud.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __response = await ReturnsTheNewlyCreatedCommentOnSuccessAsResponseAsync( trackUrn: trackUrn, + + request: request, requestOptions: requestOptions, cancellationToken: cancellationToken ).ConfigureAwait(false); @@ -65,19 +72,25 @@ partial void ProcessReturnsTheNewlyCreatedCommentOnSuccessResponseContent( /// Returns the newly created comment on success /// /// + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task> ReturnsTheNewlyCreatedCommentOnSuccessAsResponseAsync( string trackUrn, + + global::SoundCloud.CreateTracksCommentsRequest request, global::SoundCloud.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + PrepareArguments( client: HttpClient); PrepareReturnsTheNewlyCreatedCommentOnSuccessArguments( httpClient: HttpClient, - trackUrn: ref trackUrn); + trackUrn: ref trackUrn, + request: request); var __authorizations = global::SoundCloud.EndPointSecurityResolver.ResolveAuthorizations( @@ -134,6 +147,12 @@ partial void ProcessReturnsTheNewlyCreatedCommentOnSuccessResponseContent( __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); } } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json; charset=utf-8"); + __httpRequest.Content = __httpRequestContent; global::SoundCloud.AutoSDKRequestOptionsSupport.ApplyHeaders( request: __httpRequest, clientHeaders: Options.Headers, @@ -145,7 +164,8 @@ partial void ProcessReturnsTheNewlyCreatedCommentOnSuccessResponseContent( PrepareReturnsTheNewlyCreatedCommentOnSuccessRequest( httpClient: HttpClient, httpRequestMessage: __httpRequest, - trackUrn: trackUrn!); + trackUrn: trackUrn!, + request: request); return __httpRequest; } @@ -494,5 +514,30 @@ partial void ProcessReturnsTheNewlyCreatedCommentOnSuccessResponseContent( __httpRequest?.Dispose(); } } + /// + /// Returns the newly created comment on success + /// + /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task ReturnsTheNewlyCreatedCommentOnSuccessAsync( + string trackUrn, + global::SoundCloud.CreateTracksCommentsRequestComment? comment = default, + global::SoundCloud.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::SoundCloud.CreateTracksCommentsRequest + { + Comment = comment, + }; + + return await ReturnsTheNewlyCreatedCommentOnSuccessAsync( + trackUrn: trackUrn, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } } } \ No newline at end of file diff --git a/src/libs/SoundCloud/Generated/autosdk.generated-examples.json b/src/libs/SoundCloud/Generated/autosdk.generated-examples.json index d1fe7a3..d4f444d 100644 --- a/src/libs/SoundCloud/Generated/autosdk.generated-examples.json +++ b/src/libs/SoundCloud/Generated/autosdk.generated-examples.json @@ -225,11 +225,11 @@ "Title": "Creates a playlist.", "Slug": "creates-a-playlist", "Description": "Generated from OpenAPI examples.", - "Language": "csharp", - "Code": "using var client = new SoundCloudClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::SoundCloud.AllOf\u003Cglobal::SoundCloud.CreateUpdatePlaylistFormRequest, object\u003E\u003E(\n @\u0022{\n \u0022\u0022playlist\u0022\u0022: {\n \u0022\u0022title\u0022\u0022: \u0022\u0022Test Auto-created Playlist\u0022\u0022,\n \u0022\u0022description\u0022\u0022: \u0022\u0022Playlist for test purposes\u0022\u0022,\n \u0022\u0022sharing\u0022\u0022: \u0022\u0022private\u0022\u0022,\n \u0022\u0022tracks\u0022\u0022: [\n {\n \u0022\u0022urn\u0022\u0022: \u0022\u0022soundcloud:tracks:219787221\u0022\u0022\n },\n {\n \u0022\u0022urn\u0022\u0022: \u0022\u0022soundcloud:tracks:783019264\u0022\u0022\n },\n {\n \u0022\u0022urn\u0022\u0022: \u0022\u0022soundcloud:tracks:870073492\u0022\u0022\n }\n ]\n }\n}\u0022)!;\n\nvar response = await client.Playlists.CreatesAPlaylistAsync(\n request: request\n);\n\n// Example response:\n// {\n// \u0022artwork_url\u0022: \u0022\u0022,\n// \u0022created_at\u0022: \u00222020/07/16 16:09:54 \\u002B0000\u0022,\n// \u0022description\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022downloadable\u0022: true,\n// \u0022duration\u0022: 11000,\n// \u0022ean\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022embeddable_by\u0022: \u0022all\u0022,\n// \u0022genre\u0022: \u0022\u0022,\n// \u0022urn\u0022: \u0022soundcloud:playlists:12345\u0022,\n// \u0022kind\u0022: \u0022playlist\u0022,\n// \u0022label\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022label_id\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022label_name\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022last_modified\u0022: \u00222020/09/08 09:13:00 \\u002B0000\u0022,\n// \u0022license\u0022: \u0022all-rights-reserved\u0022,\n// \u0022likes_count\u0022: 0,\n// \u0022permalink\u0022: \u0022permalink\u0022,\n// \u0022permalink_url\u0022: \u0022https://soundcloud.com/userPermalink/sets/permalink\u0022,\n// \u0022playlist_type\u0022: \u0022\u0022,\n// \u0022purchase_title\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022purchase_url\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022release\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022release_day\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022release_month\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022release_year\u0022: \u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\n// \u0022sharing\u0022: \u0022public\u0022,\n// \u0022streamable\u0022: true,\n// \u0022tag_list\u0022: \u0022\u0022,\n// \u0022tags\u0022: \u0022\u0022,\n// \u0022title\u0022: \u0022permalink\u0022,\n// \u0022track_count\u0022: 2,\n// \u0022tracks\u0022: {\n// \u0022allOf\u0022: [\n// {\n// \u0022$ref\u0022: \u0022#/components/examples/Track/value\u0022\n// }\n// ]\n// },\n// \u0022tracks_uri\u0022: \u0022https://api.soundcloud.com/playlists/soundcloud:playlists:12345/tracks\u0022,\n// \u0022type\u0022: \u0022\u0022,\n// \u0022uri\u0022: \u0022https://api.soundcloud.com/playlists/soundcloud:playlists:12345\u0022,\n// \u0022user\u0022: {\n// \u0022$ref\u0022: \u0022#/components/examples/User/value\u0022\n// },\n// \u0022user_id\u0022: 1234\n// }", - "Format": "sdk", + "Language": "http", + "Code": "### Creates a playlist.\nPOST {{host}}/playlists\nAuthorization: OAuth {api_key}\nContent-Type: multipart/form-data; boundary=AutoSDKBoundary\nAccept: application/json, application/json; charset=utf-8\n\n## Responses\n# 201\n# Description: Success\n# Content-Type: application/json; charset=utf-8\n# 401\n# Description: Unauthorized\n# Content-Type: application/json; charset=utf-8\n# 404\n# Description: Not Found\n# Content-Type: application/json", + "Format": "http", "OperationId": "CreatesAPlaylist", - "Setup": "This example assumes \u0060using SoundCloud;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + "Setup": null }, { "Order": 22, @@ -445,11 +445,11 @@ "Title": "Returns the newly created comment on success", "Slug": "returns-the-newly-created-comment-on-success", "Description": "Generated from OpenAPI examples.", - "Language": "csharp", - "Code": "using var client = new SoundCloudClient(apiKey);\n\nvar response = await client.Tracks.ReturnsTheNewlyCreatedCommentOnSuccessAsync(\n trackUrn: \u0022soundcloud:tracks:308946187\u0022\n);\n\n// Example response:\n// {\n// \u0022body\u0022: \u0022comment body\u0022,\n// \u0022created_at\u0022: \u00222007/09/11 15:40:24 \\u002B0000\u0022,\n// \u0022urn\u0022: \u0022soundcloud:comments:1234\u0022,\n// \u0022kind\u0022: \u0022comment\u0022,\n// \u0022timestamp\u0022: 4960,\n// \u0022track_urn\u0022: \u0022soundcloud:tracks:123456\u0022,\n// \u0022uri\u0022: \u0022https://api.soundcloud.com/comments/1234\u0022,\n// \u0022user\u0022: {\n// \u0022urn\u0022: \u0022souncloud:users:12345\u0022,\n// \u0022kind\u0022: \u0022user\u0022,\n// \u0022permalink\u0022: \u0022permalink\u0022,\n// \u0022username\u0022: \u0022user name\u0022,\n// \u0022last_modified\u0022: \u00222017/04/10 14:48:03 \\u002B0000\u0022,\n// \u0022uri\u0022: \u0022https://api.soundcloud.com/users/12345\u0022,\n// \u0022permalink_url\u0022: \u0022https://soundcloud.com/permalink\u0022,\n// \u0022avatar_url\u0022: \u0022https://i1.sndcdn.com/avatars-large.jpg\u0022,\n// \u0022followers_count\u0022: 138,\n// \u0022followings_count\u0022: 172,\n// \u0022public_favorites_count\u0022: 5,\n// \u0022reposts_count\u0022: 0\n// },\n// \u0022user_urn\u0022: \u0022soundcloud:users:12345\u0022\n// }", - "Format": "sdk", + "Language": "http", + "Code": "### Returns the newly created comment on success\nPOST {{host}}/tracks/{{track_urn}}/comments\nAuthorization: OAuth {api_key}\nContent-Type: application/json; charset=utf-8\nAccept: application/json, application/json; charset=utf-8\n\n{\n \u0022comment\u0022: {\n \u0022body\u0022: \u0022test comment\u0022,\n \u0022timestamp\u0022: \u0022string\u0022\n }\n}\n\n## Responses\n# 201\n# Description: Success\n# Content-Type: application/json; charset=utf-8\n# 422\n# Description: Unprocessable Entity\n# Content-Type: application/json\n# 429\n# Description: Too Many Requests\n# Content-Type: application/json", + "Format": "http", "OperationId": "ReturnsTheNewlyCreatedCommentOnSuccess", - "Setup": "This example assumes \u0060using SoundCloud;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + "Setup": null }, { "Order": 42, @@ -479,7 +479,7 @@ "Slug": "uploads-a-new-track", "Description": "Generated from OpenAPI examples.", "Language": "http", - "Code": "### Uploads a new track.\nPOST {{host}}/tracks\nAuthorization: OAuth {api_key}\nContent-Type: multipart/form-data\nAccept: application/json, application/json; charset=utf-8\n\n{\u0022track[title]\u0022:\u0022Test drum sample\u0022,\u0022track[artist]\u0022:\u0022Metro Boomin, The Weeknd, 21 Savage\u0022,\u0022track[asset_data]\u0022:\u0022\\u003Cbinary string\\u003E\u0022,\u0022track[permalink]\u0022:\u0022test-drum-sample\u0022,\u0022track[sharing]\u0022:\u0022private\u0022,\u0022track[embeddable_by]\u0022:\u0022me\u0022,\u0022track[purchase_url]\u0022:\u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\u0022track[description]\u0022:\u0022Public-api test sample upload\u0022,\u0022track[genre]\u0022:\u0022Pop\u0022,\u0022track[tag_list]\u0022:\u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\u0022track[label_name]\u0022:\u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\u0022track[release]\u0022:\u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\u0022track[release_date]\u0022:\u00222021-02-18T00:00:00.000Z\u0022,\u0022track[streamable]\u0022:true,\u0022track[downloadable]\u0022:false,\u0022track[license]\u0022:\u0022no-rights-reserved\u0022,\u0022track[commentable]\u0022:true,\u0022track[isrc]\u0022:\u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022,\u0022track[artwork_data]\u0022:\u0022openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464\u0022}\n\n## Responses\n# 201\n# Description: Success\n# Content-Type: application/json; charset=utf-8\n# 400\n# Description: Bad Request\n# Content-Type: application/json; charset=utf-8\n# 401\n# Description: Unauthorized\n# Content-Type: application/json; charset=utf-8\n# 422\n# Description: Unprocessable Entity\n# Content-Type: application/json", + "Code": "### Uploads a new track.\nPOST {{host}}/tracks\nAuthorization: OAuth {api_key}\nContent-Type: multipart/form-data; boundary=AutoSDKBoundary\nAccept: application/json, application/json; charset=utf-8\n\n## Responses\n# 201\n# Description: Success\n# Content-Type: application/json; charset=utf-8\n# 400\n# Description: Bad Request\n# Content-Type: application/json; charset=utf-8\n# 401\n# Description: Unauthorized\n# Content-Type: application/json; charset=utf-8\n# 422\n# Description: Unprocessable Entity\n# Content-Type: application/json", "Format": "http", "OperationId": "UploadsANewTrack", "Setup": null