Exemplo n.º 1
0
        public void update(MobileUserEntity request, Action <InsertUpdateResponse> success, Action <int> failed = null)
        {
            String accessToken = RollaballConfiguration.instance().DataProvider.Load("SAAS_access_token");
            String url         = RollaballConfiguration.serviceRootUrl + "api/content/25e2169f-49a0-4eae-8ace-18e8b867ced8/update_single";

            RollaballConfiguration.instance().ServiceSucceed(true, "MobileUser", "update", url, "25e2169f-49a0-4eae-8ace-18e8b867ced8", "596b84af-6fcd-420c-9f04-389b09d4d78c");
            Dictionary <string, object> queryParams = new Dictionary <string, object> ();
            Dictionary <string, object> pathParams  = new Dictionary <string, object> ();
            object postData = null;



            postData = new ContentUpdateBuilder().build(request);

            HttpHelper.sendRequest <InsertUpdateResponse> (
                "post",
                url,
                pathParams,
                postData,
                (_object) => {
                new ContentUpdateBuilder().update(request, _object);

                success(_object);
                RollaballConfiguration.instance().ServiceSucceed(true, "MobileUser", "update", url, "25e2169f-49a0-4eae-8ace-18e8b867ced8", "596b84af-6fcd-420c-9f04-389b09d4d78c");
            },
                (x) => {
                failed(x);
                RollaballConfiguration.instance().ServiceFailed(true, "MobileUser", "update", url, "25e2169f-49a0-4eae-8ace-18e8b867ced8", "596b84af-6fcd-420c-9f04-389b09d4d78c");
            }
                );
        }
        public static void register(MobileUserEntity mobileUserEntity)
        {
            MobileUsersService mobileUsersService = new MobileUsersService();

            mobileUsersService.signUp(mobileUserEntity, (InsertUpdateResponse insertUpdateResponse) => {
                Debug.Log("successful " + "register: " + insertUpdateResponse.Guid);
            }, (int resultCode) => {
                Debug.Log("failure " + "register:" + resultCode);
            });
        }