Skip to content

Commit

Permalink
EN-326 Replace instances of HttpMethod("PATCH") with its correspondin…
Browse files Browse the repository at this point in the history
…g static version.
  • Loading branch information
František Záhora authored and František Záhora committed Dec 4, 2024
1 parent 4e4565b commit 565da34
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.AssetFolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task<AssetFoldersModel> ModifyAssetFoldersAsync(IEnumerable<AssetFo
ArgumentNullException.ThrowIfNull(changes);

var endpointUrl = _urlBuilder.BuildAssetFoldersUrl();
var response = await _actionInvoker.InvokeMethodAsync<IEnumerable<AssetFolderOperationBaseModel>, AssetFoldersModel>(endpointUrl, new HttpMethod("PATCH"), changes);
var response = await _actionInvoker.InvokeMethodAsync<IEnumerable<AssetFolderOperationBaseModel>, AssetFoldersModel>(endpointUrl, HttpMethod.Patch, changes);

return response;
}
Expand Down
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.Collection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ public async Task<CollectionsModel> ModifyCollectionAsync(IEnumerable<Collection
ArgumentNullException.ThrowIfNull(changes);

var endpointUrl = _urlBuilder.BuildCollectionsUrl();
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CollectionOperationBaseModel>, CollectionsModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CollectionOperationBaseModel>, CollectionsModel>(endpointUrl, HttpMethod.Patch, changes);
}
}
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.ContentType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public async Task<ContentTypeModel> ModifyContentTypeAsync(Reference identifier,
}

var endpointUrl = _urlBuilder.BuildTypeUrl(identifier);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeOperationBaseModel>, ContentTypeModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeOperationBaseModel>, ContentTypeModel>(endpointUrl, HttpMethod.Patch, changes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ public async Task<ContentTypeSnippetModel> ModifyContentTypeSnippetAsync(Referen
}

var endpointUrl = _urlBuilder.BuildSnippetsUrl(identifier);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeSnippetOperationBaseModel>, ContentTypeSnippetModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<ContentTypeSnippetOperationBaseModel>, ContentTypeSnippetModel>(endpointUrl, HttpMethod.Patch, changes);
}
}
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.CustomApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ public async Task<CustomAppModel> ModifyCustomAppAsync(Reference identifier, IEn
ArgumentNullException.ThrowIfNull(changes);

var endpointUrl = _urlBuilder.BuildCustomAppUrl(identifier);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CustomAppOperationBaseModel>, CustomAppModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<CustomAppOperationBaseModel>, CustomAppModel>(endpointUrl, HttpMethod.Patch, changes);
}
}
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ public async Task<EnvironmentModel> ModifyEnvironmentAsync(IEnumerable<Environme
ArgumentNullException.ThrowIfNull(changes);

var endpointUrl = _urlBuilder.BuildEnvironmentUrl();
return await _actionInvoker.InvokeMethodAsync<IEnumerable<EnvironmentOperationBaseModel>, EnvironmentModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<EnvironmentOperationBaseModel>, EnvironmentModel>(endpointUrl, HttpMethod.Patch, changes);
}
}
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.Language.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public async Task<LanguageModel> ModifyLanguageAsync(Reference identifier, IEnum
ArgumentNullException.ThrowIfNull(identifier);

var endpointUrl = _urlBuilder.BuildLanguagesUrl(identifier);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<LanguagePatchModel>, LanguageModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<LanguagePatchModel>, LanguageModel>(endpointUrl, HttpMethod.Patch, changes);
}
}
2 changes: 1 addition & 1 deletion Kontent.Ai.Management/ManagementClient.TaxonomyGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public async Task<TaxonomyGroupModel> ModifyTaxonomyGroupAsync(Reference identif
ArgumentNullException.ThrowIfNull(identifier);

var endpointUrl = _urlBuilder.BuildTaxonomyUrl(identifier);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<TaxonomyGroupOperationBaseModel>, TaxonomyGroupModel>(endpointUrl, new HttpMethod("PATCH"), changes);
return await _actionInvoker.InvokeMethodAsync<IEnumerable<TaxonomyGroupOperationBaseModel>, TaxonomyGroupModel>(endpointUrl, HttpMethod.Patch, changes);
}

/// <inheritdoc />
Expand Down

0 comments on commit 565da34

Please sign in to comment.