-
-
Notifications
You must be signed in to change notification settings - Fork 313
Articles
Joshua Harms edited this page Dec 20, 2023
·
1 revision
Articles are objects representing a blog post. Each article belongs to a Blog.
var service = new ArticleService(myShopifyUrl, shopAccessToken);
var article = await service.CreateAsync(blogId, new Article()
{
Title = "My new Article title",
Author = "John Smith",
Tags = "This Post, Has Been Tagged",
BodyHtml = "<h1>Hello world!</h1>",
Image = new ArticleImage()
{
Attachment = "R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==\n"
}
});
var service = new ArticleService(myShopifyUrl, shopAccessToken);
var article = await service.GetAsync(blogId, articleId);
var service = new ArticleService(myShopifyUrl, shopAccessToken);
var article = await service.UpdateAsync(blogId, articleId, new Article()
{
Title = "My new title"
});
var service = new ArticleService(myShopifyUrl, shopAccessToken);
var articles = await service.ListAsync(blogId);
var service = new ArticleService(myShopifyUrl, shopAccessToken);
var count = await service.CountAsync(blogId);
var service = new ArticleService(myShopifyUrl, shopAccessToken);
await service.DeleteAsync(blogId, articleId);
var service = new ArticleService(myShopifyUrl, shopAccessToken);
IEnumerable<string> authors = await service.ListAuthorsAsync();
var service = new ArticleService(myShopifyUrl, shopAccessToken);
IEnumerable<string> tags = await service.ListTagsAsync();
var service = new ArticleService(myShopifyUrl, shopAccessToken);
IEnumerable<string> tags = await service.ListTagsForBlogAsync(blogId);