コード例 #1
0
 public IHttpActionResult Complete()
 {
     _configuration.Add("code", HttpContext.Current.Request.QueryString["code"]);
     var mco = new MailChimpOAuth(_configuration);
     var accessToken = mco.getSession();
     var restInfo = (mco.getMetaData());
     if (!string.IsNullOrEmpty(accessToken) && restInfo != null)
     {
         _settingsManager.SetValue(_accessTokenPropertyName, accessToken);
         _settingsManager.SetValue(_dataCenterPropertyName, restInfo.dc);
         SetDefaultSubscribersList(accessToken, restInfo.dc);
     }
     return Ok();
 }
コード例 #2
0
 public IHttpActionResult Authorize()
 {
     var mco = new MailChimpOAuth(_configuration);
     var retVal = mco.getLoginURL();
     return Ok();
 }