-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f4de85
commit 500f471
Showing
4 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
microservices/external_data_query/external_data_query/pubmed/api_models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
from __future__ import annotations | ||
|
||
import dataclasses | ||
from pydantic.dataclasses import dataclass | ||
from typing import List, Optional | ||
|
||
from external_data_query.mixins import BaseModelMixin | ||
|
||
@dataclasses.dataclass | ||
@dataclass | ||
class FetchedArticle: | ||
title: str | ||
summary: str | ||
link: str | ||
|
||
|
||
@dataclasses.dataclass | ||
@dataclass | ||
class PubMedSearchRequest(BaseModelMixin): | ||
search_terms: str | ||
max_results: int | ||
api_key: Optional[str] = None | ||
job_id: Optional[str] = None | ||
|
||
@dataclasses.dataclass | ||
@dataclass | ||
class PubMedSearchResponse(BaseModelMixin): | ||
articles: List[FetchedArticle] | ||
|
||
|
||
@dataclasses.dataclass | ||
@dataclass | ||
class IsJobRunningResponse: | ||
is_running: bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters