diff --git a/atproto/ws_client/LICENSE b/atproto/ws_client/LICENSE index 91cfe5a7..f8a47eef 100644 --- a/atproto/ws_client/LICENSE +++ b/atproto/ws_client/LICENSE @@ -25,4 +25,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/atproto/xrpc_client/models/__init__.py b/atproto/xrpc_client/models/__init__.py index f0eedfb3..cbb7990e 100644 --- a/atproto/xrpc_client/models/__init__.py +++ b/atproto/xrpc_client/models/__init__.py @@ -52,6 +52,7 @@ from atproto.xrpc_client.models.app.bsky.unspecced import ( get_popular_feed_generators as AppBskyUnspeccedGetPopularFeedGenerators, ) +from atproto.xrpc_client.models.app.bsky.unspecced import get_timeline_skeleton as AppBskyUnspeccedGetTimelineSkeleton from atproto.xrpc_client.models.com.atproto.admin import defs as ComAtprotoAdminDefs from atproto.xrpc_client.models.com.atproto.admin import disable_account_invites as ComAtprotoAdminDisableAccountInvites from atproto.xrpc_client.models.com.atproto.admin import disable_invite_codes as ComAtprotoAdminDisableInviteCodes @@ -132,6 +133,7 @@ class _Ids: AppBskyNotificationUpdateSeen: str = 'app.bsky.notification.updateSeen' AppBskyNotificationListNotifications: str = 'app.bsky.notification.listNotifications' AppBskyNotificationGetUnreadCount: str = 'app.bsky.notification.getUnreadCount' + AppBskyUnspeccedGetTimelineSkeleton: str = 'app.bsky.unspecced.getTimelineSkeleton' AppBskyUnspeccedGetPopularFeedGenerators: str = 'app.bsky.unspecced.getPopularFeedGenerators' AppBskyUnspeccedGetPopular: str = 'app.bsky.unspecced.getPopular' AppBskyGraphGetLists: str = 'app.bsky.graph.getLists' diff --git a/atproto/xrpc_client/models/app/bsky/unspecced/get_timeline_skeleton.py b/atproto/xrpc_client/models/app/bsky/unspecced/get_timeline_skeleton.py new file mode 100644 index 00000000..61446ae7 --- /dev/null +++ b/atproto/xrpc_client/models/app/bsky/unspecced/get_timeline_skeleton.py @@ -0,0 +1,30 @@ +################################################################## +# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS! +# Copyright (C) 2023 Ilya (Marshal) . +# This file is part of Python atproto SDK. Licenced under MIT. +################################################################## + + +import typing as t +from dataclasses import dataclass + +from atproto.xrpc_client import models +from atproto.xrpc_client.models import base + + +@dataclass +class Params(base.ParamsModelBase): + + """Parameters model for :obj:`app.bsky.unspecced.getTimelineSkeleton`.""" + + cursor: t.Optional[str] = None #: Cursor. + limit: t.Optional[int] = None #: Limit. + + +@dataclass +class Response(base.ResponseModelBase): + + """Output data model for :obj:`app.bsky.unspecced.getTimelineSkeleton`.""" + + feed: t.List['models.AppBskyFeedDefs.SkeletonFeedPost'] #: Feed. + cursor: t.Optional[str] = None #: Cursor. diff --git a/atproto/xrpc_client/namespaces/async_ns.py b/atproto/xrpc_client/namespaces/async_ns.py index 8b6e0487..b8e332da 100644 --- a/atproto/xrpc_client/namespaces/async_ns.py +++ b/atproto/xrpc_client/namespaces/async_ns.py @@ -724,6 +724,28 @@ async def get_popular_feed_generators(self, **kwargs) -> 'models.AppBskyUnspecce ) return get_response_model(response, models.AppBskyUnspeccedGetPopularFeedGenerators.Response) + async def get_timeline_skeleton( + self, params: t.Optional[t.Union[dict, 'models.AppBskyUnspeccedGetTimelineSkeleton.Params']] = None, **kwargs + ) -> 'models.AppBskyUnspeccedGetTimelineSkeleton.Response': + """A skeleton of a timeline - UNSPECCED & WILL GO AWAY SOON. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyUnspeccedGetTimelineSkeleton.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + + params_model = get_or_create_model(params, models.AppBskyUnspeccedGetTimelineSkeleton.Params) + response = await self._client.invoke_query( + 'app.bsky.unspecced.getTimelineSkeleton', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyUnspeccedGetTimelineSkeleton.Response) + class NotificationNamespace(AsyncNamespaceBase): async def get_unread_count( diff --git a/atproto/xrpc_client/namespaces/sync_ns.py b/atproto/xrpc_client/namespaces/sync_ns.py index b4348b9a..17f0b549 100644 --- a/atproto/xrpc_client/namespaces/sync_ns.py +++ b/atproto/xrpc_client/namespaces/sync_ns.py @@ -724,6 +724,28 @@ def get_popular_feed_generators(self, **kwargs) -> 'models.AppBskyUnspeccedGetPo ) return get_response_model(response, models.AppBskyUnspeccedGetPopularFeedGenerators.Response) + def get_timeline_skeleton( + self, params: t.Optional[t.Union[dict, 'models.AppBskyUnspeccedGetTimelineSkeleton.Params']] = None, **kwargs + ) -> 'models.AppBskyUnspeccedGetTimelineSkeleton.Response': + """A skeleton of a timeline - UNSPECCED & WILL GO AWAY SOON. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.AppBskyUnspeccedGetTimelineSkeleton.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + + params_model = get_or_create_model(params, models.AppBskyUnspeccedGetTimelineSkeleton.Params) + response = self._client.invoke_query( + 'app.bsky.unspecced.getTimelineSkeleton', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.AppBskyUnspeccedGetTimelineSkeleton.Response) + class NotificationNamespace(NamespaceBase): def get_unread_count( diff --git a/docs/source/atproto/atproto.rst b/docs/source/atproto/atproto.rst index 987407cc..7c67682f 100644 --- a/docs/source/atproto/atproto.rst +++ b/docs/source/atproto/atproto.rst @@ -22,6 +22,7 @@ Subpackages atproto.lexicon atproto.nsid atproto.uri + atproto.ws_client atproto.xrpc_client atproto.xrpc_server diff --git a/docs/source/atproto/atproto.ws_client.rst b/docs/source/atproto/atproto.ws_client.rst new file mode 100644 index 00000000..dc73abc2 --- /dev/null +++ b/docs/source/atproto/atproto.ws_client.rst @@ -0,0 +1,15 @@ +atproto.ws\_client +================== + +.. automodule:: atproto.ws_client + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +.. toctree:: + :maxdepth: 4 + + atproto.ws_client.transport diff --git a/docs/source/atproto/atproto.ws_client.transport.rst b/docs/source/atproto/atproto.ws_client.transport.rst new file mode 100644 index 00000000..4ecf3b58 --- /dev/null +++ b/docs/source/atproto/atproto.ws_client.transport.rst @@ -0,0 +1,7 @@ +atproto.ws\_client.transport +============================ + +.. automodule:: atproto.ws_client.transport + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.get_timeline_skeleton.rst b/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.get_timeline_skeleton.rst new file mode 100644 index 00000000..19d441c5 --- /dev/null +++ b/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.get_timeline_skeleton.rst @@ -0,0 +1,7 @@ +app.bsky.unspecced.get\_timeline\_skeleton +====================================================================== + +.. automodule:: atproto.xrpc_client.models.app.bsky.unspecced.get_timeline_skeleton + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.rst b/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.rst index 957e670d..6a90145c 100644 --- a/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.rst +++ b/docs/source/atproto/atproto.xrpc_client.models.app.bsky.unspecced.rst @@ -14,3 +14,4 @@ Submodules atproto.xrpc_client.models.app.bsky.unspecced.get_popular atproto.xrpc_client.models.app.bsky.unspecced.get_popular_feed_generators + atproto.xrpc_client.models.app.bsky.unspecced.get_timeline_skeleton diff --git a/lexicons/app.bsky.unspecced.getTimelineSkeleton.json b/lexicons/app.bsky.unspecced.getTimelineSkeleton.json new file mode 100644 index 00000000..7ac6d7db --- /dev/null +++ b/lexicons/app.bsky.unspecced.getTimelineSkeleton.json @@ -0,0 +1,34 @@ +{ + "lexicon": 1, + "id": "app.bsky.unspecced.getTimelineSkeleton", + "defs": { + "main": { + "type": "query", + "description": "A skeleton of a timeline - UNSPECCED & WILL GO AWAY SOON", + "parameters": { + "type": "params", + "properties": { + "limit": {"type": "integer", "minimum": 1, "maximum": 100, "default": 50}, + "cursor": {"type": "string"} + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["feed"], + "properties": { + "cursor": {"type": "string"}, + "feed": { + "type": "array", + "items": {"type": "ref", "ref": "app.bsky.feed.defs#skeletonFeedPost"} + } + } + } + }, + "errors": [ + {"name": "UnknownFeed"} + ] + } + } +}