-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from mnogu/create-pull-request/patch
Update atproto
- Loading branch information
Showing
13 changed files
with
174 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
"""""" | ||
from __future__ import annotations | ||
import chitose | ||
|
||
def _get_records(call: chitose.xrpc.XrpcCall, uris: list[str]) -> bytes: | ||
"""Get details about some records.""" | ||
return call('tools.ozone.moderation.getRecords', [('uris', uris)], None, {}) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
"""""" | ||
from __future__ import annotations | ||
import chitose | ||
|
||
def _get_repos(call: chitose.xrpc.XrpcCall, dids: list[str]) -> bytes: | ||
"""Get details about some repositories.""" | ||
return call('tools.ozone.moderation.getRepos', [('dids', dids)], None, {}) |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
from __future__ import annotations | ||
from chitose.xrpc import XrpcCall | ||
from chitose.xrpc import XrpcSubscribe | ||
from .find_correlation import _find_correlation | ||
from .find_related_accounts import _find_related_accounts | ||
from .search_accounts import _search_accounts | ||
import typing | ||
|
||
class Signature_: | ||
"""We recommend calling methods in this class via the :doc:`chitose.BskyAgent <chitose>` class instead of creating instances of this class directly.""" | ||
|
||
def __init__(self, call: XrpcCall, subscribe: XrpcSubscribe) -> None: | ||
self.call = call | ||
self.subscribe = subscribe | ||
|
||
def find_correlation(self, dids: list[str]) -> bytes: | ||
"""Find all correlated threat signatures between 2 or more accounts.""" | ||
return _find_correlation(self.call, dids) | ||
|
||
def find_related_accounts(self, did: str, cursor: typing.Optional[str]=None, limit: typing.Optional[int]=None) -> bytes: | ||
"""Get accounts that share some matching threat signatures with the root account.""" | ||
return _find_related_accounts(self.call, did, cursor, limit) | ||
|
||
def search_accounts(self, values: list[str], cursor: typing.Optional[str]=None, limit: typing.Optional[int]=None) -> bytes: | ||
"""Search for accounts that match one or more threat signature values.""" | ||
return _search_accounts(self.call, values, cursor, limit) |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
"""""" | ||
from __future__ import annotations | ||
import chitose | ||
import typing | ||
|
||
class SigDetail(chitose.Object): | ||
"""""" | ||
|
||
def __init__(self, property: str, value: str) -> None: | ||
self.property = property | ||
self.value = value | ||
|
||
def to_dict(self) -> dict[str, typing.Any]: | ||
return {'property': self.property, 'value': self.value, '$type': 'tools.ozone.signature.defs#sigDetail'} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
"""""" | ||
from __future__ import annotations | ||
import chitose | ||
|
||
def _find_correlation(call: chitose.xrpc.XrpcCall, dids: list[str]) -> bytes: | ||
"""Find all correlated threat signatures between 2 or more accounts.""" | ||
return call('tools.ozone.signature.findCorrelation', [('dids', dids)], None, {}) |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
"""""" | ||
from __future__ import annotations | ||
import chitose | ||
import chitose.com.atproto.admin.defs | ||
import chitose.tools.ozone.signature.defs | ||
import typing | ||
|
||
def _find_related_accounts(call: chitose.xrpc.XrpcCall, did: str, cursor: typing.Optional[str]=None, limit: typing.Optional[int]=None) -> bytes: | ||
"""Get accounts that share some matching threat signatures with the root account.""" | ||
return call('tools.ozone.signature.findRelatedAccounts', [('did', did), ('cursor', cursor), ('limit', limit)], None, {}) | ||
|
||
class RelatedAccount(chitose.Object): | ||
"""""" | ||
|
||
def __init__(self, account: chitose.com.atproto.admin.defs.AccountView, similarities: typing.Optional[list[chitose.tools.ozone.signature.defs.SigDetail]]=None) -> None: | ||
self.account = account | ||
self.similarities = similarities | ||
|
||
def to_dict(self) -> dict[str, typing.Any]: | ||
return {'account': self.account, 'similarities': self.similarities, '$type': 'tools.ozone.signature.findRelatedAccounts#relatedAccount'} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# GENERATED CODE - DO NOT MODIFY | ||
"""""" | ||
from __future__ import annotations | ||
import chitose | ||
import typing | ||
|
||
def _search_accounts(call: chitose.xrpc.XrpcCall, values: list[str], cursor: typing.Optional[str]=None, limit: typing.Optional[int]=None) -> bytes: | ||
"""Search for accounts that match one or more threat signature values.""" | ||
return call('tools.ozone.signature.searchAccounts', [('values', values), ('cursor', cursor), ('limit', limit)], None, {}) |
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
chitose.tools.ozone.signature package | ||
===================================== | ||
|
||
Submodules | ||
---------- | ||
|
||
chitose.tools.ozone.signature.defs module | ||
----------------------------------------- | ||
|
||
.. automodule:: chitose.tools.ozone.signature.defs | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
chitose.tools.ozone.signature.find\_correlation module | ||
------------------------------------------------------ | ||
|
||
.. automodule:: chitose.tools.ozone.signature.find_correlation | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
chitose.tools.ozone.signature.find\_related\_accounts module | ||
------------------------------------------------------------ | ||
|
||
.. automodule:: chitose.tools.ozone.signature.find_related_accounts | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
chitose.tools.ozone.signature.search\_accounts module | ||
----------------------------------------------------- | ||
|
||
.. automodule:: chitose.tools.ozone.signature.search_accounts | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
||
Module contents | ||
--------------- | ||
|
||
.. automodule:: chitose.tools.ozone.signature | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |