public IActionResult GetTagByUrl([FromBody] RequestByUrl request) { var response = _tagRepository.FindByUrl(request.Url); if (response == null) { return(BadRequest("Tag not found")); } return(Ok(response)); }
public ActionResult GetVideoByUrl([FromBody] RequestByUrl request) { var response = _fileSaveRepository.GetByUrl(request.Url); if (response == null) { return(BadRequest("Video not found")); } return(File(response.FileData, response.FileType)); }
public IActionResult GetCategoryByUrl([FromBody] RequestByUrl request) { var response = _categoryRepository.FindByUrl(request.Url); if (response == null) { return(BadRequest("Category not found")); } return(Ok(response)); }
private async Task <int> GetIdAccount() { var html = await RequestByUrl.Get(@"http://acmp.ru/inc/passport.asp?lgn=" + _acmpUserData + "&password="******"<tr><td align=left>ID</td><td style='color: black; font-size: 11pt'>\d*<br></td></tr>"); var id = regex .Matches(html)[0] .Groups[0] .Value .Replace("<br></td></tr>", "") .Replace("<tr><td align=left>ID</td><td style='color: black; font-size: 11pt'>", ""); return(int.Parse(id)); }