Exemplo n.º 1
0
        public Task <SoundCloudList <Comment> > GetAllAsync(int limit = SoundCloudQueryBuilder.MaxLimit)
        {
            var builder = new CommentsQueryBuilder {
                Path = CommentsPath, Paged = true, Limit = limit
            };

            return(GetPage <Comment>(builder.BuildUri()));
        }
Exemplo n.º 2
0
        public async Task <Comment> GetAsync(long id)
        {
            var builder = new CommentsQueryBuilder {
                Path = string.Format(CommentPath, id)
            };

            return(await Gateway.SendGetRequestAsync <Comment>(builder.BuildUri()));
        }
Exemplo n.º 3
0
        public async Task <Comment> PostAsync(Comment comment)
        {
            comment.ValidatePost();

            var builder = new CommentsQueryBuilder {
                Path = CommentsPath
            };

            return(await Gateway.SendPostRequestAsync <Comment>(builder.BuildUri(), comment));
        }
Exemplo n.º 4
0
        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()));
        }
Exemplo n.º 5
0
        public async Task <Comment> GetAsync(int commentId)
        {
            EnsureClientId();

            var builder = new CommentsQueryBuilder();

            builder.Path = string.Format(CommentPath, commentId);

            return(await GetByIdAsync <Comment>(builder.BuildUri()));
        }
Exemplo n.º 6
0
        public Comment Get(int commentId)
        {
            EnsureClientId();

            var builder = new CommentsQueryBuilder();

            builder.Path = string.Format(CommentPath, commentId);

            return(GetById <Comment>(builder.BuildUri()));
        }
Exemplo n.º 7
0
        public IWebResult <Comment> Post(Comment comment)
        {
            EnsureToken();
            Validate(comment.ValidatePost);

            var builder = new CommentsQueryBuilder();

            builder.Path = CommentsPath;

            return(Create <Comment>(builder.BuildUri(), comment));
        }
Exemplo n.º 8
0
        public async Task <IEnumerable <Comment> > GetAsync()
        {
            EnsureClientId();

            var builder = new CommentsQueryBuilder();

            builder.Path  = CommentsPath;
            builder.Paged = true;

            return(await GetListAsync <Comment>(builder.BuildUri()));
        }
Exemplo n.º 9
0
        public IEnumerable <Comment> Get()
        {
            EnsureClientId();

            var builder = new CommentsQueryBuilder();

            builder.Path  = CommentsPath;
            builder.Paged = true;

            return(GetList <Comment>(builder.BuildUri()));
        }
Exemplo n.º 10
0
        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()));
        }
Exemplo n.º 11
0
        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));
        }