public Task <SoundCloudList <Comment> > GetAllAsync(int limit = SoundCloudQueryBuilder.MaxLimit) { var builder = new CommentsQueryBuilder { Path = CommentsPath, Paged = true, Limit = limit }; return(GetPage <Comment>(builder.BuildUri())); }
public async Task <Comment> GetAsync(long id) { var builder = new CommentsQueryBuilder { Path = string.Format(CommentPath, id) }; return(await Gateway.SendGetRequestAsync <Comment>(builder.BuildUri())); }
public async Task <Comment> PostAsync(Comment comment) { comment.ValidatePost(); var builder = new CommentsQueryBuilder { Path = CommentsPath }; return(await Gateway.SendPostRequestAsync <Comment>(builder.BuildUri(), comment)); }
public async Task <StatusResponse> DeleteAsync(Comment comment) { comment.ValidateDelete(); var builder = new CommentsQueryBuilder { Path = string.Format(CommentPath, comment.Id) }; return(await Gateway.SendDeleteRequestAsync <StatusResponse>(builder.BuildUri())); }
public async Task <Comment> GetAsync(int commentId) { EnsureClientId(); var builder = new CommentsQueryBuilder(); builder.Path = string.Format(CommentPath, commentId); return(await GetByIdAsync <Comment>(builder.BuildUri())); }
public Comment Get(int commentId) { EnsureClientId(); var builder = new CommentsQueryBuilder(); builder.Path = string.Format(CommentPath, commentId); return(GetById <Comment>(builder.BuildUri())); }
public IWebResult <Comment> Post(Comment comment) { EnsureToken(); Validate(comment.ValidatePost); var builder = new CommentsQueryBuilder(); builder.Path = CommentsPath; return(Create <Comment>(builder.BuildUri(), comment)); }
public async Task <IEnumerable <Comment> > GetAsync() { EnsureClientId(); var builder = new CommentsQueryBuilder(); builder.Path = CommentsPath; builder.Paged = true; return(await GetListAsync <Comment>(builder.BuildUri())); }
public IEnumerable <Comment> Get() { EnsureClientId(); var builder = new CommentsQueryBuilder(); builder.Path = CommentsPath; builder.Paged = true; return(GetList <Comment>(builder.BuildUri())); }
public async Task <IWebResult> DeleteAsync(Comment comment) { EnsureToken(); Validate(comment.ValidateDelete); var builder = new CommentsQueryBuilder(); builder.Path = string.Format(CommentPath, comment.id); return(await DeleteAsync(builder.BuildUri())); }
public async Task <IWebResult <Comment> > PostAsync(Comment comment) { EnsureToken(); Validate(comment.ValidatePost); var builder = new CommentsQueryBuilder(); builder.Path = CommentsPath; return(await CreateAsync <Comment>(builder.BuildUri(), comment)); }