예제 #1
0
        public async Task <IActionResult> GetArticlesByAlias(string alias)
        {
            if (alias == null)
            {
                return(BadRequest());
            }

            var papers = await PapersWrapper.Get(alias);

            if (papers == null)
            {
                return(NotFound());
            }

            return(Ok(papers));
        }
예제 #2
0
        public async Task <IActionResult> GetArticleByPMID(int?pmid)
        {
            if (pmid == null)
            {
                return(BadRequest());
            }

            var paper = await PapersWrapper.Get(pmid);

            if (paper == null)
            {
                return(NotFound());
            }

            return(Ok(paper));
        }