VeeFriends.ShopifySync.TikTok
5.0.15
dotnet add package VeeFriends.ShopifySync.TikTok --version 5.0.15
NuGet\Install-Package VeeFriends.ShopifySync.TikTok -Version 5.0.15
<PackageReference Include="VeeFriends.ShopifySync.TikTok" Version="5.0.15" />
paket add VeeFriends.ShopifySync.TikTok --version 5.0.15
#r "nuget: VeeFriends.ShopifySync.TikTok, 5.0.15"
// Install VeeFriends.ShopifySync.TikTok as a Cake Addin #addin nuget:?package=VeeFriends.ShopifySync.TikTok&version=5.0.15 // Install VeeFriends.ShopifySync.TikTok as a Cake Tool #tool nuget:?package=VeeFriends.ShopifySync.TikTok&version=5.0.15
VeeFriends.ShopifySync 🛍️🔁
VeeFriends.ShopifySync is a .NET library that provides a flexible and extensible framework for synchronizing data between various e-commerce platforms and Shopify. Currently, it supports integration with the WhatNot platform.
Features
- Abstract base classes for creating platform-specific implementations
- GraphQL request builder for easy query construction
- Error handling and custom exception types
- Dependency Injection support
- Asynchronous operations
Installation
Install the VeeFriends.ShopifySync NuGet package in your project:
dotnet add package VeeFriends.ShopifySync
Usage
1. Configuration
First, configure the services in your Startup.cs
or Program.cs
file:
using VeeFriends.ShopifySync.Services;
using VeeFriends.ShopifySync.WhatNot;
public void ConfigureServices(IServiceCollection services)
{
services.ShopifySync()
.AddWhatNot(options =>
{
options.ApiUrl = "https://whatnot-api-url.com";
// Add other WhatNot-specific configuration
});
}
2. Using the WhatNot Seller Platform
Inject the WhatNotSellerPlatform
into your service or controller:
public class MyService
{
private readonly WhatNotSellerPlatform _whatNotPlatform;
public MyService(WhatNotSellerPlatform whatNotPlatform)
{
_whatNotPlatform = whatNotPlatform;
}
public async Task<WhatNotProduct> GetProductAsync(string productId)
{
var requestOptions = new WhatNotRequestOptions
{
AccessToken = "your-access-token"
};
return await _whatNotPlatform.GetProduct(productId, requestOptions);
}
public async Task<WhatNotOrder> GetOrderAsync(string orderId)
{
var requestOptions = new WhatNotRequestOptions
{
AccessToken = "your-access-token"
};
return await _whatNotPlatform.GetOrder(orderId, requestOptions);
}
}
3. Error Handling
The library includes custom error handling. Errors are wrapped in an ErrorModel
and thrown as an ErrorException
:
try
{
var product = await _whatNotPlatform.GetProduct(productId, requestOptions);
}
catch (ErrorException ex)
{
Console.WriteLine($"An error occurred: {ex.Message}");
// Handle the error appropriately
}
Extending the Library
Creating a New Platform Integration
To add support for a new platform:
- Create a new class that inherits from
SellerHttpClient<TRequestOptions>
. - Implement a new
SellerPlatform<TProduct, TOrder, TRequestOptions>
for your platform. - Create platform-specific
ProductModel
andOrderModel
classes. - Add an extension method to
ShopifySyncCollection
for easy configuration.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
-
net9.0
- Microsoft.KernelMemory.AI.OpenAI (>= 0.95.241216.2)
- Microsoft.KernelMemory.Core (>= 0.95.241216.2)
- VeeFriends.ShopifySync (>= 5.0.15)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.