-
-
Notifications
You must be signed in to change notification settings - Fork 312
Blogs
Joshua Harms edited this page Dec 20, 2023
·
1 revision
In addition to an online storefront, Shopify shops come with a built-in blogging engine, allowing a shop to have one or more blogs. This service is for interacting with blogs themselves, not blog posts.
var service = new BlogService(myShopifyUrl, shopAccessToken);
var blog = await service.CreateAsync(new Blog()
{
Title = "My new blog"
});
var service = new BlogService(myShopifyUrl, shopAccessToken);
var blog = await service.GetAsync(blogId);
var service = new BlogService(myShopifyUrl, shopAccessToken);
var blog = await service.UpdateAsync(blogId, new Blog()
{
Comments = "moderate"
});
var service = new BlogService(myShopifyUrl, shopAccessToken);
var blogs = await service.ListAsync();
var service = new BlogService(myShopifyUrl, shopAccessToken);
var count = await service.CountAsync();
var service = new BlogService(myShopifyUrl, shopAccessToken);
await service.DeleteAsync(blogId);