Ejemplo n.º 1
0
        /// <summary>
        /// Fetch basic account details and credits balance
        /// </summary>
        /// <returns></returns>
        public AccountResult Account()
        {
            var r = new AccountResult();

            try
            {
                if (AccountProvider == null)
                {
                    AccountProvider = new AccountProvider();
                }
                var json = AccountProvider.Get(Url, _proxy, KeyPublic, KeySecret);
                r = JsonConvert.DeserializeObject <AccountResult>(json.Replace("\"results\":[", "\"resultsArray\":["));
            }
            catch (Exception err)
            {
                r.Status.Code = -1;
                r.Status.Msg  = err.Message;
            }
            return(r);
        }