示例#1
0
文件: Copy.cs 项目: ywscr/ShareX
        // 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);

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

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

            return(account);
        }
示例#2
0
文件: Copy.cs 项目: ywscr/ShareX
 public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo) : this(oauth)
 {
     AccountInfo = accountInfo;
 }
示例#3
0
文件: Copy.cs 项目: Maximus325/ShareX
 public Copy(OAuthInfo oauth, CopyAccountInfo accountInfo)
     : this(oauth)
 {
     AccountInfo = accountInfo;
 }