InboxClient client = new InboxClient("http://inboxdev.cloudapp.net:5555/");
Namespace ns = await client.GetFirstNamespace();
client.Namespace = ns.Namespace_ID;
- Namespace ns2 = await client.GetNamespace(client.Namespace);
+ List<Tag> tags = new List<Tag>(await client.GetTags());
+ //Tag tag = await client.GetTag("Test Tag");
+ Tag tag = tags.Where(t => t.Name == "TestTag").First();
+ Tag tag2 = await client.RenameCustomTag(tag.ID, "Other Test");
}
--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace inbox_net.DataModel
+{
+ public sealed class CanonicalTags
+ {
+ public static readonly string Inbox = "inbox";
+ public static readonly string Archive = "archive";
+ public static readonly string Drafts = "drafts";
+ public static readonly string Sending = "sending";
+ public static readonly string Sent = "sent";
+ public static readonly string Spam = "spam";
+ public static readonly string Starred = "starred";
+ public static readonly string Unread = "unread";
+ public static readonly string Trash = "trash";
+ public static readonly string Unseen = "unseen";
+ }
+}
[JsonProperty("version")]
public string Version { get; set; }
+
+ public override string ToString()
+ {
+ return Subject;
+ }
}
}
[JsonProperty("is_embedded")]
public bool IsEmbeded { get; set; }
-
+ public override string ToString()
+ {
+ return FileName;
+ }
}
}
[JsonProperty("body")]
public string Body { get; set; }
+ public override string ToString()
+ {
+ return Subject;
+ }
}
}
[JsonProperty("provider")]
public string Provider { get; set; }
+ public override string ToString()
+ {
+ return Email_Address;
+ }
}
}
[JsonProperty("email")]
public string Email_Address { get; set; }
+ public override string ToString()
+ {
+ return string.Format("{0} - {1}", Name, Email_Address);
+ }
}
}
[JsonProperty("object")]
public string Object { get; set; }
+
+ public override string ToString()
+ {
+ return Name;
+ }
}
}
[JsonProperty("draft_ids")]
public List<string> Drafts { get; set; }
+
+ public override string ToString()
+ {
+ return Subject;
+ }
}
}
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Compile Include="DataModel\CanonicalTags.cs" />
<Compile Include="DataModel\Draft.cs" />
<Compile Include="DataModel\File.cs" />
<Compile Include="DataModel\Message.cs" />