From 8fbca9161b3247a815d406cc6eeddc8c127f0a22 Mon Sep 17 00:00:00 2001 From: Ilya Siamionau Date: Fri, 12 Jan 2024 20:50:04 +0100 Subject: [PATCH] Update lexicons fetched from 51fcba7 committed 2024-01-09T23:29:07Z (#238) --- docs/source/aliases_db.py | 2 +- ....models.app.bsky.unspecced.get_popular.rst | 7 --- ...proto_client.models.app.bsky.unspecced.rst | 1 - ...ls.com.atproto.admin.get_account_infos.rst | 7 +++ ...tproto_client.models.com.atproto.admin.rst | 1 + lexicons/app.bsky.unspecced.getPopular.json | 40 ---------------- lexicons/com.atproto.admin.defs.json | 23 ++++++++- .../com.atproto.admin.getAccountInfos.json | 36 ++++++++++++++ ...atproto.admin.queryModerationStatuses.json | 4 ++ lexicons/com.atproto.moderation.defs.json | 7 ++- packages/atproto_client/models/__init__.py | 4 +- .../models/app/bsky/unspecced/get_popular.py | 36 -------------- .../models/com/atproto/admin/defs.py | 20 ++++++++ .../com/atproto/admin/get_account_infos.py | 30 ++++++++++++ .../admin/query_moderation_statuses.py | 2 + .../models/com/atproto/moderation/defs.py | 5 ++ .../atproto_client/namespaces/async_ns.py | 48 +++++++++---------- packages/atproto_client/namespaces/sync_ns.py | 48 +++++++++---------- 18 files changed, 182 insertions(+), 139 deletions(-) delete mode 100644 docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_popular.rst create mode 100644 docs/source/atproto/atproto_client.models.com.atproto.admin.get_account_infos.rst delete mode 100644 lexicons/app.bsky.unspecced.getPopular.json create mode 100644 lexicons/com.atproto.admin.getAccountInfos.json delete mode 100644 packages/atproto_client/models/app/bsky/unspecced/get_popular.py create mode 100644 packages/atproto_client/models/com/atproto/admin/get_account_infos.py diff --git a/docs/source/aliases_db.py b/docs/source/aliases_db.py index 0bef239a..ad609ea8 100644 --- a/docs/source/aliases_db.py +++ b/docs/source/aliases_db.py @@ -59,7 +59,6 @@ 'models.AppBskyNotificationUpdateSeen': 'atproto_client.models.app.bsky.notification.update_seen', 'models.AppBskyRichtextFacet': 'atproto_client.models.app.bsky.richtext.facet', 'models.AppBskyUnspeccedDefs': 'atproto_client.models.app.bsky.unspecced.defs', - 'models.AppBskyUnspeccedGetPopular': 'atproto_client.models.app.bsky.unspecced.get_popular', 'models.AppBskyUnspeccedGetPopularFeedGenerators': 'atproto_client.models.app.bsky.unspecced.get_popular_feed_generators', 'models.AppBskyUnspeccedGetTimelineSkeleton': 'atproto_client.models.app.bsky.unspecced.get_timeline_skeleton', 'models.AppBskyUnspeccedSearchActorsSkeleton': 'atproto_client.models.app.bsky.unspecced.search_actors_skeleton', @@ -71,6 +70,7 @@ 'models.ComAtprotoAdminEmitModerationEvent': 'atproto_client.models.com.atproto.admin.emit_moderation_event', 'models.ComAtprotoAdminEnableAccountInvites': 'atproto_client.models.com.atproto.admin.enable_account_invites', 'models.ComAtprotoAdminGetAccountInfo': 'atproto_client.models.com.atproto.admin.get_account_info', + 'models.ComAtprotoAdminGetAccountInfos': 'atproto_client.models.com.atproto.admin.get_account_infos', 'models.ComAtprotoAdminGetInviteCodes': 'atproto_client.models.com.atproto.admin.get_invite_codes', 'models.ComAtprotoAdminGetModerationEvent': 'atproto_client.models.com.atproto.admin.get_moderation_event', 'models.ComAtprotoAdminGetRecord': 'atproto_client.models.com.atproto.admin.get_record', diff --git a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_popular.rst b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_popular.rst deleted file mode 100644 index fa3bb9cc..00000000 --- a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.get_popular.rst +++ /dev/null @@ -1,7 +0,0 @@ -app.bsky.unspecced.get\_popular -====================================================== - -.. automodule:: atproto_client.models.app.bsky.unspecced.get_popular - :members: - :undoc-members: - :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst index b15e2733..e870a814 100644 --- a/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst +++ b/docs/source/atproto/atproto_client.models.app.bsky.unspecced.rst @@ -13,7 +13,6 @@ Submodules :maxdepth: 4 atproto_client.models.app.bsky.unspecced.defs - atproto_client.models.app.bsky.unspecced.get_popular atproto_client.models.app.bsky.unspecced.get_popular_feed_generators atproto_client.models.app.bsky.unspecced.get_timeline_skeleton atproto_client.models.app.bsky.unspecced.search_actors_skeleton diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.get_account_infos.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.get_account_infos.rst new file mode 100644 index 00000000..2f7de376 --- /dev/null +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.get_account_infos.rst @@ -0,0 +1,7 @@ +com.atproto.admin.get\_account\_infos +============================================================ + +.. automodule:: atproto_client.models.com.atproto.admin.get_account_infos + :members: + :undoc-members: + :show-inheritance: \ No newline at end of file diff --git a/docs/source/atproto/atproto_client.models.com.atproto.admin.rst b/docs/source/atproto/atproto_client.models.com.atproto.admin.rst index 8b073eee..77fb99e5 100644 --- a/docs/source/atproto/atproto_client.models.com.atproto.admin.rst +++ b/docs/source/atproto/atproto_client.models.com.atproto.admin.rst @@ -19,6 +19,7 @@ Submodules atproto_client.models.com.atproto.admin.emit_moderation_event atproto_client.models.com.atproto.admin.enable_account_invites atproto_client.models.com.atproto.admin.get_account_info + atproto_client.models.com.atproto.admin.get_account_infos atproto_client.models.com.atproto.admin.get_invite_codes atproto_client.models.com.atproto.admin.get_moderation_event atproto_client.models.com.atproto.admin.get_record diff --git a/lexicons/app.bsky.unspecced.getPopular.json b/lexicons/app.bsky.unspecced.getPopular.json deleted file mode 100644 index 61fe26e8..00000000 --- a/lexicons/app.bsky.unspecced.getPopular.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "lexicon": 1, - "id": "app.bsky.unspecced.getPopular", - "defs": { - "main": { - "type": "query", - "description": "DEPRECATED: will be removed soon. Use a feed generator alternative.", - "parameters": { - "type": "params", - "properties": { - "includeNsfw": { "type": "boolean", "default": false }, - "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#feedViewPost" - } - } - } - } - } - } - } -} diff --git a/lexicons/com.atproto.admin.defs.json b/lexicons/com.atproto.admin.defs.json index fae60e45..55a8b32b 100644 --- a/lexicons/com.atproto.admin.defs.json +++ b/lexicons/com.atproto.admin.defs.json @@ -69,7 +69,8 @@ "#modEventLabel", "#modEventAcknowledge", "#modEventEscalate", - "#modEventMute" + "#modEventMute", + "#modEventResolveAppeal" ] }, "subject": { @@ -167,9 +168,18 @@ "type": "string", "format": "datetime" }, + "lastAppealedAt": { + "type": "string", + "format": "datetime", + "description": "Timestamp referencing when the author of the subject appealed a moderation action" + }, "takendown": { "type": "boolean" }, + "appealed": { + "type": "boolean", + "description": "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators." + }, "suspendUntil": { "type": "string", "format": "datetime" @@ -284,6 +294,7 @@ "did": { "type": "string", "format": "did" }, "handle": { "type": "string", "format": "handle" }, "email": { "type": "string" }, + "relatedRecords": { "type": "array", "items": { "type": "unknown" } }, "indexedAt": { "type": "string", "format": "datetime" }, "invitedBy": { "type": "ref", @@ -469,6 +480,16 @@ } } }, + "modEventResolveAppeal": { + "type": "object", + "description": "Resolve appeal on a subject", + "properties": { + "comment": { + "type": "string", + "description": "Describe resolution." + } + } + }, "modEventComment": { "type": "object", "description": "Add a comment to a subject", diff --git a/lexicons/com.atproto.admin.getAccountInfos.json b/lexicons/com.atproto.admin.getAccountInfos.json new file mode 100644 index 00000000..45d97e08 --- /dev/null +++ b/lexicons/com.atproto.admin.getAccountInfos.json @@ -0,0 +1,36 @@ +{ + "lexicon": 1, + "id": "com.atproto.admin.getAccountInfos", + "defs": { + "main": { + "type": "query", + "description": "Get details about some accounts.", + "parameters": { + "type": "params", + "required": ["dids"], + "properties": { + "dids": { + "type": "array", + "items": { "type": "string", "format": "did" } + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": ["infos"], + "properties": { + "infos": { + "type": "array", + "items": { + "type": "ref", + "ref": "com.atproto.admin.defs#accountView" + } + } + } + } + } + } + } +} diff --git a/lexicons/com.atproto.admin.queryModerationStatuses.json b/lexicons/com.atproto.admin.queryModerationStatuses.json index 98fec5bd..e3e2a859 100644 --- a/lexicons/com.atproto.admin.queryModerationStatuses.json +++ b/lexicons/com.atproto.admin.queryModerationStatuses.json @@ -64,6 +64,10 @@ "type": "boolean", "description": "Get subjects that were taken down" }, + "appealed": { + "type": "boolean", + "description": "Get subjects in unresolved appealed status" + }, "limit": { "type": "integer", "minimum": 1, diff --git a/lexicons/com.atproto.moderation.defs.json b/lexicons/com.atproto.moderation.defs.json index a06579a5..b9e980df 100644 --- a/lexicons/com.atproto.moderation.defs.json +++ b/lexicons/com.atproto.moderation.defs.json @@ -10,7 +10,8 @@ "com.atproto.moderation.defs#reasonMisleading", "com.atproto.moderation.defs#reasonSexual", "com.atproto.moderation.defs#reasonRude", - "com.atproto.moderation.defs#reasonOther" + "com.atproto.moderation.defs#reasonOther", + "com.atproto.moderation.defs#reasonAppeal" ] }, "reasonSpam": { @@ -36,6 +37,10 @@ "reasonOther": { "type": "token", "description": "Other: reports not falling under another report category" + }, + "reasonAppeal": { + "type": "token", + "description": "Appeal: appeal a previously taken moderation action" } } } diff --git a/packages/atproto_client/models/__init__.py b/packages/atproto_client/models/__init__.py index cd98e44a..c6ebdbe6 100644 --- a/packages/atproto_client/models/__init__.py +++ b/packages/atproto_client/models/__init__.py @@ -60,7 +60,6 @@ from atproto_client.models.app.bsky.notification import update_seen as AppBskyNotificationUpdateSeen from atproto_client.models.app.bsky.richtext import facet as AppBskyRichtextFacet from atproto_client.models.app.bsky.unspecced import defs as AppBskyUnspeccedDefs -from atproto_client.models.app.bsky.unspecced import get_popular as AppBskyUnspeccedGetPopular from atproto_client.models.app.bsky.unspecced import ( get_popular_feed_generators as AppBskyUnspeccedGetPopularFeedGenerators, ) @@ -74,6 +73,7 @@ from atproto_client.models.com.atproto.admin import emit_moderation_event as ComAtprotoAdminEmitModerationEvent from atproto_client.models.com.atproto.admin import enable_account_invites as ComAtprotoAdminEnableAccountInvites from atproto_client.models.com.atproto.admin import get_account_info as ComAtprotoAdminGetAccountInfo +from atproto_client.models.com.atproto.admin import get_account_infos as ComAtprotoAdminGetAccountInfos from atproto_client.models.com.atproto.admin import get_invite_codes as ComAtprotoAdminGetInviteCodes from atproto_client.models.com.atproto.admin import get_moderation_event as ComAtprotoAdminGetModerationEvent from atproto_client.models.com.atproto.admin import get_record as ComAtprotoAdminGetRecord @@ -213,7 +213,6 @@ class _Ids: AppBskyNotificationUpdateSeen: str = 'app.bsky.notification.updateSeen' AppBskyRichtextFacet: str = 'app.bsky.richtext.facet' AppBskyUnspeccedDefs: str = 'app.bsky.unspecced.defs' - AppBskyUnspeccedGetPopular: str = 'app.bsky.unspecced.getPopular' AppBskyUnspeccedGetPopularFeedGenerators: str = 'app.bsky.unspecced.getPopularFeedGenerators' AppBskyUnspeccedGetTimelineSkeleton: str = 'app.bsky.unspecced.getTimelineSkeleton' AppBskyUnspeccedSearchActorsSkeleton: str = 'app.bsky.unspecced.searchActorsSkeleton' @@ -225,6 +224,7 @@ class _Ids: ComAtprotoAdminEmitModerationEvent: str = 'com.atproto.admin.emitModerationEvent' ComAtprotoAdminEnableAccountInvites: str = 'com.atproto.admin.enableAccountInvites' ComAtprotoAdminGetAccountInfo: str = 'com.atproto.admin.getAccountInfo' + ComAtprotoAdminGetAccountInfos: str = 'com.atproto.admin.getAccountInfos' ComAtprotoAdminGetInviteCodes: str = 'com.atproto.admin.getInviteCodes' ComAtprotoAdminGetModerationEvent: str = 'com.atproto.admin.getModerationEvent' ComAtprotoAdminGetRecord: str = 'com.atproto.admin.getRecord' diff --git a/packages/atproto_client/models/app/bsky/unspecced/get_popular.py b/packages/atproto_client/models/app/bsky/unspecced/get_popular.py deleted file mode 100644 index 853b0e83..00000000 --- a/packages/atproto_client/models/app/bsky/unspecced/get_popular.py +++ /dev/null @@ -1,36 +0,0 @@ -################################################################## -# 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 - -import typing_extensions as te -from pydantic import Field - -if t.TYPE_CHECKING: - from atproto_client import models -from atproto_client.models import base - - -class Params(base.ParamsModelBase): - """Parameters model for :obj:`app.bsky.unspecced.getPopular`.""" - - cursor: t.Optional[str] = None #: Cursor. - include_nsfw: t.Optional[bool] = Field(default=False, alias='includeNsfw') #: Include nsfw. - limit: t.Optional[int] = Field(default=50, ge=1, le=100) #: Limit. - - -class ParamsDict(te.TypedDict): - cursor: te.NotRequired[t.Optional[str]] #: Cursor. - include_nsfw: te.NotRequired[t.Optional[bool]] #: Include nsfw. - limit: te.NotRequired[t.Optional[int]] #: Limit. - - -class Response(base.ResponseModelBase): - """Output data model for :obj:`app.bsky.unspecced.getPopular`.""" - - feed: t.List['models.AppBskyFeedDefs.FeedViewPost'] #: Feed. - cursor: t.Optional[str] = None #: Cursor. diff --git a/packages/atproto_client/models/com/atproto/admin/defs.py b/packages/atproto_client/models/com/atproto/admin/defs.py index 3156f72e..1f098476 100644 --- a/packages/atproto_client/models/com/atproto/admin/defs.py +++ b/packages/atproto_client/models/com/atproto/admin/defs.py @@ -75,6 +75,7 @@ class ModEventViewDetail(base.ModelBase): 'models.ComAtprotoAdminDefs.ModEventAcknowledge', 'models.ComAtprotoAdminDefs.ModEventEscalate', 'models.ComAtprotoAdminDefs.ModEventMute', + 'models.ComAtprotoAdminDefs.ModEventResolveAppeal', ], Field(discriminator='py_type'), ] #: Event. @@ -130,7 +131,13 @@ class SubjectStatusView(base.ModelBase): updated_at: str = Field( alias='updatedAt' ) #: Timestamp referencing when the last update was made to the moderation status of the subject. + appealed: t.Optional[ + bool + ] = None #: True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators. comment: t.Optional[str] = None #: Sticky comment on the subject. + last_appealed_at: t.Optional[str] = Field( + default=None, alias='lastAppealedAt' + ) #: Timestamp referencing when the author of the subject appealed a moderation action. last_reported_at: t.Optional[str] = Field(default=None, alias='lastReportedAt') #: Last reported at. last_reviewed_at: t.Optional[str] = Field(default=None, alias='lastReviewedAt') #: Last reviewed at. last_reviewed_by: t.Optional[str] = Field(default=None, alias='lastReviewedBy') #: Last reviewed by. @@ -231,6 +238,9 @@ class AccountView(base.ModelBase): ) #: Invited by. invites: t.Optional[t.List['models.ComAtprotoServerDefs.InviteCode']] = None #: Invites. invites_disabled: t.Optional[bool] = Field(default=None, alias='invitesDisabled') #: Invites disabled. + related_records: t.Optional[t.List['UnknownType']] = Field( + default=None, alias='relatedRecords' + ) #: Related records. py_type: te.Literal['com.atproto.admin.defs#accountView'] = Field( default='com.atproto.admin.defs#accountView', alias='$type', frozen=True @@ -421,6 +431,16 @@ class ModEventReverseTakedown(base.ModelBase): ) +class ModEventResolveAppeal(base.ModelBase): + """Definition model for :obj:`com.atproto.admin.defs`. Resolve appeal on a subject.""" + + comment: t.Optional[str] = None #: Describe resolution. + + py_type: te.Literal['com.atproto.admin.defs#modEventResolveAppeal'] = Field( + default='com.atproto.admin.defs#modEventResolveAppeal', alias='$type', frozen=True + ) + + class ModEventComment(base.ModelBase): """Definition model for :obj:`com.atproto.admin.defs`. Add a comment to a subject.""" diff --git a/packages/atproto_client/models/com/atproto/admin/get_account_infos.py b/packages/atproto_client/models/com/atproto/admin/get_account_infos.py new file mode 100644 index 00000000..828e7d76 --- /dev/null +++ b/packages/atproto_client/models/com/atproto/admin/get_account_infos.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 + +import typing_extensions as te + +if t.TYPE_CHECKING: + from atproto_client import models +from atproto_client.models import base + + +class Params(base.ParamsModelBase): + """Parameters model for :obj:`com.atproto.admin.getAccountInfos`.""" + + dids: t.List[str] #: Dids. + + +class ParamsDict(te.TypedDict): + dids: t.List[str] #: Dids. + + +class Response(base.ResponseModelBase): + """Output data model for :obj:`com.atproto.admin.getAccountInfos`.""" + + infos: t.List['models.ComAtprotoAdminDefs.AccountView'] #: Infos. diff --git a/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py b/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py index 794d4384..4e8653b5 100644 --- a/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py +++ b/packages/atproto_client/models/com/atproto/admin/query_moderation_statuses.py @@ -18,6 +18,7 @@ class Params(base.ParamsModelBase): """Parameters model for :obj:`com.atproto.admin.queryModerationStatuses`.""" + appealed: t.Optional[bool] = None #: Get subjects in unresolved appealed status. comment: t.Optional[str] = None #: Search subjects by keyword from comments. cursor: t.Optional[str] = None #: Cursor. ignore_subjects: t.Optional[t.List[str]] = Field(default=None, alias='ignoreSubjects') #: Ignore subjects. @@ -50,6 +51,7 @@ class Params(base.ParamsModelBase): class ParamsDict(te.TypedDict): + appealed: te.NotRequired[t.Optional[bool]] #: Get subjects in unresolved appealed status. comment: te.NotRequired[t.Optional[str]] #: Search subjects by keyword from comments. cursor: te.NotRequired[t.Optional[str]] #: Cursor. ignore_subjects: te.NotRequired[t.Optional[t.List[str]]] #: Ignore subjects. diff --git a/packages/atproto_client/models/com/atproto/moderation/defs.py b/packages/atproto_client/models/com/atproto/moderation/defs.py index 63d3a485..7f66f04b 100644 --- a/packages/atproto_client/models/com/atproto/moderation/defs.py +++ b/packages/atproto_client/models/com/atproto/moderation/defs.py @@ -19,6 +19,7 @@ 'models.ComAtprotoModerationDefs.ReasonSexual', 'models.ComAtprotoModerationDefs.ReasonRude', 'models.ComAtprotoModerationDefs.ReasonOther', + 'models.ComAtprotoModerationDefs.ReasonAppeal', ] #: Reason type ReasonSpam = te.Literal[ @@ -42,3 +43,7 @@ ReasonOther = te.Literal[ 'com.atproto.moderation.defs#reasonOther' ] #: Other: reports not falling under another report category + +ReasonAppeal = te.Literal[ + 'com.atproto.moderation.defs#reasonAppeal' +] #: Appeal: appeal a previously taken moderation action diff --git a/packages/atproto_client/namespaces/async_ns.py b/packages/atproto_client/namespaces/async_ns.py index 33d3a5e0..0d4ac0a0 100644 --- a/packages/atproto_client/namespaces/async_ns.py +++ b/packages/atproto_client/namespaces/async_ns.py @@ -979,31 +979,6 @@ async def update_seen( class UnspeccedNamespace(AsyncNamespaceBase): - async def get_popular( - self, - params: t.Optional[ - t.Union[models.AppBskyUnspeccedGetPopular.Params, models.AppBskyUnspeccedGetPopular.ParamsDict] - ] = None, - **kwargs: t.Any, - ) -> 'models.AppBskyUnspeccedGetPopular.Response': - """DEPRECATED: will be removed soon. Use a feed generator alternative. - - Args: - params: Parameters. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`models.AppBskyUnspeccedGetPopular.Response`: Output model. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - params_model = get_or_create(params, models.AppBskyUnspeccedGetPopular.Params) - response = await self._client.invoke_query( - 'app.bsky.unspecced.getPopular', params=params_model, output_encoding='application/json', **kwargs - ) - return get_response_model(response, models.AppBskyUnspeccedGetPopular.Response) - async def get_popular_feed_generators( self, params: t.Optional[ @@ -1283,6 +1258,29 @@ async def get_account_info( ) return get_response_model(response, models.ComAtprotoAdminDefs.AccountView) + async def get_account_infos( + self, + params: t.Union[models.ComAtprotoAdminGetAccountInfos.Params, models.ComAtprotoAdminGetAccountInfos.ParamsDict], + **kwargs: t.Any, + ) -> 'models.ComAtprotoAdminGetAccountInfos.Response': + """Get details about some accounts. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminGetAccountInfos.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = get_or_create(params, models.ComAtprotoAdminGetAccountInfos.Params) + response = await self._client.invoke_query( + 'com.atproto.admin.getAccountInfos', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoAdminGetAccountInfos.Response) + async def get_invite_codes( self, params: t.Optional[ diff --git a/packages/atproto_client/namespaces/sync_ns.py b/packages/atproto_client/namespaces/sync_ns.py index cdc08e65..4e8a1d60 100644 --- a/packages/atproto_client/namespaces/sync_ns.py +++ b/packages/atproto_client/namespaces/sync_ns.py @@ -979,31 +979,6 @@ def update_seen( class UnspeccedNamespace(NamespaceBase): - def get_popular( - self, - params: t.Optional[ - t.Union[models.AppBskyUnspeccedGetPopular.Params, models.AppBskyUnspeccedGetPopular.ParamsDict] - ] = None, - **kwargs: t.Any, - ) -> 'models.AppBskyUnspeccedGetPopular.Response': - """DEPRECATED: will be removed soon. Use a feed generator alternative. - - Args: - params: Parameters. - **kwargs: Arbitrary arguments to HTTP request. - - Returns: - :obj:`models.AppBskyUnspeccedGetPopular.Response`: Output model. - - Raises: - :class:`atproto.exceptions.AtProtocolError`: Base exception. - """ - params_model = get_or_create(params, models.AppBskyUnspeccedGetPopular.Params) - response = self._client.invoke_query( - 'app.bsky.unspecced.getPopular', params=params_model, output_encoding='application/json', **kwargs - ) - return get_response_model(response, models.AppBskyUnspeccedGetPopular.Response) - def get_popular_feed_generators( self, params: t.Optional[ @@ -1283,6 +1258,29 @@ def get_account_info( ) return get_response_model(response, models.ComAtprotoAdminDefs.AccountView) + def get_account_infos( + self, + params: t.Union[models.ComAtprotoAdminGetAccountInfos.Params, models.ComAtprotoAdminGetAccountInfos.ParamsDict], + **kwargs: t.Any, + ) -> 'models.ComAtprotoAdminGetAccountInfos.Response': + """Get details about some accounts. + + Args: + params: Parameters. + **kwargs: Arbitrary arguments to HTTP request. + + Returns: + :obj:`models.ComAtprotoAdminGetAccountInfos.Response`: Output model. + + Raises: + :class:`atproto.exceptions.AtProtocolError`: Base exception. + """ + params_model = get_or_create(params, models.ComAtprotoAdminGetAccountInfos.Params) + response = self._client.invoke_query( + 'com.atproto.admin.getAccountInfos', params=params_model, output_encoding='application/json', **kwargs + ) + return get_response_model(response, models.ComAtprotoAdminGetAccountInfos.Response) + def get_invite_codes( self, params: t.Optional[