acron0 / AsanaNet

.NET API for Asana (www.asana.com)
MIT License
38 stars 29 forks source link

Lots of small improvements #18

Closed niieani closed 10 years ago

niieani commented 11 years ago
niieani commented 10 years ago

I've added more useful stuff:

asanaObject.Delete();
Int64 projectID = 1234;
AsanaProject project = (AsanaProject) projectID;
public static void FetchByIdOneOf<AsanaObjectT>(Int64 ID)
{
                            AsanaObject asanaObject;
                            AsanaHost.Get<AsanaObjectT>(ID, asanaReturn =>
                            {
                                asanaObject = asanaReturn;
                            }).Wait();
                            return asanaObject;
}
var outputObject = AsanaFetchByIdOneOf<AsanaProject>(1234567);

This was, again, useful for writing caching functions in an extra library I created (so I don't need to repeat all of the code for each Asana function). Might release that as a separate project. Caching both into memory and files.

Please comment if you don't understand something or if you think something could be improved.

Best

acron0 commented 10 years ago

This looks good to me. Thanks Bazyli :)