Exemplo n.º 1
0
 public Task <Pr0grammResponse> Post(IPr0grammItem item, string content, int parentId)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(Post(item.Id, content, parentId));
 }
Exemplo n.º 2
0
 public Task <Pr0grammResponse> Vote(IPr0grammItem item, Vote absoluteVote)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(Vote(item.Id, absoluteVote));
 }
Exemplo n.º 3
0
 public Task <Pr0grammResponse> Delete(IPr0grammItem item, string reason, bool notifyUser, bool banUser, int days)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(Delete(item.Id, reason, notifyUser, banUser, days));
 }
Exemplo n.º 4
0
 public Task <GetItemsInfoResponse> Vote(IPr0grammItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(GetInfo(item.Id));
 }
Exemplo n.º 5
0
 public Task <Pr0grammResponse> Delete(IPr0grammItem item, bool banUsers, int durationInDays, params IPr0grammTag[] tags)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(Delete(item.Id, banUsers, durationInDays, tags.Select(t => t.Id).ToArray()));
 }
Exemplo n.º 6
0
 public Task <GetDetailsResponse> GetDetails(IPr0grammItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(GetDetails(item.Id));
 }
Exemplo n.º 7
0
 public Task <Pr0grammResponse> Add(IPr0grammItem item, params string[] tags)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     return(Add(item.Id, tags));
 }
Exemplo n.º 8
0
 public Task<Pr0grammResponse> Post(IPr0grammItem item, string content, int parentId)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return Post(item.Id, content, parentId);
 }
Exemplo n.º 9
0
 public Task <GetItemsResponse> GetItemsAround(ItemFlags flags, ItemStatus status, bool following, string tags, string user, string likes, bool self, IPr0grammItem aroundItem)
 {
     if (aroundItem == null)
     {
         throw new ArgumentNullException(nameof(aroundItem));
     }
     return(GetItemsAround(flags, status, following, tags, user, likes, self, aroundItem.Id));
 }
Exemplo n.º 10
0
 public Task <GetItemsResponse> GetItemsOlder(ItemFlags flags, ItemStatus status, bool following, string tags, string user, string likes, bool self, IPr0grammItem olderThan)
 {
     if (olderThan == null)
     {
         throw new ArgumentNullException(nameof(olderThan));
     }
     return(GetItemsOlder(flags, status, following, tags, user, likes, self, olderThan.Id));
 }
Exemplo n.º 11
0
 public Task<Pr0grammResponse> Add(IPr0grammItem item, params string[] tags)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return Add(item.Id, tags);
 }
Exemplo n.º 12
0
 public Task<GetItemsInfoResponse> Vote(IPr0grammItem item)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return GetInfo(item.Id);
 }
Exemplo n.º 13
0
 public Task<Pr0grammResponse> Vote(IPr0grammItem item, Vote absoluteVote)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return Vote(item.Id, absoluteVote);
 }
Exemplo n.º 14
0
 public Task<GetItemsResponse> GetItemsAround(ItemFlags flags, ItemStatus status, bool following, string tags, string user, string likes, bool self, IPr0grammItem aroundItem)
 {
     if (aroundItem == null)
         throw new ArgumentNullException(nameof(aroundItem));
     return GetItemsAround(flags, status, following, tags, user, likes, self, aroundItem.Id);
 }
Exemplo n.º 15
0
 public Task<GetItemsResponse> GetItemsOlder(ItemFlags flags, ItemStatus status, bool following, string tags, string user, string likes, bool self, IPr0grammItem olderThan)
 {
     if (olderThan == null)
         throw new ArgumentNullException(nameof(olderThan));
     return GetItemsOlder(flags, status, following, tags, user, likes, self, olderThan.Id);
 }
Exemplo n.º 16
0
 public Task<Pr0grammResponse> Delete(IPr0grammItem item, string reason, bool notifyUser, bool banUser, int days)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return Delete(item.Id, reason, notifyUser, banUser, days);
 }
Exemplo n.º 17
0
 public Task<GetDetailsResponse> GetDetails(IPr0grammItem item)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return GetDetails(item.Id);
 }
Exemplo n.º 18
0
 public Task<Pr0grammResponse> Delete(IPr0grammItem item, bool banUsers, int durationInDays, params IPr0grammTag[] tags)
 {
     if (item == null)
         throw new ArgumentNullException(nameof(item));
     return Delete(item.Id, banUsers, durationInDays, tags.Select(t => t.Id).ToArray());
 }