public void GetProfilePictureBlocking() { // "The tiniest gif ever" , a 1x1 gif // http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever var tinyGif = Convert.FromBase64String("R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="); member.SetProfilePictureBlocking("image/gif", tinyGif); var otherMember = tokenClient.CreateMemberBlocking(); var blob = otherMember.GetProfilePictureBlocking(member.MemberId(), Original); var tinyGifString = ByteString.CopyFrom(tinyGif); Assert.Equal(tinyGifString, blob.Payload.Data); // Because our example picture is so small, asking for a "small" version // gets us the original var sameBlob = otherMember.GetProfilePictureBlocking(member.MemberId(), Small); Assert.Equal(tinyGifString, sameBlob.Payload.Data); }
/// <summary> /// Sets a profile name and picture. /// </summary> /// <param name="member">member</param> /// <returns>profile</returns> public static Profile profiles(Member member) { Profile name = new Profile { DisplayNameFirst = "Tycho", DisplayNameLast = "Nestoris" }; member.SetProfileBlocking(name); member.SetProfilePictureBlocking("image/jpeg", PICTURE); Profile profile = member.GetProfileBlocking(member.MemberId()); return(profile); }