public string GetVredditId() { if (GetContentType() != ContentType.Vreddit) { return(""); } string id = UrlPost.Substring(UrlPost.IndexOf("comments/") + 9); id = id.Substring(0, id.IndexOf("/")); return(id); }
public IHttpActionResult GetWechatConfig([FromBody] UrlPost post) { try { if (string.IsNullOrEmpty(post.url)) { throw new ArgumentNullException("url"); } return(Ok(JSSDK.GetWxConfig(post.url))); } catch (Exception ex) { log.Error(ex); return(InternalServerError(ex)); } }