Ejemplo n.º 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));
            }
Ejemplo n.º 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));
            }
Ejemplo n.º 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));
 }
Ejemplo n.º 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));
            }
Ejemplo n.º 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));
            }
Ejemplo n.º 6
0
 public async Task <SubTask> GetAsync(int id, CancellationToken cancellationToken)
 {
     return(await client.GetAsync <SubTask>(ServiceClient.BuildCommand("subtasks", id), null, cancellationToken).ConfigureAwait(false));
 }
Ejemplo n.º 7
0
 public async Task <Reminder> GetAsync(int id, CancellationToken cancellationToken)
 {
     return(await client.GetAsync <Reminder>(ServiceClient.BuildCommand("reminders", id), null, cancellationToken).ConfigureAwait(false));
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 9
0
 public async Task <IEnumerable <List> > GetAsync(CancellationToken cancellationToken)
 {
     return(await client.GetAsync <IEnumerable <List> >("lists", null, cancellationToken).ConfigureAwait(false));
 }
Ejemplo n.º 10
0
 public Task <SubTask> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <SubTask>(ServiceClient.BuildCommand("subtasks", id), null, cancellationToken));
 }
Ejemplo n.º 11
0
 public Task <User> GetAsync(CancellationToken cancellationToken)
 {
     return(client.GetAsync <User>("user", null, cancellationToken));
 }
Ejemplo n.º 12
0
 public Task <Reminder> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <Reminder>(ServiceClient.BuildCommand("reminders", id), null, cancellationToken));
 }
Ejemplo n.º 13
0
 public Task <Note> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <Note>(ServiceClient.BuildCommand("notes", id), null, cancellationToken));
 }
Ejemplo n.º 14
0
 public Task <IEnumerable <Membership> > GetByListAsync(uint?listId, CancellationToken cancellationToken)
 {
     return(client.GetAsync <IEnumerable <Membership> >(ServiceClient.BuildCommand("memberships", listId), null, cancellationToken));
 }
Ejemplo n.º 15
0
 public async Task <User> GetAsync(CancellationToken cancellationToken)
 {
     return(await client.GetAsync <User>("user", null, cancellationToken).ConfigureAwait(false));
 }
Ejemplo n.º 16
0
 public Task <Comment> GetAsync(uint id, CancellationToken cancellationToken)
 {
     return(client.GetAsync <Comment>(ServiceClient.BuildCommand("task_comments", id), null, cancellationToken));
 }
Ejemplo n.º 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));
 }