public SubjectVO deserializeToSubject (string response){ IDictionary search = Json.Deserialize(response) as IDictionary; SubjectVO subject = new SubjectVO(); subject.name = search["name"].ToString(); subject.group_id = search["group"].ToString(); return subject; }
public IEnumerator GetPointerBySubject (SubjectVO subject){ //https://popping-fire-7321.firebaseio.com/pointer.json?orderBy="subject"&equalTo="-KE7_i9kraAcrPa5XwI3"&print=pretty' string url = "pointer.json?orderBy=\"subject\"&equalTo=\"" + subject.key + "\""; CoroutineWithData cd = new CoroutineWithData(this, myFirebase.GET(url)); yield return cd.coroutine; PointerVO pointer = customDeserializer.deserializeToPointer(cd.result.ToString()); Debug.Log("Pointer from Subject: " + pointer.subject_id); yield return pointer; }
public IEnumerator GetSubjectContentList (SubjectVO subject) { //'https://popping-fire-7321.firebaseio.com/content.json?orderBy="subject"&equalTo="-KE7_i9kraAcrPa5XwI3"&print=pretty' string url = "content.json?orderBy=\"subject\"&equalTo=\"" + subject.key + "\""; CoroutineWithData cd = new CoroutineWithData(this, myFirebase.GET(url)); yield return cd.coroutine; IList<ContentVO> contents = customDeserializer.deserializeToListContent(cd.result.ToString()); yield return contents; }