Misskey class
MisskeyのAPIプレフィックスは /api/
です。
Endpoint |
Method |
---|---|
Meta |
|
|
|
|
|
|
|
Account(i) |
|
|
|
|
|
|
|
|
|
|
|
|
|
Note |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Users |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Relationships |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Drive |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Notifications |
|
|
- class misskey.Misskey(address: str = 'https://misskey.io', i: Optional[str] = None, session: Optional[requests.sessions.Session] = None)[ソース]
Misskey API client class.
- Args:
address (str): Instance address. You can also include the URL protocol. If not specified, it will be automatically recognized as
https
.i (
str
, optional): Misskey API token. If you have an API token, you can assign it at instantiation.session (
requests.Session
, optional): If you have prepared therequests.Session
class yourself, you can assign it here. Normally you do not need to specify it.- Raises:
MisskeyAuthorizeFailedException: Raises if token validation fails during instantiation.
- property address
Misskey instance address. Cannot be edited.
- announcements(limit: int = 10, with_unreads: bool = True, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Get announcements.
- Endpoint:
announcements
- Returns:
list of dict: List of announcements.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- blocking_create(user_id: str) dict [ソース]
Block the specified user.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
blocking/create
- Returns:
dict: Returns the blocking information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- blocking_delete(user_id: str) dict [ソース]
Unblock the specified user.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
blocking/delete
- Returns:
dict: Returns the blocking information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- blocking_list(limit: int = 30, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Get list of blocked users.
- Args:
limit (int): Specify the number of users to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
- Endpoint:
blocking/list
- Returns:
list
ofdict
: Returns the list of blocked users.
- drive() dict [ソース]
Get drive usage information.
- Endpoint:
drive
- Returns:
dict: Returns the drive usage information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, folder_id: Optional[str] = None, file_type: Optional[str] = None) List[dict] [ソース]
Get drive files in specified folder(optional).
- Args:
limit (int): Specify the number of files to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
folder_id (str, optional): Specify the folder ID.
file_type (str, optional): Specify the file type.
- Endpoint:
drive/files
- Returns:
list
ofdict
: Returns the list of files.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_attached_notes(file_id: str) List[dict] [ソース]
Get notes that have the specified file.
- Args:
file_id (str): Specify the file ID.
- Endpoint:
drive/files/attached-notes
- Returns:
list
ofdict
: Returns the list of notes.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_check_existence(md5: str) bool [ソース]
Validate if the specified md5 hash exists in the drive.
- Args:
md5 (str): Specify the md5 hash.
- Endpoint:
drive/files/check-existence
- Returns:
bool: Returns
True
if the file exists.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_create(file: IO, folder_id: Optional[str] = None, name: Optional[str] = None, is_sensitive: bool = False, force: bool = False) dict [ソース]
Upload a file to the drive.
- Args:
file (
IO
): Assign a file stream. As an example, the one opened by theopen
function is included.folder_id (str, optional): Specify the folder ID.
name (str, optional): Specify the file name.
is_sensitive (bool, optional): Specify whether the file is sensitive.
force (bool, optional): Specify whether to overwrite the file if it already exists.
- Endpoint:
drive/files/create
- Returns:
dict: Returns the file information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_delete(file_id: str) bool [ソース]
Delete a file.
- Args:
file_id (str): Specify the file ID.
- Endpoint:
drive/files/delete
- Returns:
bool: Returns
True
if the file is deleted.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_find_by_hash(md5: str) List[dict] [ソース]
Get files that have the specified md5 hash.
- Args:
md5 (str): Specify the md5 hash.
- Endpoint:
drive/files/find-by-hash
- Returns:
list
ofdict
: Returns the list of files.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_show(file_id: Optional[str] = None, url: Optional[str] = None) dict [ソース]
Get file information.
- Args:
file_id (str, optional): Specify the file ID.
url (str, optional): Specify the file URL.
- Endpoint:
drive/files/show
- Note:
You need to specify either
file_id
orurl
.- Returns:
dict: Returns the file information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_files_update(file_id: str, folder_id: Optional[str] = '', name: Optional[str] = None, is_sensitive: Optional[bool] = None, comment: Optional[str] = '') dict [ソース]
Update file information.
- Args:
file_id (str): Specify the file ID.
folder_id (str, optional): Specify the folder ID.
name (str, optional): Specify the file name.
is_sensitive (bool, optional): Specify whether the file is sensitive.
comment (str, optional): Specify a comment.
- Endpoint:
drive/files/update
- Returns:
dict: Returns the file information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_folders(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, folder_id: Optional[str] = None) List[dict] [ソース]
Get the folder list.
- Args:
limit (int, optional): Specify the number of folders to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
folder_id (str, optional): Specify the folder ID.
- Endpoint:
drive/folders
- Returns:
list
ofdict
: Returns the list of folders.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_folders_create(name: str = 'Untitled', parent_id: Optional[str] = None) dict [ソース]
Create a folder.
- Args:
name (str, optional): Specify the folder name.
parent_id (str, optional): Specify the parent folder ID.
- Endpoint:
drive/folders/create
- Returns:
dict: Returns the folder information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_folders_delete(folder_id: str) bool [ソース]
Delete a folder.
- Args:
folder_id (str): Specify the folder ID.
- Endpoint:
drive/folders/delete
- Returns:
bool: Returns
True
if the folder is deleted.- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_folders_show(folder_id: str) dict [ソース]
Get folder information.
- Args:
folder_id (str): Specify the folder ID.
- Endpoint:
drive/folders/show
- Returns:
dict: Returns the folder information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- drive_folders_update(folder_id: str, name: Optional[str] = None, parent_id: Optional[str] = '') dict [ソース]
Update folder information.
- Args:
folder_id (str): Specify the folder ID.
name (str, optional): Specify the folder name.
parent_id (str, optional): Specify the parent folder ID.
- Endpoint:
drive/folders/update
- Returns:
dict: Returns the folder information.
- drive_stream(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, file_type: Optional[str] = None) List[dict] [ソース]
Get drive files.
- Args:
limit (int): Specify the number of files to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
file_type (str, optional): Specify the file type.
- Endpoint:
drive/stream
- Returns:
list
ofdict
: Returns the list of files.- Raises:
MisskeyAPIException: Raise if the API request fails.
- following_create(user_id: str) dict [ソース]
Follow the specified user.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
following/create
- Returns:
dict: Returns the following information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- following_delete(user_id: str) dict [ソース]
Unfollow the specified user.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
following/delete
- Returns:
dict: Returns the following information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- following_requests_accept(user_id: str) bool [ソース]
Accept the following request.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
following/requests/accept
- Returns:
bool: Returns
True
if the request is successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- following_requests_cancel(user_id: str) dict [ソース]
Cancel the following request.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
following/requests/cancel
- Returns:
dict: Returns the following information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- following_requests_list() List[dict] [ソース]
Get list of following requests.
- Endpoint:
following/requests/list
- Returns:
list
ofdict
: Returns the list of following requests.- Raises:
MisskeyAPIException: Raise if the API request fails.
- following_requests_reject(user_id: str) bool [ソース]
Reject the following request.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
following/requests/reject
- Returns:
bool: Returns
True
if the request is successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- i() dict [ソース]
Get your credentials.
- Endpoint:
i
- Returns:
dict: A dict containing your profile information will be returned.
- Note:
token
must be set in the instance.- Raises:
MisskeyAPIException: Raise if the API request fails.
- i_favorites(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Get your favorites.
- Args:
limit (int): Specify the amount to get. You can specify from 1 to 100.
since_id (
str
, optional): Specify the first ID to get.until_id (
str
, optional): Specify the last ID to get.- Endpoint:
i/favorites
- Note:
token
must be set in the instance.- Returns:
list of dict: List of notes.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- i_notifications(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, following: bool = False, mark_as_read: bool = True, include_types: Optional[Union[List[Union[misskey.enum.NotificationsType, str]], Tuple[misskey.enum.NotificationsType], Set[misskey.enum.NotificationsType]]] = None, exclude_types: Optional[Union[List[Union[misskey.enum.NotificationsType, str]], Tuple[misskey.enum.NotificationsType], Set[misskey.enum.NotificationsType]]] = None) List[dict] [ソース]
Get your notifications.
- Args:
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (
str
, optional): Specify the first ID to get.until_id (
str
, optional): Specify the last ID to get.following (bool): Only following.
mark_as_read (bool): Specify whether to mark it as read when it is acquired.
include_types (
list
,tuple
orset
): Specifies the type of notification to include.exclude_types (
list
,tuple
orset
): Specifies the type of notification to exclude.- Endpoint:
i/notifications
- Note:
token
must be set in the instance.- Returns:
list of dict: List of notifications.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- i_pin(note_id: str) dict [ソース]
Pin a note.
- Args:
note_id (str): Note id.
- Endpoint:
i/pin
- Note:
token
must be set in the instance.- Raises:
MisskeyAPIException: Raise if the API request fails.
- i_unpin(note_id: str) dict [ソース]
Unpin a note.
- Args:
note_id (str): Note id.
- Endpoint:
i/unpin
- Note:
token
must be set in the instance.- Raises:
MisskeyAPIException: Raise if the API request fails.
- i_update(name: Optional[str] = None, description: Optional[str] = None, lang: Optional[Union[misskey.enum.LangType, str]] = None, location: Optional[str] = None, birthday: Optional[Union[datetime.date, datetime.datetime, str]] = None, avatar_id: Optional[str] = None, banner_id: Optional[str] = None, fields: Optional[List[dict]] = None, is_locked: Optional[bool] = None, is_explorable: Optional[bool] = None, hide_online_status: Optional[bool] = None, careful_bot: Optional[bool] = None, auto_accept_followed: Optional[bool] = None, no_crawle: Optional[bool] = None, is_bot: Optional[bool] = None, is_cat: Optional[bool] = None, inject_featured_note: Optional[bool] = None, receive_announcement_email: Optional[bool] = None, always_mark_nsfw: Optional[bool] = None, pinned_page_id: Optional[str] = None, muted_words: Optional[List[List[str]]] = None, muting_notification_types: Optional[Union[List[Union[misskey.enum.NotificationsType, str]], Tuple[misskey.enum.NotificationsType], Set[misskey.enum.NotificationsType]]] = None, email_notification_types: Optional[List[str]] = None) dict [ソース]
Update your profiles.
- Args:
name (
str
, optional): Your name to display.description (
str
, optional): Write an introductory text.lang (
str
, optional): Specify your language.location (
str
, optional): Specify your location.birthday (
datetime.date
,datetime.datetime
orstr
, optional): Specify your birthday date.avatar_id (
str
, optional): Avatar's drive id.banner_id (
str
, optional): Banner's drive id.fields (
list
ofdict
, optional): Profile supplementary information.is_locked (
bool
, optional): Whether to make follow-up approval system.is_explorable (
bool
, optional): Whether to set as a discoverable user.hide_online_status (
bool
, optional): Whether to hide online status.careful_bot (
bool
, optional): Whether to approve follow-ups from bots.auto_accept_followed (
bool
, optional): Whether to automatically follow from the users you are followingno_crawle (
bool
, optional): Specifies whether to prevent it from being tracked by search engines.is_bot (
bool
, optional): Whether to operate as a bot.is_cat (
bool
, optional): Specifies whether to use nyaise.inject_featured_note (
bool
, optional):receive_announcement_email (
bool
, optional):always_mark_nsfw (
bool
, optional): Whether to give NSFW to the posted file by default.pinned_page_id (
str
, optional): ID of the page to be fixed.muted_words (
list
oflist
ofstr
, optional): Word to mute.muting_notification_types (
list
, optional): Notification type to hide.email_notification_types (
list
ofstr
, optional): Specify the notification type for email notification.- Endpoint:
i/update
- Note:
token
must be set in the instance.- Returns:
bool: Returns
True
if successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- meta(detail: bool = True) dict [ソース]
Get instance meta.
- Args:
detail (bool): Add the details of the instance information.
- Endpoint:
meta
- Returns:
dict: A dict containing instance information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- mute_create(user_id: str) bool [ソース]
Mute the specified user.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
mute/create
- Returns:
bool: Returns
True
if the user is muted.- Raises:
MisskeyAPIException: Raise if the API request fails.
- mute_delete(user_id: str) bool [ソース]
Unmute the specified user.
- Args:
user_id (str): Specify the user ID.
- Endpoint:
mute/delete
- Returns:
bool: Returns
True
if the user is unmuted.- Raises:
MisskeyAPIException: Raise if the API request fails.
- mute_list(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Get list of muted users.
- Args:
limit (int): Specify the number of users to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
- Endpoint:
mute/list
- Returns:
list
ofdict
: Returns the list of muted users.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_children(note_id: str, limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Show note children.
- Args:
note_id (str): Specify the Note ID to get.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
- Endpoint:
notes/children
- Returns:
list
ofdict
: Gets the Note associated with that Note.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_conversation(note_id: str, limit: int = 10, offset: Optional[int] = None) List[dict] [ソース]
Show note conversations.
- Args:
note_id (str): Specify the Note ID to get.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
offset (int, optional): Specify the offset to get.
- Endpoint:
notes/conversation
- Returns:
list
ofdict
: Gets the Note associated with that Note.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_create(text: Optional[str] = None, cw: Optional[str] = None, visibility: Union[misskey.enum.NoteVisibility, str] = NoteVisibility.PUBLIC, visible_user_ids: Optional[List[str]] = None, via_mobile: bool = False, local_only: bool = False, no_extract_mentions: bool = False, no_extract_hashtags: bool = False, no_extract_emojis: bool = False, file_ids: Optional[List[str]] = None, reply_id: Optional[str] = None, renote_id: Optional[str] = None, poll_choices: Optional[Union[List[str], Tuple[str]]] = None, poll_multiple: bool = False, poll_expires_at: Optional[Union[int, datetime.datetime]] = None, poll_expired_after: Optional[Union[int, datetime.timedelta]] = None) dict [ソース]
Create a note.
- Args:
text (
str
, optional): Specify the text.cw (
str
, optional): Specify the CW(Content Warning).visibility (
str
, default:public
): Post range. Specifies the enumeration inNoteVisibility
.visible_user_ids (
list
ofstr
, optional): Ifvisibility
isspecified
, specify the user ID in the list.via_mobile (
bool
, optional): Specify whether to post from mobile. It doesn't work with recent Misskey versions.local_only (
bool
, optional): Specifies whether to post only the instance you are using.no_extract_mentions (
bool
, optional): Specifies whether to detect mentions from the text.no_extract_hashtags (
bool
, optional): Specifies whether to detect hashtags from the text.no_extract_emojis (
bool
, optional): Specifies whether to detect emojis from the text.file_ids (
list
ofstr
, optional): Specify the file ID to attach in the list.reply_id (
str
, optional): Specify the Note ID of the reply destination.renote_id (
str
, optional): Specify the Note ID to renote.poll_choices (
list
ofstr
, optional): Specify the voting item. You can specify 2 or more and 10 or less.poll_multiple (
bool
, optional): Specifies whether to allow multiple votes. This is valid only whenpoll_choices
is specified.poll_expires_at (
datetime.datetime
, optional): Specify the expiration date of the vote. If not specified, it will be indefinite. Cannot be used withpoll_expired_after
.poll_expired_after (
datetime.timedelta
, optional): Specifies the validity period of the vote. If not specified, it will be indefinite. Cannot be used withpoll_expired_at
.- Endpoint:
notes/create
- Note:
token
must be set in the instance.You must specify at least either
text
orfiles_id
.- Returns:
dict: The dict of the posted result is returned.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_delete(note_id: str) bool [ソース]
Delete a note.
- Args:
note_id (str): Specify the Note ID to delete.
- Endpoint:
notes/delete
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_favorites_create(note_id: str) bool [ソース]
Mark as favorite a note.
- Args:
note_id (str): Specify the Note ID to make a favorite.
- Endpoint:
notes/favorites/create
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_favorites_delete(note_id: str) bool [ソース]
Delete favorite a note.
- Args:
note_id (str): Specify the Note ID to unmark a favorite.
- Endpoint:
notes/favorites/delete
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_global_timeline(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, since_date: Optional[Union[int, datetime.datetime]] = None, until_date: Optional[Union[int, datetime.datetime]] = None, with_files: bool = True) List[dict] [ソース]
Show global timeline.
- Args:
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
since_date (int, datetime.datetime, optional): Specify the first date to get.
- until_date (int, datetime.datetime, optional): Specify
the last date to get.
with_files (bool, optional): Specify whether to include files.
- Endpoint:
notes/global-timeline
- Returns:
list
ofdict
: Returns a list of notes.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_hybrid_timeline(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, since_date: Optional[Union[int, datetime.datetime]] = None, until_date: Optional[Union[int, datetime.datetime]] = None, include_my_renotes: bool = True, include_renoted_my_notes: bool = True, include_local_renotes: bool = True, with_files: bool = True) List[dict] [ソース]
Show hybrid(home + local) timeline.
- Args:
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
since_date (int, datetime.datetime, optional): Specify the first date to get.
- until_date (int, datetime.datetime, optional): Specify
the last date to get.
include_my_renotes (bool, optional): Specify whether to include your notes.
include_renoted_my_notes (bool, optional): Specify whether to include renotes of your notes.
include_local_renotes (bool, optional): Specify whether to include local renotes.
with_files (bool, optional): Specify whether to include files.
- Endpoint:
notes/hybrid-timeline
- Returns:
list
ofdict
: Returns a list of notes.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_local_timeline(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, since_date: Optional[Union[int, datetime.datetime]] = None, until_date: Optional[Union[int, datetime.datetime]] = None, with_files: bool = True, file_type: Optional[List[str]] = None, exclude_nsfw: bool = False) List[dict] [ソース]
Show local timeline.
- Args:
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
since_date (int, datetime.datetime, optional): Specify the first date to get.
- until_date (int, datetime.datetime, optional): Specify
the last date to get.
with_files (bool, optional): Specify whether to include files.
file_type (
list
ofstr
, optional): Specify the file type to get.exclude_nsfw (bool, optional): Specify whether to exclude NSFW (Not safe for work) notes.
- Endpoint:
notes/local-timeline
- Returns:
list
ofdict
: Returns a list of notes.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_polls_vote(note_id: str, choice: int) bool [ソース]
Vote in a note poll.
- Args:
note_id (str): Specify the Note ID to vote.
choice (int): Specify the choice to vote. Specify from 0.
- Endpoint:
notes/polls/vote
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_reactions(note_id: str, reaction_type: Optional[str] = None, limit: int = 10, offset: Optional[int] = None, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Show note reactions.
- Args:
note_id (str): Specify the Note ID to get.
reaction_type (str, optional): Specify the reaction type to get.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
offset (int, optional): Specify the offset to get.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
- Endpoint:
notes/reactions
- Returns:
list
ofdict
: Get reactions in associated note.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_reactions_create(note_id: str, reaction: str) bool [ソース]
Create a reaction in a note.
- Args:
note_id (str): Specify the Note ID to create your reaction.
reaction (str): Specify the reaction type.
- Endpoint:
notes/reactions/create
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_reactions_delete(note_id: str) bool [ソース]
Delete a reaction in a note.
- Args:
note_id (str): Specify the Note ID to delete your reaction.
- Endpoint:
notes/reactions/delete
- Returns:
bool: Returns
True
if the reaction was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_renotes(note_id: str, limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None) List[dict] [ソース]
Show renotes.
- Args:
note_id (str): Specify the Note ID to get.
limit(int, optional): Specify the amount to get.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
- Endpoint:
notes/renotes
- Returns:
list
ofdict
: Gets the Note associated with that Note.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_replies(note_id: str, since_id: Optional[str] = None, until_id: Optional[str] = None, limit: int = 10) List[dict] [ソース]
Show note replies.
- Args:
note_id (str): Specify the Note ID to get.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
- Endpoint:
notes/replies
- Returns:
list
ofdict
: Gets the Note associated with that Note.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_show(note_id: str) dict [ソース]
Show a note.
- Args:
note_id (str): Specify the Note ID to get.
- Endpoint:
notes/show
- Returns:
dict: A dict with the specified Note ID is returned.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_state(note_id: str) dict [ソース]
Show a state of a note.
- Args:
note_id (str): Specify the Note ID to get.
- Endpoint:
notes/state
- Returns:
dict
: Get state of a note.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_timeline(limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, since_date: Optional[Union[int, datetime.datetime]] = None, until_date: Optional[Union[int, datetime.datetime]] = None, include_my_renotes: bool = True, include_renoted_my_notes: bool = True, include_local_renotes: bool = True, with_files: bool = True) List[dict] [ソース]
Show your home timeline.
- Args:
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
since_date (int, datetime.datetime, optional): Specify the first date to get.
- until_date (int, datetime.datetime, optional): Specify
the last date to get.
include_my_renotes (bool, optional): Specify whether to include your notes.
include_renoted_my_notes (bool, optional): Specify whether to include renotes of your notes.
include_local_renotes (bool, optional): Specify whether to include local renotes.
with_files (bool, optional): Specify whether to include files.
- Endpoint:
notes/timeline
- Returns:
list
ofdict
: Returns a list of notes.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_unrenote(note_id: str) bool [ソース]
Unrenote a note.
- Args:
note_id (str): Specify the Note ID to unrenote.
- Endpoint:
notes/unrenote
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_watching_create(note_id: str) bool [ソース]
Watch a note.
- Args:
note_id (str): Specify the Note ID to watch.
- Endpoint:
notes/watching/create
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notes_watching_delete(note_id: str) bool [ソース]
Unwatch a note.
- Args:
note_id (str): Specify the Note ID to unwatch.
- Endpoint:
notes/watching/delete
- Returns:
bool: Returns
True
if the request was successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- notifications_mark_all_as_read() bool [ソース]
Mark all as read to your notifications.
- Endpoint:
notifications/mark-all-as-read
- Note:
token
must be set in the instance.- Returns:
bool: Returns
True
if successful.- Raises:
MisskeyAPIException: Raise if the API request fails.
- stats() dict [ソース]
Get instance statuses.
- Endpoint:
stats
- Returns:
dict: A dict containing the number of users, the number of notes, etc. is returned.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- timeout: Optional[Any] = 15.0
Specifies the number of seconds for HTTP communication timeout. Comply with "requests".
- property token: Optional[str]
Get a token.
When you assign a new token, it automatically verifies whether the token can be used. If validation fails, the exception
MisskeyAuthorizeFailedException
is raised.If using
del
,token
will beNone
.
- users_followers(user_id: Optional[str] = None, username: Optional[str] = None, host: Optional[str] = None, since_id: Optional[str] = None, until_id: Optional[str] = None, limit: int = 10) List[dict] [ソース]
Get the follower list of the specified user.
- Args:
user_id (str, optional): Specify the user ID.
username (str, optional): Specify the username.
host (str, optional): Specify the host.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
- Endpoint:
users/following
- Note:
You must specify one of user_id, username (and host).
- Returns:
list
ofdict
: Returns a list of users.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_following(user_id: Optional[str] = None, username: Optional[str] = None, host: Optional[str] = None, since_id: Optional[str] = None, until_id: Optional[str] = None, limit: int = 10) List[dict] [ソース]
Get the follow list of the specified user.
- Args:
user_id (str, optional): Specify the user ID.
username (str, optional): Specify the username.
host (str, optional): Specify the host.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
- Endpoint:
users/following
- Note:
You must specify one of user_id, username (and host).
- Returns:
list
ofdict
: Returns a list of users.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_create(name: str) dict [ソース]
Create user list.
- Args:
name (str): Specify the list name.
- Endpoint:
users/lists/create
- Returns:
dict: Returns the new list information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_delete(list_id: str) bool [ソース]
Delete user list.
- Args:
list_id (str): Specify the list ID.
- Endpoint:
users/lists/delete
- Returns:
bool: Returns
True
if the list is deleted.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_list() List[dict] [ソース]
Get user list.
- Endpoint:
users/lists/list
- Returns:
list of dict: Returns a list of user lists.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_pull(list_id: str, user_id: str) bool [ソース]
Remove user from user list.
- Args:
list_id (str): Specify the list ID.
user_id (str): Specify the user ID.
- Endpoint:
users/lists/pull
- Returns:
bool: Returns
True
if the user is removed from the list.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_push(list_id: str, user_id: str) bool [ソース]
Add user to user list.
- Args:
list_id (str): Specify the list ID.
user_id (str): Specify the user ID.
- Endpoint:
users/lists/push
- Returns:
bool: Returns
True
if the user is added to the list.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_show(list_id: str) dict [ソース]
Get user list detail.
- Args:
list_id (str): Specify the list ID.
- Endpoint:
users/lists/show
- Returns:
dict: Returns the list information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_lists_update(list_id: str, name: str) dict [ソース]
Update user list.
- Args:
list_id (str): Specify the list ID.
name (str): Specify the new list name.
- Endpoint:
users/lists/update
- Returns:
dict: Returns the updated list information.
- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_notes(user_id: str, include_replies: bool = True, limit: int = 10, since_id: Optional[str] = None, until_id: Optional[str] = None, since_date: Optional[Union[int, datetime.datetime]] = None, until_date: Optional[Union[int, datetime.datetime]] = None, include_my_renotes: bool = True, with_files: bool = False, file_type: Optional[List[str]] = None, exclude_nsfw: bool = False) List[dict] [ソース]
Get the note list of the specified user.
- Args:
user_id (str): Specify the user ID.
include_replies (bool, optional): Specify whether to include replies.
limit (int, optional): Specify the amount to get. You can specify from 1 to 100.
since_id (str, optional): Specify the first ID to get.
until_id (str, optional): Specify the last ID to get.
since_date (
datetime.datetime
, optional): Specify the first date to get.until_date (
datetime.datetime
, optional): Specify the last date to get.include_my_renotes (bool, optional): Specify whether to include my renotes.
with_files (bool, optional): Specify whether to include files.
file_type (
list
ofstr
, optional): Specify the file type to get.exclude_nsfw (bool, optional): Specify whether to exclude NSFW notes.
- Endpoint:
users/notes
- Returns:
list
ofdict
: Returns a list of notes.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_relation(user_id: Union[str, List[str]]) Union[dict, List[dict]] [ソース]
Get the relation of the specified user(s).
- Args:
user_id (
str
orlist
ofstr
): Specify the user ID(s).- Endpoint:
users/relation
- Note:
If
user_id
is specified by str, it will be returned by dict.If
user_id
is specified by list, it will be returned by dict of list.- Returns:
dict
orlist
ofdict
: Returns the relation.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_report_abuse(user_id: str, comment: str) bool [ソース]
Report abuse to user.
- Args:
user_id (str): Specify the user ID.
comment (str): Specify the comment.
- Endpoint:
users/report/abuse
- Returns:
bool: Returns
True
if the report is sent.- Raises:
MisskeyAPIException: Raise if the API request fails.
- users_show(user_id: Optional[str] = None, user_ids: Optional[List[str]] = None, username: Optional[str] = None, host: Optional[str] = None) Union[dict, List[dict]] [ソース]
Show user.
- Args:
user_id (str, optional): Specify the user ID.
user_ids (list of str, optional): Specify the user IDs.
username (str, optional): Specify the username.
host (str, optional): Specify the host.
- Endpoint:
users/show
- Note:
You must specify one of user_id, user_ids, username (and host).
If you specify
user_ids
, it returns a list of users.- Returns:
dict
orlist
ofdict
: Returns a user or a list of users.- Raises:
MisskeyAPIException: Raise if the API request fails.