Пример #1
0
 // Use this for initialization
 void Awake()
 {
     PreferenceList = new MyPreference();
     gameObject.AddComponent <httpRequest>();
     myApi = gameObject.GetComponent <httpRequest>();
     myApi.GET("http://ec2-52-15-84-235.us-east-2.compute.amazonaws.com/myFYP/public/api/getGeneralPreferenceList");
     StartCoroutine(getRequesting());
 }
Пример #2
0
        public virtual JsonResult Put(MyPreference model)
        {
            var command = new UpdateMyPreference(User, Request.AnonymousID);

            Mapper.Map(model, command);
            _preferences.Handle(command);
            return(Json(null));
        }
Пример #3
0
    private IEnumerator getRequesting()
    {
        yield return(myApi.httpResponse);

        //Debug.Log(myApi.getResult());
        PreferenceList = MyPreference.CreateFromJSON(myApi.getResult());
        UpdateBoardcast();
    }