/// <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); }
/// <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); }
public void GetAllResources_Success() { ITodoistClient client = new TodoistClient(SettingsProvider.GetToken()); var resources = client.GetResourcesAsync().Result; }