diff --git a/api_24ur/client.py b/api_24ur/client.py index dd9e4a4..79ea455 100644 --- a/api_24ur/client.py +++ b/api_24ur/client.py @@ -60,6 +60,7 @@ async def get_article_by_url( return types.Article( id=article.id, + author=article.source, title=article.title, summary=article.summary, content='\n'.join([item.body if item.body else '' for item in article.body_items or []]), diff --git a/api_24ur/schemas.py b/api_24ur/schemas.py index b55c17a..1f6b16a 100644 --- a/api_24ur/schemas.py +++ b/api_24ur/schemas.py @@ -1,5 +1,4 @@ import dataclasses -import datetime import typing diff --git a/api_24ur/types.py b/api_24ur/types.py index a7519fa..bd4df73 100644 --- a/api_24ur/types.py +++ b/api_24ur/types.py @@ -32,6 +32,7 @@ class Comment: @dataclasses.dataclass class Article: id: typing.Optional[str] = None + author: typing.Optional[str] = None title: typing.Optional[str] = None summary: typing.Optional[str] = None content: typing.Optional[str] = None diff --git a/pyproject.toml b/pyproject.toml index c2aa1f5..6af5b5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "24ur-api" description = "Unofficial 24ur API" -version = "0.1.2" +version = "0.1.3" readme = "README.md" authors = [{ name = "Amadej Kastelic", email = "amadejkastelic7@gmail.com" }] requires-python = "~=3.8"