1 min read

Shopify SDK

The Poq Shopify SDK contains clients for Shopify API and Poq specific services to speed up integration of Shopify in Poq BFC.

List of Features

The Poq Shopify SDK provides Contracts, Clients and Services that facilitates integration of the Poq Platform with the Shopify API. Here is the list feature by their namespace.

  • Client contains contacts and clients to use Shopify API.
  • Services contains Poq specific services.

Limitations

Implementation does not fully cover the entire Shopify API. Future development should fill in gaps.

Extension Points

Current version of the SDK covers only basic integration with Poq platform using feed files and minimum coverage of account API provided by shopify to deal with user checkout & account. Future versions of the library should provide more complete contracts and clients to use Shopify API with .Net.

How to develop on top of this solution

In order to use Shopify API directly developers can use Client namespace which is organized as follows:

  • Contract
  • Interfaces
  • ShopifyAccountClient
  • ShopifyAddressClient
  • ShopifyCheckoutClient
  • ShopifyCollectionClient
  • ShopifyIdentityClient
  • ShopifyNavigationClient
  • ShopifyProductClient

The services available in Service namespace are intended to help generating feed files from Shopify.

Example Client Usage

Creating an account for user in Shopify

var client = new ShopifyAccountClient(httpClientFactory, shopifyClientConfiguration);
var result = await client.CreateAccountAsync(
new ShopifyCustomerRequest()
{
AcceptsMarketing = true,
Email = "aaa12345678@hot.com",
FirstName = "TestFirstName",
LastName = "TestLastName",
Password = "HiZqFuDvDdQ7",
Phone = "+447712345681"
},
_authorizationKey);

Example Service Usage

Generating categories feed file using ShopifyFeedService

var feedService = new ShopifyFeedService(
new FeedExporter(),
new ShopifyFeedDataService(
navigationClient,
collectionClient,
productClient,
new Api.Shopify.Integration.Utility.ProductAssigner(productClient)
));
var result = await feedService.CreateCategoriesFeedAsync(
new ShopifyFeedExportConfiguration() { UseNavigationData = true, ShopifyNavigationPage = "custom-page", TopLevelMenuName = "Main Menu" },
outputFileName);

Breaking Changes

No breaking changes.