public void publishTest4() { attachment attachment = new attachment(); attachment.caption = "www.youtube.com"; attachment.name = "ninja cat"; attachment.href = "http://www.youtube.com/watch?v=muLIPWjks_M"; attachment.description = "a sneaky cat"; attachment.properties = new List<attachment_property>() { new attachment_property { name = "category", value = new attachment_property_value { href = "http://www.youtube.com/browse?s=mp&t=t&c=15", text = "humor" } }, new attachment_property { name = "ratings", value = new attachment_property_value { text = "5 stars" } } }; attachment.media = new List<attachment_media>(){new attachment_media_video() { video_src = "http://www.youtube.com/v/fzzjgBAaWZw&hl=en&fs=1", preview_img="http://img.youtube.com/vi/muLIPWjks_M/default.jpg?h=100&w=200&sigh=__wsYqEz4uZUOvBIb8g-wljxpfc3Q=", video_link = "http://www.youtube.com/watch?v=muLIPWjks_M", video_title = "ninja cat" }}; var link = new action_link(); link.href = "http://www.youtube.com/my_videos_upload"; link.text = "Upload a video"; var links = new List<action_link>() { link }; var actual = _api.Stream.Publish("Watch this video!", attachment, links, null, 0); Assert.IsNotNull(actual); }
public void publishTest3() { attachment attachment = new attachment(); attachment.caption = "www.icanhascheezburger.com"; attachment.name = "I am bursting with joy"; attachment.href = "http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/"; attachment.description = "a funny looking cat"; attachment.properties = new List<attachment_property>() { new attachment_property { name = "category", value = new attachment_property_value { href = "http://www.icanhascheezburger.com/category/humor", text = "humor" } }, new attachment_property { name = "ratings", value = new attachment_property_value { text = "5 stars" } } }; attachment.media = new List<attachment_media>(){new attachment_media_image() { src = "http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg", href = "http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/" }}; var link = new action_link(); link.href= "http://mine.icanhascheezburger.com/default.aspx?tiid=1192742&recap=1#step2"; link.text = "Recaption this"; var links = new List<action_link>(){link}; var actual = _api.Stream.Publish("testing stream.publish with image attachment", attachment, links, null, 0); Assert.IsNotNull(actual); }