public IEnumerator GetUsersGlyphIsSharedWith(Glyph glyph) { Debug.Log("Getting shared users for: " + glyph.GetGlyphId()); Dictionary <string, string> data = new Dictionary <string, string>(); data ["glyphid"] = "" + glyph.GetGlyphId(); ServerCall waitFor = new ServerCall(INSTANCE.SendServerInformationRequest(GET_USERS_GLYPH_IS_SHARED_WITH, data)); yield return(StartCoroutine(waitFor.call())); string infoText = waitFor.Response; Debug.Log("Received " + infoText); UserSharedGlyphEvent.UserSharedGlyphEventList list = JsonUtility.FromJson <UserSharedGlyphEvent.UserSharedGlyphEventList>(infoText); yield return(list); }
private IEnumerator RetrieveUsersGlyphIsSharedWith() { ServerCall getUsersCall = new ServerCall(ServerInteract.INSTANCE.GetUsersGlyphIsSharedWith(currentGlyph)); yield return(StartCoroutine(getUsersCall.call())); if (getUsersCall.ReturnException != null) { throw getUsersCall.ReturnException; } else { UserSharedGlyphEvent.UserSharedGlyphEventList userList = (UserSharedGlyphEvent.UserSharedGlyphEventList)getUsersCall.ObjectResponse; currentGlyph.sharedEvents = userList.sharedWith; resetListToDefault(); } yield return("Done"); }