Example #1
0
        // https://developers.copy.com/documentation#api-calls/profile
        public CopyAccountInfo GetAccountInfo()
        {
            CopyAccountInfo account = null;

            if (OAuthInfo.CheckOAuth(AuthInfo))
            {
                string query = OAuthManager.GenerateQuery(URLAccountInfo, null, HttpMethod.GET, AuthInfo);

                string response = SendRequest(HttpMethod.GET, query, null, APIHeaders, responseType: ResponseType.Text);

                if (!string.IsNullOrEmpty(response))
                {
                    account = JsonConvert.DeserializeObject <CopyAccountInfo>(response);

                    if (account != null)
                    {
                        AccountInfo = account;
                    }
                }
            }

            return(account);
        }
Example #2
0
 public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo)
     : this(oauth)
 {
     AccountInfo = accountInfo;
 }
Example #3
0
 public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo)
     : this(oauth)
 {
     AccountInfo = accountInfo;
 }