Skip to content

Commit

Permalink
Fix Todoist Client API.
Browse files Browse the repository at this point in the history
  • Loading branch information
olsh committed Jan 31, 2017
1 parent 56d5d14 commit 4a7017f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ ITodoistClient client = await TodoistClient.LoginAsync("email", "password");
// Get all projects.
var projects = await client.Projects.GetAsync();

// Get all resources (labels, projects, tasks, notes etc.)
var resources = await client.GetResourcesAsync();

// Get only projects and labels
var projectsAndLabels = await client.GetResourcesAsync(ResourceType.Projects, ResourceType.Labels);

// Adding a task with a note.
var taskId = await client.Items.AddAsync(new Item("New task"));
await client.Notes.AddToItemAsync(new Note("Task description"), taskId);
Expand Down
2 changes: 1 addition & 1 deletion src/Todoist.Net.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"testRunner": "xunit",
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"Todoist.Net": "1.1.1-*",
"Todoist.Net": "1.1.2-*",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0"
},
Expand Down
6 changes: 3 additions & 3 deletions src/Todoist.Net/TodoistClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ private TodoistClient()
/// <exception cref="HttpRequestException">API exception.</exception>
/// <exception cref="TodoistException">Unable to get token.</exception>
[Obsolete("This method is scheduled for deprecation and probably will be removed in future versions.")]
public static async Task<ITodoistClient> LoginAsync(string email, string password)
public static async Task<TodoistClient> LoginAsync(string email, string password)
{
if (string.IsNullOrEmpty(email))
{
Expand Down Expand Up @@ -211,7 +211,7 @@ public static async Task<ITodoistClient> LoginAsync(string email, string passwor
/// Value cannot be null or empty - password</exception>
/// <exception cref="TodoistException">API exception.</exception>
[Obsolete("This method is scheduled for deprecation and probably will be removed in future versions.")]
public static async Task<ITodoistClient> LoginWithGoogleAsync(string email, string oauthToken)
public static async Task<TodoistClient> LoginWithGoogleAsync(string email, string oauthToken)
{
if (string.IsNullOrEmpty(email))
{
Expand Down Expand Up @@ -397,7 +397,7 @@ async Task<string> IAdvancedTodoistClient.PostRawAsync(
/// <returns>A new instance of Todoist client.</returns>
/// <exception cref="HttpRequestException">API exception.</exception>
/// <exception cref="TodoistException">Unable to get token.</exception>
private static async Task<ITodoistClient> LoginWithCredentialsAsync(
private static async Task<TodoistClient> LoginWithCredentialsAsync(
string resource,
KeyValuePair<string, string>[] parameters)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Todoist.Net/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.1-*",
"version": "1.1.2-*",
"frameworks": {
"netstandard1.1": {
"dependencies": {
Expand Down

0 comments on commit 4a7017f

Please sign in to comment.