Пример #1
0
        /// <summary>
        /// Gets the current user info.
        /// </summary>
        /// <returns>The current user info.</returns>
        /// <exception cref="HttpRequestException">API exception.</exception>
        public async Task <UserInfo> GetCurrentAsync()
        {
            var response = await TodoistClient.GetResourcesAsync(ResourceType.User).ConfigureAwait(false);

            return(response.UserInfo);
        }
Пример #2
0
        /// <summary>
        /// Gets all filters.
        /// </summary>
        /// <returns>The filters.</returns>
        /// <exception cref="HttpRequestException">API exception.</exception>
        public async Task <IEnumerable <Filter> > GetAsync()
        {
            var response = await TodoistClient.GetResourcesAsync(ResourceType.Filters).ConfigureAwait(false);

            return(response.Filters);
        }
Пример #3
0
        public void GetAllResources_Success()
        {
            ITodoistClient client = new TodoistClient(SettingsProvider.GetToken());

            var resources = client.GetResourcesAsync().Result;
        }