Пример #1
0
        private static DOAJWorks GetJournals(string title)
        {
            string    cadena    = "https://doaj.org/api/v2/search/journals/title:\"" + title + "\"";
            var       doc       = new WebClient().DownloadString(cadena);
            DOAJWorks doajWorks = JsonSerializer.Deserialize <DOAJWorks>(doc);

            return(doajWorks);
        }
Пример #2
0
        public static DOAJWorks GetWorks(string title)
        {
            DOAJWorks works = new DOAJWorks();

            works.results = new Result[] { };
            DOAJWorks articles = GetArticles(title);

            if (articles != null && articles.results != null)
            {
                works.results = works.results.Union(articles.results).ToArray();
            }
            DOAJWorks journals = GetJournals(title);

            if (journals != null && journals.results != null)
            {
                works.results = works.results.Union(journals.results).ToArray();
            }
            return(works);
        }