Example #1
0
 public static async Task MakeComment()
 {
     var postManager = new PostManager(_webManager);
     var files = await postManager.CreateNewFileSessionAsync();
     var result = await postManager.GetUsersPostsAsync();
     var post = result.Data.Posts.First();
     var commentManager = new CommentManager(_webManager);
     var results = await commentManager.MakeCommentAsync(post.Id, new NewComment()
     {
         Point = new Point()
         {
             X = 15,
             Y = 25
         },
         Body = "Test from C#!"
     });
 }
Example #2
0
 public static async Task MakeStar()
 {
     var postManager = new PostManager(_webManager);
     var starManager = new StarManager(_webManager);
     var files = await postManager.CreateNewFileSessionAsync();
     var result = await postManager.GetUsersPostsAsync();
     var post = result.Data.Posts.First();
     var star = await starManager.StarByteAsync(post.Id);
     var results = await starManager.GetStarsAsync();
     var deleteStar = await starManager.DeleteStarOnByteAsync(post.Id);
 }
Example #3
0
 public static async Task GetPosts()
 {
     var postManager = new PostManager(_webManager);
     var result = await postManager.GetLatestPostsAsync();
     var result2 = await postManager.GetPopularPostsAsync();
     var posts = result.Data.Posts;
     Console.WriteLine(posts.First().Name);
     var firstPostByName = await postManager.GetPostByNameAsync(posts.First().Name);
     Console.WriteLine(firstPostByName.Data.Post.Name);
 }
Example #4
0
 public static async Task MakePost()
 {
     var postManager = new PostManager(_webManager);
     var files = await postManager.CreateNewFileSessionAsync();
     var result = await postManager.GetUsersPostsAsync();
     var post = result.Data.Posts.First();
     //var newPost = new NewPost()
     //{
     //    caption = "Test Edit",
     //    name = "New Name",
     //    package = post.Package,
     //    thumbnailUrl = post.Thumbnails.Default.Url
     //};
     //var result2 = await postManager.CreateNewPostAsync(newPost);
     //string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"Image\Test.png");
     //var file = File.ReadAllBytes(path);
     //var result = await postManager.SendFileAsync(files.Data.Url, new MemoryStream(file));
     //Console.WriteLine(result.Data.Url);
 }