Esempio n. 1
0
        private static async void NewPost(Thing post)
        {
            if (post.Kind == Thing.ThingKind.Link)
            {
                var response = await client.CommentOnThing(post.Data.Name, cb.GetComment());

                var PostResponse = await HttpHelper.HttpResponseToObject <PostResponse>(response);

                if (PostResponse.Success)
                {
                    Console.WriteLine("Successfully posted comment on " + DateTime.Now.ToString());
                }
                else
                {
                    Console.WriteLine("Post comment failed (" + DateTime.Now.ToString() + ")");
                }
            }
        }