public static UserProfileReply AccountDetailsToUserProfileReply(AccountDetailsResponse accountResponse) { UserProfileReply reply = new UserProfileReply(true); reply.id = accountResponse.UserId; reply.fbid = accountResponse.ExternalIds.GetString("FB").ToString(); reply.name = accountResponse.DisplayName; GSData profile = accountResponse.ScriptData.GetObject("profile"); GSData stats = accountResponse.ScriptData.GetObject("stats"); GSData bidding = accountResponse.ScriptData.GetObject("bidding"); reply.countryCode = profile.GetString("country"); reply.mood = profile.GetInt("mood").Value; reply.price = stats.GetInt("price").Value; reply.status = profile.GetString("status"); reply.pics = profile.GetStringList("pics"); reply.videos = profile.GetStringList("videos"); reply.exp = stats.GetInt("exp").Value; reply.energy = stats.GetInt("energy").Value; reply.money = stats.GetInt("money").Value; reply.tokens = stats.GetInt("tokens").Value; reply.newMessages = reply.newGifts = 0; reply.bidderId = bidding.GetString("bidderId"); reply.bidderFbid = bidding.GetString("bidderFbid"); reply.bidderName = bidding.GetString("bidderName"); reply.bidderCountry = bidding.GetString("bidderCountry"); reply.lastAction = bidding.GetDate("lastAction"); reply.lockEnd = bidding.GetDate("lockEnd"); return(reply); }
void UserProfileCallback(UserProfileReply reply) { userName.text = reply.name; userPrice.text = "$" + reply.price; profilePic.mainTexture = reply.picture; smallUserName.text = reply.name; smallProfilePic.mainTexture = reply.picture; userNameAbout.text = reply.name; }
void UserProfileCallback(UserProfileReply reply) { if (reply.Success) { Debug.Log("User Profile: " + reply.name + "-" + reply.fbid + "-" + reply.id + "-" + reply.countryCode + "-" + reply.mood + "-" + reply.bidderId + "-" + reply.bidderCountry + "-" + reply.bidderName + "-" + reply.energy + "-" + reply.exp + "-" + reply.money + "-" + reply.tokens); img.sprite = Sprite.Create(reply.picture, new Rect(0, 0, reply.picture.width, reply.picture.height), 0.5f * Vector2.one); TestMarketUsers(); } else { Debug.Log("Fetching user profile failed"); } }
public static UserProfileReply UserProfileResponseToUserProfileReply(LogEventResponse profileResponse) { UserProfileReply reply = new UserProfileReply(true); reply.id = profileResponse.ScriptData.GetString("id"); reply.fbid = profileResponse.ScriptData.GetString("fbid"); reply.name = profileResponse.ScriptData.GetString("name"); GSData profile = profileResponse.ScriptData.GetObject("profile"); GSData stats = profileResponse.ScriptData.GetObject("stats"); reply.countryCode = profile.GetString("country"); reply.mood = profile.GetInt("mood").Value; reply.price = stats.GetInt("price").Value; reply.status = profile.GetString("status"); reply.pics = profile.GetStringList("pics"); reply.videos = profile.GetStringList("videos"); return(reply); }