Skip to content

Commit

Permalink
Update lexicons fetched from e7a0d27 committed 2023-07-03T16:28:39Z (#85
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MarshalX authored Jul 6, 2023
1 parent 1248241 commit 147e8ed
Show file tree
Hide file tree
Showing 11 changed files with 142 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atproto/ws_client/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
SOFTWARE.
2 changes: 2 additions & 0 deletions atproto/xrpc_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2023 Ilya (Marshal) <https://github.com/MarshalX>.
# 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.
22 changes: 22 additions & 0 deletions atproto/xrpc_client/namespaces/async_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
22 changes: 22 additions & 0 deletions atproto/xrpc_client/namespaces/sync_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions docs/source/atproto/atproto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Subpackages
atproto.lexicon
atproto.nsid
atproto.uri
atproto.ws_client
atproto.xrpc_client
atproto.xrpc_server

Expand Down
15 changes: 15 additions & 0 deletions docs/source/atproto/atproto.ws_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
atproto.ws\_client
==================

.. automodule:: atproto.ws_client
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

atproto.ws_client.transport
7 changes: 7 additions & 0 deletions docs/source/atproto/atproto.ws_client.transport.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
atproto.ws\_client.transport
============================

.. automodule:: atproto.ws_client.transport
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 34 additions & 0 deletions lexicons/app.bsky.unspecced.getTimelineSkeleton.json
Original file line number Diff line number Diff line change
@@ -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"}
]
}
}
}

0 comments on commit 147e8ed

Please sign in to comment.