コード例 #1
0
            private Task <ResourcePart> UploadNextAsync(uint uploadId, int part, string md5sum, CancellationToken cancellationToken)
            {
                string cmd        = String.Format("uploads/{0}/parts", part);
                var    parameters = new Dictionary <string, object> {
                    { "part_number", part }, { "md5sum", md5sum }
                };

                return(client.GetAsync <ResourcePart>(cmd, parameters, cancellationToken));
            }
コード例 #2
0
            private async Task <JObject> UploadNextAsync(int uploadId, int part, string md5sum, CancellationToken cancellationToken)
            {
                string cmd        = String.Format("uploads/{0}/parts", uploadId);
                var    parameters = new Dictionary <string, object> {
                    { "part_number", part }, { "md5sum", md5sum }
                };
                var response = await client.GetAsync(cmd, parameters, cancellationToken).ConfigureAwait(false);

                return(await DeserializeDynamic(response));
            }
コード例 #3
0
 public Task <IEnumerable <List> > GetAsync(uint?id, CancellationToken cancellationToken)
 {
     if (id.HasValue)
     {
         return(client.GetAsync <List>(ServiceClient.BuildCommand("lists", id), null, cancellationToken)
                .ContinueWith <IEnumerable <List> >(t => new List <List> {
             t.Result
         }, TaskContinuationOptions.OnlyOnRanToCompletion));
     }
     return(client.GetAsync <IEnumerable <List> >("lists", null, cancellationToken));
 }
コード例 #4
0
            public Task <IEnumerable <Webhook> > GetByListAsync(uint listId, CancellationToken cancellationToken)
            {
                var parameters = new Dictionary <string, object> {
                    { "list_id", listId }
                };

                return(client.GetAsync <IEnumerable <Webhook> >("webhooks", parameters, cancellationToken));
            }
コード例 #5
0
            public async Task <IEnumerable <Webhook> > GetByListAsync(int listId, CancellationToken cancellationToken)
            {
                var parameters = new Dictionary <string, object> {
                    { "list_id", listId }
                };

                return(await client.GetAsync <IEnumerable <Webhook> >("webhooks", parameters, cancellationToken).ConfigureAwait(false));
            }
コード例 #6
0
 public async Task <SubTask> GetAsync(int id, CancellationToken cancellationToken)
 {
     return(await client.GetAsync <SubTask>(ServiceClient.BuildCommand("subtasks", id), null, cancellationToken).ConfigureAwait(false));
 }
コード例 #7
0
 public async Task <Reminder> GetAsync(int id, CancellationToken cancellationToken)
 {
     return(await client.GetAsync <Reminder>(ServiceClient.BuildCommand("reminders", id), null, cancellationToken).ConfigureAwait(false));
 }
コード例 #8
0
 public async Task <IEnumerable <Membership> > GetAsync(int?listId, CancellationToken cancellationToken)
 {
     return(await client.GetAsync <IEnumerable <Membership> >(ServiceClient.BuildCommand("memberships", listId), null, cancellationToken).ConfigureAwait(false));
 }
コード例 #9
0
 public async Task <IEnumerable <List> > GetAsync(CancellationToken cancellationToken)
 {
     return(await client.GetAsync <IEnumerable <List> >("lists", null, cancellationToken).ConfigureAwait(false));
 }
コード例 #10
0
 public Task <SubTask> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <SubTask>(ServiceClient.BuildCommand("subtasks", id), null, cancellationToken));
 }
コード例 #11
0
 public Task <User> GetAsync(CancellationToken cancellationToken)
 {
     return(client.GetAsync <User>("user", null, cancellationToken));
 }
コード例 #12
0
 public Task <Reminder> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <Reminder>(ServiceClient.BuildCommand("reminders", id), null, cancellationToken));
 }
コード例 #13
0
 public Task <Note> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <Note>(ServiceClient.BuildCommand("notes", id), null, cancellationToken));
 }
コード例 #14
0
 public Task <IEnumerable <Membership> > GetByListAsync(uint?listId, CancellationToken cancellationToken)
 {
     return(client.GetAsync <IEnumerable <Membership> >(ServiceClient.BuildCommand("memberships", listId), null, cancellationToken));
 }
コード例 #15
0
 public async Task <User> GetAsync(CancellationToken cancellationToken)
 {
     return(await client.GetAsync <User>("user", null, cancellationToken).ConfigureAwait(false));
 }
コード例 #16
0
 public Task <Comment> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <Comment>(ServiceClient.BuildCommand("task_comments", id), null, cancellationToken));
 }
コード例 #17
0
 public async Task <Comment> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(await client.GetAsync <Comment>(ServiceClient.BuildCommand("task_comments", id), null, cancellationToken).ConfigureAwait(false));
 }