// TaskList Methods


        public async Task <ListResult <GTaskList> > GetTaskListsAsync(string pageToken = null, ulong maxResults = 20)
        {
            ListResult <GTaskList> result = null;

            StringBuilder requestBuilder = new StringBuilder();

            requestBuilder.Append("https://www.googleapis.com/tasks/v1/users/@me/lists");

            Dictionary <string, object> queries = new Dictionary <string, object>();

            if (pageToken != null)
            {
                queries.Add("pageToken", pageToken);
            }

            queries.Add("maxResults", maxResults);

            RequestHelper.AddQueriesToRequest(requestBuilder, queries);

            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, requestBuilder.ToString());

            RequestHelper.AddAuthorizationHeader(request, ClientToken);

            var responseMessage = await _client.SendAsync(request);

            if (responseMessage.IsSuccessStatusCode)
            {
                string jsonReturned = await responseMessage.Content.ReadAsStringAsync();

                result = JsonConvert.DeserializeObject <ListResult <GTaskList> >(jsonReturned);
            }

            return(result);
        }
        public async Task <ListResult <GTask> > GetTasksAsync(string taskListID, TasksQuery query)
        {
            ListResult <GTask> result = null;

            StringBuilder requestBuilder = new StringBuilder();

            requestBuilder.Append($"https://www.googleapis.com/tasks/v1/lists/{taskListID}/tasks");

            Dictionary <string, object> queries = new Dictionary <string, object>();

            queries.Add("maxResults", query.MaxResults);
            queries.Add("showCompleted", query.ShowCompleted);
            queries.Add("showDeleted", query.ShowDeleted);
            queries.Add("showHidden", query.ShowHidden);

            QueryHelper.TryAddToQueries(query, queries);

            RequestHelper.AddQueriesToRequest(requestBuilder, queries);

            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, requestBuilder.ToString());

            RequestHelper.AddAuthorizationHeader(request, ClientToken);

            var responseMessage = await _client.SendAsync(request);

            if (responseMessage.IsSuccessStatusCode)
            {
                string jsonReturned = await responseMessage.Content.ReadAsStringAsync();

                result = JsonConvert.DeserializeObject <ListResult <GTask> >(jsonReturned);
            }

            return(result);
        }
        public async Task <GTask> MoveTaskAsync(string taskID, string taskListID, string parentID = null, string previousSiblingID = null)
        {
            GTask result = null;

            StringBuilder requestBuilder = new StringBuilder();

            requestBuilder.Append($"https://www.googleapis.com/tasks/v1/lists/{taskListID}/tasks/{taskID}/move");

            Dictionary <string, object> queries = new Dictionary <string, object>();

            if (parentID != null)
            {
                queries.Add("parent", parentID);
            }

            if (previousSiblingID != null)
            {
                queries.Add("previous", previousSiblingID);
            }

            RequestHelper.AddQueriesToRequest(requestBuilder, queries);

            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, requestBuilder.ToString());

            RequestHelper.AddAuthorizationHeader(request, ClientToken);

            var responseMessage = await _client.SendAsync(request);

            if (responseMessage.IsSuccessStatusCode)
            {
                string jsonReturned = await responseMessage.Content.ReadAsStringAsync();

                result = JsonConvert.DeserializeObject <GTask>(jsonReturned);
            }

            return(result);
        }