C# Class ShopifySharp.ShopifyArticleService

A service for manipulating a blog's articles.
Inheritance: ShopifySharp.ShopifyService
Mostrar archivo Open project: nozzlegear/ShopifySharp

Public Methods

Method Description
CountAsync ( long blogId, ShopifySharp.Filters.ShopifyPublishableCountFilter filter = null ) : Task

Gets a count of the articles belonging to the given blog.

CreateAsync ( long blogId, ShopifyArticle article, IEnumerable metafields = null ) : Task

Creates a new article on the given blog.

DeleteAsync ( long blogId, long articleId ) : System.Threading.Tasks.Task

Deletes an article with the given id.

GetAsync ( long blogId, long articleId, string fields = null ) : Task

Gets an article with the given id.

ListAsync ( long blogId, ShopifyArticleFilter filter = null ) : Task>

Gets a list of up to 250 articles belonging to the given blog.

ListAuthorsAsync ( ) : Task>

Gets a list of all article authors.

ListTagsAsync ( int popular = null, int limit = null ) : Task>

Gets a list of all article tags.

ListTagsForBlogAsync ( long blogId, int popular = null, int limit = null ) : Task>

Gets a list of all article tags for the given blog.

ShopifyArticleService ( string myShopifyUrl, string shopAccessToken ) : RestSharp

Creates a new instance of the service.

UpdateAsync ( long blogId, ShopifyArticle article, IEnumerable metafields = null ) : Task

Updates an article.

Method Details

CountAsync() public method

Gets a count of the articles belonging to the given blog.
public CountAsync ( long blogId, ShopifySharp.Filters.ShopifyPublishableCountFilter filter = null ) : Task
blogId long The blog that the articles belong to.
filter ShopifySharp.Filters.ShopifyPublishableCountFilter Options for filtering the result.
return Task

CreateAsync() public method

Creates a new article on the given blog.
public CreateAsync ( long blogId, ShopifyArticle article, IEnumerable metafields = null ) : Task
blogId long The blog that the article will belong to.
article ShopifyArticle The article being created. Id should be null.
metafields IEnumerable Optional metafield data that can be returned by the .
return Task

DeleteAsync() public method

Deletes an article with the given id.
public DeleteAsync ( long blogId, long articleId ) : System.Threading.Tasks.Task
blogId long The blog that the article belongs to.
articleId long The article benig deleted.
return System.Threading.Tasks.Task

GetAsync() public method

Gets an article with the given id.
public GetAsync ( long blogId, long articleId, string fields = null ) : Task
blogId long The blog that the article belongs to.
articleId long The article's id.
fields string A comma-separated list of fields to return.
return Task

ListAsync() public method

Gets a list of up to 250 articles belonging to the given blog.
public ListAsync ( long blogId, ShopifyArticleFilter filter = null ) : Task>
blogId long The blog that the articles belong to.
filter ShopifySharp.Filters.ShopifyArticleFilter Options for filtering the result.
return Task>

ListAuthorsAsync() public method

Gets a list of all article authors.
public ListAuthorsAsync ( ) : Task>
return Task>

ListTagsAsync() public method

Gets a list of all article tags.
public ListTagsAsync ( int popular = null, int limit = null ) : Task>
popular int A flag to indicate only to a certain number of the most popular tags.
limit int The number of tags to return
return Task>

ListTagsForBlogAsync() public method

Gets a list of all article tags for the given blog.
public ListTagsForBlogAsync ( long blogId, int popular = null, int limit = null ) : Task>
blogId long The blog that the tags belong to.
popular int A flag to indicate only to a certain number of the most popular tags.
limit int The number of tags to return
return Task>

ShopifyArticleService() public method

Creates a new instance of the service.
public ShopifyArticleService ( string myShopifyUrl, string shopAccessToken ) : RestSharp
myShopifyUrl string The shop's *.myshopify.com URL.
shopAccessToken string An API access token for the shop.
return RestSharp

UpdateAsync() public method

Updates an article.
public UpdateAsync ( long blogId, ShopifyArticle article, IEnumerable metafields = null ) : Task
blogId long The blog that the article belongs to.
article ShopifyArticle The article being updated. Id should not be null.
metafields IEnumerable Optional metafield data that can be returned by the .
return Task