Skip to content

Commit

Permalink
chore: deprecate ProductImageService and its related factories/interf…
Browse files Browse the repository at this point in the history
…aces
  • Loading branch information
nozzlegear committed Jan 15, 2025
1 parent 4f96b16 commit 9ca3445
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ShopifySharp/Factories/ProductImageServiceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

namespace ShopifySharp.Factories;

[Obsolete("Shopify has deprecated the REST API for product images. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product images via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public interface IProductImageServiceFactory : IServiceFactory<IProductImageService>;

[Obsolete("Shopify has deprecated the REST API for product images. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product images via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public class ProductImageServiceFactory : IProductImageServiceFactory
{
private readonly IShopifyDomainUtility? _shopifyDomainUtility;
Expand Down
4 changes: 3 additions & 1 deletion ShopifySharp/Services/ProductImage/IProductImageService.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System;
using ShopifySharp.Filters;
using ShopifySharp.Lists;
using System.Threading.Tasks;
using System.Threading;

namespace ShopifySharp;

[Obsolete("Shopify has deprecated the REST API for product images. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product images via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public interface IProductImageService : IShopifyService
{
/// <summary>
Expand Down Expand Up @@ -58,4 +60,4 @@ public interface IProductImageService : IShopifyService
/// <param name="imageId">The ProductImage object's Id.</param>
/// <param name="cancellationToken">Cancellation Token</param>
Task DeleteAsync(long productId, long imageId, CancellationToken cancellationToken = default);
}
}
4 changes: 3 additions & 1 deletion ShopifySharp/Services/ProductImage/ProductImageService.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using ShopifySharp.Filters;
using ShopifySharp.Infrastructure;
using ShopifySharp.Lists;
Expand All @@ -12,6 +13,7 @@ namespace ShopifySharp;
/// <summary>
/// A service for manipulating Shopify ProductImages.
/// </summary>
[Obsolete("Shopify has deprecated the REST API for product images. This service is deprecated and will be removed in a future version of ShopifySharp. Use ShopifySharp's GraphService to manage product images via the GraphQL API, and check https://github.com/nozzlegear/shopifysharp for a migration guide.")]
public class ProductImageService : ShopifyService, IProductImageService
{
/// <summary>
Expand Down Expand Up @@ -76,4 +78,4 @@ public virtual async Task DeleteAsync(long productId, long imageId, Cancellation

await ExecuteRequestAsync(req, HttpMethod.Delete, cancellationToken);
}
}
}

0 comments on commit 9ca3445

Please sign in to comment.