Exemplo n.º 1
0
 /// <summary>
 /// Returns a list of events for the given subject and subject type. A full list of supported subject types can be found at https://help.shopify.com/api/reference/event
 /// </summary>
 /// <param name="option">Options for filtering the result.</param>
 /// <param name="subjectId">Restricts results to just one subject item, e.g. all changes on a product.</param>
 /// <param name="subjectType">
 /// The subject's type, e.g. 'Order' or 'Product'.
 /// Known subject types are 'Articles', 'Blogs', 'Custom_Collections', 'Comments', 'Orders', 'Pages',
 /// 'Products' and 'Smart_Collections'.
 /// A current list of subject types can be found at https://help.shopify.com/api/reference/event
 /// </param>
 public virtual async Task <IEnumerable <Event> > ListAsync(string subjectType, long subjectId,
                                                            EventListOption option = null)
 {
     return
         (await
          MakeRequestAsync <List <Event> >($"{subjectType}/{subjectId}/events.json", HttpMethod.Get, "events", option));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns a list of events.
 /// </summary>
 /// <param name="option">Options for filtering the result.</param>
 public virtual async Task <IEnumerable <Event> > ListAsync(EventListOption option = null)
 {
     return
         (await
          MakeRequestAsync <List <Event> >("events.json", HttpMethod.Get, "events", option));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets a count of all site events.
 /// </summary>
 /// <param name="option">Options for filtering the result.</param>
 /// <returns>The count of all site events.</returns>
 public virtual async Task <int> CountAsync(EventListOption option = null)
 {
     return(await MakeRequestAsync <int>("events/count.json", HttpMethod.Get, "count", option));
 }