API Reference¶
Misskey Models¶
App¶
- class mipac.models.app.App(raw_app: IApp)¶
- property callback_url: str | None¶
The callback url of the app
- property id: str¶
The id of the app
- property is_authorized: bool¶
If the app is authorized or not
- property name: str¶
The name of the app
- property permission: list[str]¶
The permissions the app has
- property secret: str¶
The secret of the app
Ad¶
- class mipac.models.ad.Ad(ad_data: IAd, *, client: ClientManager)¶
- property expires_at: datetime¶
いつ広告が終了するか
- 戻り値:
いつ広告が終了するか
- 戻り値の型:
datetime
- property memo: str | None¶
広告のメモ
- 戻り値:
広告のメモ
- 戻り値の型:
str | None
- property priority: Literal['highmiddlelow']¶
広告の優先度
- 戻り値:
広告の優先度
- 戻り値の型:
Literal["high" "middle" "low"]
- property starts_at: datetime¶
いつ広告が開始するか
- 戻り値:
いつ広告が開始するか
- 戻り値の型:
datetime
Muting¶
- class mipac.models.mute.Muting(raw_mute_user: IMuting, *, client: ClientManager)¶
PartialReaction¶
- class mipac.models.reaction.PartialReaction(reaction: INoteUpdated[INoteUpdatedReaction], *, client: ClientManager)¶
Role¶
- class mipac.models.roles.Role(role_data: IRole, *, client: ClientManager)¶
RolePolicies¶
- class mipac.models.roles.RolePolicies(role_policies_data: IRolePolicies)¶
Announcement¶
- class mipac.models.announcement.Announcement(announcement: IAnnouncement, *, client: ClientManager)¶
- property created_at: datetime¶
アナウンスが作成された日時
- 戻り値:
アナウンスが作成された日時
- 戻り値の型:
datetime
- property id: str¶
アナウンスのID
- 戻り値:
アナウンスのID
- 戻り値の型:
str
- property text: str¶
アナウンスの内容
- 戻り値:
アナウンスの内容
- 戻り値の型:
str
- property title: str¶
アナウンスのタイトル
- 戻り値:
アナウンスのタイトル
- 戻り値の型:
str
- property updated_at: datetime | None¶
アナウンスが更新された日時
Noneの場合は、アナウンスが更新されていないことを示します。
- 戻り値:
アナウンスが更新された日時
- 戻り値の型:
datetime | None
AnnouncementDetailed¶
- class mipac.models.announcement.AnnouncementDetailed(raw_announcement: IAnnouncementDetailed, *, client: ClientManager)¶
- property reads: int¶
Returns the number of reads of the announcement.
packed_user¶
- mipac.models.user.packed_user(user: IUser, client: ClientManager) UserDetailedNotMe | MeDetailed ¶
Achievement¶
- class mipac.models.user.Achievement(detail: IAchievement)¶
CreatedUser¶
- class mipac.models.user.CreatedUser(raw_user: T, *, client: ClientManager)¶
FollowCommon¶
- class mipac.models.user.FollowCommon(raw_follow: FFC, *, client: ClientManager)¶
Follower¶
- class mipac.models.user.Follower(raw_follow: IFederationFollower, *, client: ClientManager)¶
Following¶
- class mipac.models.user.Following(raw_following: IFederationFollowing, *, client: ClientManager)¶
FrequentlyRepliedUser¶
- class mipac.models.user.FrequentlyRepliedUser(raw_frequently_replied_user: GetFrequentlyRepliedUsersResponse, *, client: ClientManager)¶
MeDetailed¶
- class mipac.models.user.MeDetailed(raw_user: T, *, client: ClientManager)¶
MeDetailedOnly¶
- class mipac.models.user.MeDetailedOnly(raw_user: IMeDetailedOnlySchema, *, client: ClientManager)¶
RoleUser¶
- class mipac.models.user.RoleUser(role_user: IRoleUser, *, client: ClientManager)¶
UserDetailedNotMe¶
- class mipac.models.user.UserDetailedNotMe(raw_user: T, *, client: ClientManager)¶
UserDetailedNotMeOnly¶
- class mipac.models.user.UserDetailedNotMeOnly(raw_user: IUserDetailedNotMeOnlySchema, *, client: ClientManager)¶
UserField¶
- class mipac.models.user.UserField(raw_user_field: IUserField, *, client: ClientManager)¶
UserList¶
- class mipac.models.user.UserList(raw_user_list: IUserList, *, client: ClientManager)¶
UserListMembership¶
- class mipac.models.user.UserListMembership(raw_user_list_membership: IUserListMembership, *, client: ClientManager)¶
UsernameAvailable¶
- class mipac.models.username.UsernameAvailable(raw_username_available: IUsernameAvailable)¶
- property available: bool¶
ユーザー名が使用可能かどうか
- 戻り値:
ユーザー名が使用可能かどうか
- 戻り値の型:
bool
ActiveUsersChart¶
- class mipac.models.chart.ActiveUsersChart(data: IActiveUsersChart)¶
DriveChart¶
- class mipac.models.chart.DriveChart(data: IDriveChart)¶
DriveLocalChart¶
- class mipac.models.chart.DriveLocalChart(data: IDriveLocalChart)¶
DriveRemoteChart¶
- class mipac.models.chart.DriveRemoteChart(data: IDriveRemoteChart)¶
FollowRequest¶
- class mipac.models.follow.FollowRequest(follow_request: IFollowRequest, *, client: ClientManager)¶
Channel¶
- class mipac.models.channel.Channel(raw_channel: IChannel, *, client: ClientManager)¶
- property allow_renote_to_external: bool¶
外部へのリノートを許可するかどうか
- 戻り値の型:
bool
- property api: ClientChannelManager¶
チャンネルに関するAPIを利用するためのクライアント
- 戻り値の型:
- property banner_url: str | None¶
チャンネルのバナー画像URL
- 戻り値の型:
str | None
- property color: str¶
チャンネルの色
- 戻り値の型:
str
- property created_at: datetime¶
チャンネルが作成された日時
- 戻り値の型:
datetime
- property description: str | None¶
チャンネルの説明
- 戻り値の型:
str | None
- property id: str¶
チャンネルID
- 戻り値の型:
str
- property is_archived: bool¶
チャンネルがアーカイブされているかどうか
- 戻り値の型:
bool
- property is_favorited: bool | None¶
自身がお気に入り登録しているかどうか
- 戻り値の型:
bool
- property is_following: bool | None¶
自身がフォローしているかどうか
- 戻り値の型:
bool
- property is_sensitive: bool¶
チャンネルがセンシティブかどうか
- 戻り値の型:
bool
- property last_noted_at: datetime | None¶
チャンネルに最後にノートが投稿された日時
- 戻り値の型:
datetime | None
- property name: str¶
チャンネル名
- 戻り値の型:
str
- property notes_count: int¶
チャンネル内のノート数
- 戻り値の型:
int
- property pinned_note_ids: list[str]¶
ピン留めされているノートのIDのリスト
- 戻り値の型:
list[str]
- property user_id: str | None¶
チャンネルを作成したユーザーのID
- 戻り値の型:
str | None
- property users_count: int¶
チャンネルに参加しているユーザー数
- 戻り値の型:
int
ID¶
AdminMeta¶
- class mipac.models.meta.AdminMeta(raw_admin_meta: IAdminMeta, *, client: ClientManager)¶
Features¶
Meta¶
- class mipac.models.meta.Meta(instance_metadata: IMetaDetailed, *, client: ClientManager)¶
MetaDetailedOnly¶
- class mipac.models.meta.MetaDetailedOnly(raw_meta: IMetaDetailedOnly, *, client: ClientManager)¶
SystemWebhook¶
- class mipac.models.system_webhook.SystemWebhook(raw_system_webhook: ISystemWebhook, *, client: ClientManager)¶
IndexStat¶
- class mipac.models.admin.IndexStat(index_stat: IIndexStat)¶
ModerationLog¶
- class mipac.models.admin.ModerationLog(moderation_log: IModerationLog, *, client: ClientManager)¶
ServerInfo¶
- class mipac.models.admin.ServerInfo(server_info: IServerInfo)¶
ServerInfoCpu¶
- class mipac.models.admin.ServerInfoCpu(server_info_cpu: IServerInfoCpu)¶
ServerInfoFs¶
- class mipac.models.admin.ServerInfoFs(server_info_fs: IServerInfoFs)¶
ServerInfoMem¶
- class mipac.models.admin.ServerInfoMem(server_info_mem: IServerInfoMem)¶
ServerInfoNet¶
- class mipac.models.admin.ServerInfoNet(server_info_net: IServerInfoNet)¶
UserIP¶
MiPoll¶
- class mipac.models.poll.MiPoll(poll: ICreatePoll)¶
Poll¶
- class mipac.models.poll.Poll(poll: IPoll, *, client: ClientManager)¶
PollChoice¶
- class mipac.models.poll.PollChoice(choice: IPollChoice, *, client: ClientManager)¶
InviteCode¶
- class mipac.models.invite.InviteCode(raw_invite_code: IInviteCode, *, client: ClientManager)¶
InviteLimit¶
- class mipac.models.invite.InviteLimit(raw_invite_limit: IInviteLimit, *, client: ClientManager)¶
Hashtag¶
- class mipac.models.hashtag.Hashtag(*, raw_hashtag: IHashtag, client: ClientManager)¶
TrendHashtag¶
- class mipac.models.hashtag.TrendHashtag(*, raw_trend_hashtag: ITrendHashtag, client: ClientManager)¶
- property chart¶
チャート
- 戻り値:
チャート
- 戻り値の型:
list[int]
- property tag¶
ハッシュタグ
- 戻り値:
ハッシュタグ
- 戻り値の型:
str
- property users_count¶
ユーザー数
- 戻り値:
ユーザー数
- 戻り値の型:
int
CustomEmoji¶
- class mipac.models.emoji.CustomEmoji(emoji: ICustomEmoji, *, client: ClientManager)¶
EmojiDetailed¶
- class mipac.models.emoji.EmojiDetailed(raw_emoji_detailed: IEmojiDetailed, *, client: ClientManager)¶
EmojiSimple¶
- class mipac.models.emoji.EmojiSimple(raw_emoji_simple: IEmojiSimple, *, client: ClientManager)¶
Misskeyの EmojiSimple を表すクラス
GalleryPost¶
- class mipac.models.gallery.GalleryPost(raw_gallery: IGalleryPost, *, client: ClientManager)¶
Note¶
- api
- author
- channel
- channel_id
- clipped_count
- content
- created_at
- cw
- deleted_at
- emojis
- file_ids
- files
- id
- is_hidden
- local_only
- mentions
- my_reaction
- poll
- reaction_acceptance
- reaction_and_user_pair_cache
- reaction_count
- reactions
- renote
- renote_count
- renote_id
- replies_count
- reply
- reply_id
- tags
- text
- uri
- url
- user
- user_id
- visibility
- visible_user_ids
- class mipac.models.note.Note(raw_note: INote, client: ClientManager)¶
Noteモデル
- パラメータ:
note (INote) -- The raw data of the note
client (ClientManager)
- property api: ClientNoteManager¶
Note api
- 戻り値:
note api
- 戻り値の型:
- property author: PartialUser¶
Note author
バージョン 0.6.0 で非推奨: Use
mipac.models.note.Note.user()
instead.- 戻り値:
note author
- 戻り値の型:
- property channel: NoteChannel | None¶
Note channel
- 戻り値:
note channel
- 戻り値の型:
NoteChannel | None
- property channel_id: str | None¶
Note channelId
- 戻り値:
note channelId
- 戻り値の型:
str | None
- property clipped_count: int | None¶
Note clippedCount
- 戻り値:
note clippedCount
- 戻り値の型:
int | None
- property content: str | None¶
Note content
バージョン 0.6.0 で非推奨: Use
mipac.models.note.Note.text()
instead.- 戻り値:
note content
- 戻り値の型:
str | None
- property created_at: datetime¶
Note createdAt
- 戻り値:
note createdAt
- 戻り値の型:
datetime
- property cw: str | None¶
Note cw
- 戻り値:
note cw
- 戻り値の型:
str | None
- property deleted_at: datetime | None¶
Note deletedAt
- 戻り値:
note deletedAt
- 戻り値の型:
datetime | None
- property emojis: dict[str, str]¶
Note emojis
- 戻り値:
note emojis
- 戻り値の型:
dict[str, str]
- property file_ids: list[str]¶
Note fileIds
- 戻り値:
note fileIds
- 戻り値の型:
list[str]
- property id: str¶
note id
- 戻り値:
note id
- 戻り値の型:
str
Note isHidden
- 戻り値:
note isHidden
- 戻り値の型:
bool | None
- property local_only: bool¶
Note localOnly
- 戻り値:
note localOnly
- 戻り値の型:
bool
- property mentions: list[str]¶
Note mentions
- 戻り値:
note mentions
- 戻り値の型:
list[str]
- property my_reaction: str | None¶
Note myReaction
- 戻り値:
note myReaction
- 戻り値の型:
str | None
- property reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote']¶
Note reactionAcceptance
- 戻り値:
note reactionAcceptance
- 戻り値の型:
IReactionAcceptance
- property reaction_and_user_pair_cache: dict[str, list[PartialUser]]¶
Note reactionAndUserPairCache
- 戻り値:
note reactionAndUserPairCache
- 戻り値の型:
dict[str, list[PartialUser]]
- property reaction_count: int¶
Note reactionCount
- 戻り値:
note reactionCount
- 戻り値の型:
int
- property reactions: dict[str, int]¶
Note reactions
- 戻り値:
note reactions
- 戻り値の型:
dict[str, int]
- property renote_count: int¶
Note renoteCount
- 戻り値:
note renoteCount
- 戻り値の型:
int
- property renote_id: str | None¶
Note renoteId
- 戻り値:
note renoteId
- 戻り値の型:
str | None
- property replies_count: int¶
Note repliesCount
- 戻り値:
note repliesCount
- 戻り値の型:
int
- property reply_id: str | None¶
Note replyId
- 戻り値:
note replyId
- 戻り値の型:
str | None
- property tags: list[str]¶
Note tags
- 戻り値:
note tags
- 戻り値の型:
list[str] | None
- property text: str | None¶
Note text
- 戻り値:
note text
- 戻り値の型:
str | None
- property uri: str | None¶
Note uri
- 戻り値:
note uri
- 戻り値の型:
str
- property url: str | None¶
Note url
- 戻り値:
note url
- 戻り値の型:
str
- property user: PartialUser¶
Note author
- 戻り値:
note user
- 戻り値の型:
- property user_id: str¶
Note userId
- 戻り値:
note userId
- 戻り値の型:
str
- property visibility: Literal['public', 'home', 'followers', 'specified']¶
Note visibility
- 戻り値:
note visibility
- 戻り値の型:
INoteVisibility
- property visible_user_ids: list[str]¶
Note visibleUserIds
- 戻り値:
note visibleUserIds
- 戻り値の型:
list[str] | None
NoteChannel¶
- class mipac.models.note.NoteChannel(raw_note_channel: INoteChannel, *, client: ClientManager)¶
- property allow_renote_to_external: bool¶
Note channelAllowRenoteToExternal
- 戻り値:
note channelAllowRenoteToExternal
- 戻り値の型:
bool
- property color: str¶
Note channelColor
- 戻り値:
note channelColor
- 戻り値の型:
str
- property id: str¶
Note channelId
- 戻り値:
note channelId
- 戻り値の型:
str
- property is_sensitive: bool¶
Note channelIsSensitive
- 戻り値:
note channelIsSensitive
- 戻り値の型:
bool
- property name: str¶
Note channelName
- 戻り値:
note channelName
- 戻り値の型:
str
- property user_id: str | None¶
Note channelUserId
- 戻り値:
note channelUserId
- 戻り値の型:
str | None
NoteDeleted¶
- class mipac.models.note.NoteDeleted(data: INoteUpdated[INoteUpdatedDelete])¶
NoteReaction¶
- class mipac.models.note.NoteReaction(raw_reaction: INoteReaction, *, client: ClientManager)¶
- property created_at: datetime | None¶
Note createdAt
- 戻り値:
note createdAt
- 戻り値の型:
datetime | None
- property id: str | None¶
Note reactionId
- 戻り値:
note reactionId
- 戻り値の型:
str | None
- property type: str | None¶
Reaction type
- 戻り値:
reaction type
- 戻り値の型:
str | None
- property user: PartialUser¶
Note user
- 戻り値:
note user
- 戻り値の型:
NoteState¶
- class mipac.models.note.NoteState(data: INoteState)¶
NoteTranslateResult¶
- class mipac.models.note.NoteTranslateResult(translate_result: INoteTranslateResult)¶
- パラメータ:
translate_result (INoteTranslateResult) -- The raw data of the note translate result
DriveStatus¶
- class mipac.models.drive.DriveStatus(raw_drive_status: IDriveStatus, *, client: ClientManager)¶
- property capacity: int¶
Total capacity of the drive in bytes
- 戻り値:
Total capacity of the drive in bytes
- 戻り値の型:
int
- property usage: int¶
Total usage of the drive in bytes
- 戻り値:
Total usage of the drive in bytes
- 戻り値の型:
int
File¶
- class mipac.models.drive.File(raw_file: IFile, *, client: ClientManager)¶
- property api: ClientFileManager¶
このファイルに対する操作を行うためのAPIクライアント
- 戻り値:
このファイルに対する操作を行うためのAPIクライアント
- 戻り値の型:
- property blurhash: str | None¶
ファイルのBlurHash
- 戻り値:
ファイルのBlurHash
- 戻り値の型:
str | None
- property comment: str | None¶
ファイルのコメント
- 戻り値:
ファイルのコメント
- 戻り値の型:
str | None
- property created_at: datetime¶
ファイルの作成日時
- 戻り値:
ファイルの作成日時
- 戻り値の型:
datetime
- property folder_id: str | None¶
ファイルが存在するフォルダのID
- 戻り値:
ファイルが存在するフォルダのID
- 戻り値の型:
str | None
- property id: str¶
ファイルのID
- 戻り値:
ファイルのID
- 戻り値の型:
str
- property is_sensitive: bool¶
ファイルが閲覧注意(NSFW)であるか
- 戻り値:
ファイルが閲覧注意であるか
- 戻り値の型:
bool
- property md5: str¶
ファイルのMD5ハッシュ
- 戻り値:
ファイルのMD5ハッシュ
- 戻り値の型:
str
- property name: str¶
拡張子付きのファイル名
- 戻り値:
拡張子付きのファイル名
- 戻り値の型:
str
- property properties: FileProperties¶
ファイルのプロパティ
- 戻り値:
ファイルのプロパティ
- 戻り値の型:
- property size: int¶
ファイルのサイズ
- 戻り値:
ファイルのサイズ
- 戻り値の型:
int
- property thumbnail_url: str | None¶
ファイルのサムネイルURL
- 戻り値:
ファイルのサムネイルURL
- 戻り値の型:
str | None
- property type: str¶
ファイルの種類 (MIME タイプ)
- 戻り値:
ファイルの種類 (MIME タイプ)
- 戻り値の型:
str
- property url: str¶
ファイルのURL
- 戻り値:
ファイルのURL
- 戻り値の型:
str
- property user: PartialUser | None¶
ファイルをアップロードしたユーザー
- 戻り値:
ファイルをアップロードしたユーザー
- 戻り値の型:
PartialUser | None
- property user_id: str | None¶
ファイルをアップロードしたユーザーのID
- 戻り値:
ファイルをアップロードしたユーザーのID
- 戻り値の型:
str | None
FileProperties¶
- class mipac.models.drive.FileProperties(raw_properties: IFileProperties)¶
- property height: int | None¶
ファイルの高さ
- 戻り値:
ファイルの高さ
- 戻り値の型:
int | None
- property width: int | None¶
ファイルの幅
- 戻り値:
ファイルの幅
- 戻り値の型:
int | None
Folder¶
- class mipac.models.drive.Folder(raw_folder: IFolder, client: ClientManager)¶
- property created_at: datetime¶
フォルダーが作成された日時
- 戻り値:
フォルダーが作成された日時
- 戻り値の型:
datetime
- property files_count: int | None¶
フォルダー内のファイルの数
- 戻り値:
フォルダー内のファイルの数
- 戻り値の型:
int | None
- property folders_count: int | None¶
フォルダー内のフォルダーの数
- 戻り値:
フォルダー内のフォルダーの数
- 戻り値の型:
int | None
- property id: str¶
フォルダーのID
- 戻り値:
フォルダーのID
- 戻り値の型:
str
- property name: str¶
フォルダー名
- 戻り値:
フォルダー名
- 戻り値の型:
str
- property parent_id: str | None¶
親フォルダーのID
- 戻り値:
親フォルダーのID
- 戻り値の型:
str | None
Clip¶
- class mipac.models.clip.Clip(raw_clip: IClip, *, client: ClientManager)¶
- property created_at: str¶
The time the clip was created
- property description: str | None¶
The clip description
- property favorited_count: int¶
The number of times the clip has been favorited
- property id: str¶
The clip id
- property is_favorited: bool¶
Whether the clip is favorited
- property is_public: bool¶
Whether the clip is public
- property last_clipped_at: str¶
The last time the clip was clipped
- property name: str¶
The clip name
- property user: PartialUser¶
The user who created the clip
- property user_id: str¶
The user id who created the clip
Blocking¶
- class mipac.models.blocking.Blocking(*, raw_blocking: IBlocking, client: ClientManager)¶
- property api: ClientBlockingManager¶
ブロック対象に対するAPIを利用するためのManager
- 戻り値:
ブロック対象に対するAPIを利用するためのManager
- 戻り値の型:
- property blockee: UserDetailedNotMe¶
ブロック対象のユーザー情報
- 戻り値:
ブロック対象のユーザー情報
- 戻り値の型:
- property blockee_id: str¶
ブロック対象のユーザーID
- 戻り値:
ブロック対象のユーザーID
- 戻り値の型:
str
- property created_at: datetime¶
ブロックした日時
- 戻り値:
ブロックした日時
- 戻り値の型:
datetime
- property id: str¶
ブロックID
- 戻り値:
ブロックID
- 戻り値の型:
str
Antenna¶
- class mipac.models.antenna.Antenna(antenna: IAntenna, *, client: ClientManager)¶
- property created_at: datetime¶
アンテナの作成日時
- 戻り値:
アンテナの作成日時
- 戻り値の型:
datetime
- property exclude_keywords: list[str]¶
除外キーワード
- 戻り値:
除外キーワード
- 戻り値の型:
list[str]
- property id: str¶
アンテナのID
- 戻り値:
アンテナのID
- 戻り値の型:
str
- property keywords: list[str]¶
キーワード
- 戻り値:
キーワード
- 戻り値の型:
list[str]
- property name: str¶
アンテナ名
- 戻り値:
アンテナ名
- 戻り値の型:
str
FederationInstance¶
- class mipac.models.instance.FederationInstance(instance: IFederationInstance, *, client: ClientManager)¶
Notification¶
- class mipac.models.notification.Notification(notification: INotification, *, client: ClientManager)¶
NotificationAchievement¶
- class mipac.models.notification.NotificationAchievement(notification: IAchievementNf, *, client: ClientManager)¶
NotificationFollow¶
- class mipac.models.notification.NotificationFollow(notification: IUserNf, *, client: ClientManager)¶
NotificationFollowRequest¶
- class mipac.models.notification.NotificationFollowRequest(notification: IUserNf, *, client: ClientManager)¶
NotificationNote¶
- class mipac.models.notification.NotificationNote(notification: INoteNf, *, client: ClientManager)¶
NotificationPollEnd¶
- class mipac.models.notification.NotificationPollEnd(notification: IPollEndNf, *, client: ClientManager)¶
NotificationReaction¶
- class mipac.models.notification.NotificationReaction(reaction: IReactionNf, *, client: ClientManager)¶
AvatarDecoration¶
- class mipac.models.avatar_decoration.AvatarDecoration(raw_avatar_decoration: IAvatarDecoration, *, client: ClientManager)¶
PartialAd¶
- class mipac.models.lite.ad.PartialAd(raw_ad: T, *, client: ClientManager)¶
- property id: str¶
広告のID
- 戻り値:
広告のID
- 戻り値の型:
str
- property url: str¶
広告のURL
- 戻り値:
広告のURL
- 戻り値の型:
str
AvatarDecoration¶
- class mipac.models.lite.user.AvatarDecoration(raw_avatar_decoration: IAvatarDecoration, *, client: ClientManager)¶
- property angle: int | None¶
Returns the angle of the avatar decoration.
- 戻り値:
The angle of the avatar decoration.
- 戻り値の型:
int | None
- property flip_h: bool | None¶
Returns whether the avatar decoration is flipped horizontally.
- 戻り値:
Whether the avatar decoration is flipped horizontally.
- 戻り値の型:
bool | None
- property id: str¶
Returns the id of the avatar decoration.
- 戻り値:
The id of the avatar decoration.
- 戻り値の型:
str
- property offset_x: int | None¶
Returns the x offset of the avatar decoration.
- 戻り値:
The x offset of the avatar decoration.
- 戻り値の型:
int | None
- property offset_y: int | None¶
Returns the y offset of the avatar decoration.
- 戻り値:
The y offset of the avatar decoration.
- 戻り値の型:
int | None
- property url: str¶
Returns the url of the avatar decoration.
- 戻り値:
The url of the avatar decoration.
- 戻り値の型:
str
BadgeRole¶
- class mipac.models.lite.user.BadgeRole(data: T, *, client: ClientManager)¶
- property display_order: int¶
Returns the display order of the badge role.
- 戻り値:
The display order of the badge role.
- 戻り値の型:
int
- property icon_url: str | None¶
Returns the icon url of the badge role.
- 戻り値:
The icon url of the badge role.
- 戻り値の型:
str | None
- property name: str¶
Returns the name of the badge role.
- 戻り値:
The name of the badge role.
- 戻り値の型:
str
PartialUser¶
- defnickname
- class mipac.models.lite.user.PartialUser(raw_user: PU, *, client: ClientManager)¶
- property api: ClientUserManager¶
Returns the user manager instance.
- 戻り値:
The user manager instance
- 戻り値の型:
- property avatar_blurhash: str | None¶
Returns the avatar blurhash of the user.
- 戻り値:
The avatar blurhash of the user.
- 戻り値の型:
str | None
- property avatar_decoration: list[AvatarDecoration]¶
Returns the avatar decoration of the user.
- 戻り値:
The avatar decoration of the user.
- 戻り値の型:
list[AvatarDecoration]
- property avatar_url: str | None¶
Returns the avatar url of the user.
- 戻り値:
The avatar url of the user.
- 戻り値の型:
str | None
- property badge_roles: list[BadgeRole] | None¶
Returns the badge roles of the user.
- 戻り値:
The badge roles of the user.
- 戻り値の型:
list[BadgeRole] | None
- property emojis: dict[str, str]¶
Returns the emojis of the user.
- 戻り値:
The emojis of the user.
- 戻り値の型:
dict[str, str]
- property host: str | None¶
Returns the host of the user.
- 戻り値:
The host of the user.
- 戻り値の型:
str | None
- property id: str¶
Returns the id of the user.
- property instance: LiteInstance | None¶
Returns the instance of the user.
- 戻り値:
The instance of the user.
- 戻り値の型:
LiteInstance | None
- property is_bot: bool | None¶
Returns whether the user is a bot.
- 戻り値:
Whether the user is a bot.
- 戻り値の型:
bool | None
- property is_cat: bool | None¶
Returns whether the user is a cat.
- 戻り値:
Whether the user is a cat.
- 戻り値の型:
bool | None
- property name: str | None¶
Returns the nickname of the user.
- 戻り値:
The nickname of the user.
- 戻り値の型:
str | None
- nickname¶
Returns the nickname of the user.
バージョン 0.6.0 で非推奨: Use
mipac.models.lite.user.PartialUser.name()
instead.- 戻り値:
The nickname of the user.
- 戻り値の型:
str | None
- property online_status: Literal['online', 'active', 'offline', 'unknown']¶
Returns the online status of the user.
- 戻り値:
The online status of the user.
- 戻り値の型:
IUserOnlineStatus
- property username: str¶
Returns the username of the user.
- 戻り値:
The username of the user.
- 戻り値の型:
str
PartialMeta¶
- class mipac.models.lite.meta.PartialMeta(raw_meta: T, *, client: ClientManager)¶
PartialCustomEmoji¶
- class mipac.models.lite.emoji.PartialCustomEmoji(emoji: ICustomEmojiLite, *, client: ClientManager)¶
PartialRole¶
- class mipac.models.lite.role.PartialRole(role_data: T, *, client: ClientManager)¶
LiteInstance¶
- class mipac.models.lite.instance.LiteInstance(instance: IInstanceLite)¶
- property favicon_url: str | None¶
ファビコンのURL
- 戻り値:
ファビコンのURL
- 戻り値の型:
str | None
- property icon_url: str | None¶
アイコンのURL
- 戻り値:
アイコンのURL
- 戻り値の型:
str | None
- property name: str | None¶
サーバー名
- 戻り値:
サーバー名
- 戻り値の型:
str | None
- property software_name: str | None¶
使用しているソフトウェアの名前
- 戻り値:
使用しているソフトウェアの名前
- 戻り値の型:
str | None
- property software_version: str | None¶
使用しているソフトウェアのバージョン
- 戻り値:
使用しているソフトウェアのバージョン
- 戻り値の型:
str | None
- property theme_color: str | None¶
テーマカラー
- 戻り値:
テーマカラー
- 戻り値の型:
str | None
Managers¶
AppManager¶
- class mipac.manager.app.AppManager(*, session: HTTPClient, client: ClientManager)¶
ClientReactionManager¶
- class mipac.manager.reaction.ClientReactionManager(note_id: str, *, session: HTTPClient, client: ClientManager)¶
- property action: ClientReactionActions¶
リアクションに関するアクション
- 戻り値:
Reactionに対するアクションを行うクラス
- 戻り値の型:
ReactionManager¶
- class mipac.manager.reaction.ReactionManager(note_id: str | None = None, *, session: HTTPClient, client: ClientManager)¶
- property action: ReactionActions¶
リアクションに関するアクション
- 戻り値:
Reactionに対するアクションを行うクラス
- 戻り値の型:
ClientUserManager¶
- class mipac.manager.user.ClientUserManager(user: PartialUser, *, session: HTTPClient, client: ClientManager)¶
UserManager¶
- class mipac.manager.user.UserManager(*, session: HTTPClient, client: ClientManager)¶
UsernameManager¶
- class mipac.manager.username.UsernameManager(*, session: HTTPClient, client: ClientManager)¶
PagesManager¶
- class mipac.manager.page.PagesManager(*, session: HTTPClient, client: ClientManager)¶
FederationManager¶
- class mipac.manager.federation.FederationManager(*, session: HTTPClient, client: ClientManager)¶
ClientFavoriteManager¶
- class mipac.manager.favorite.ClientFavoriteManager(note_id: str, *, session: HTTPClient, client: ClientManager)¶
- property action: ClientFavoriteActions¶
お気に入りに関するアクション
- 戻り値:
お気に入りに対するアクションを行うクラス
- 戻り値の型:
FavoriteManager¶
- class mipac.manager.favorite.FavoriteManager(note_id: str | None = None, *, session: HTTPClient, client: ClientManager)¶
- property action: FavoriteActions¶
お気に入りに関するアクション
- 戻り値:
お気に入りに対するアクションを行うクラス
- 戻り値の型:
ClientManager¶
- class mipac.manager.client.ClientManager(session: HTTPClient, config: Config)¶
ChartManager¶
- class mipac.manager.chart.ChartManager(*, session: HTTPClient, client: ClientManager)¶
ClientFollowManager¶
- class mipac.manager.follow.ClientFollowManager(user_id: str, *, session: HTTPClient, client: ClientManager)¶
FollowManager¶
- class mipac.manager.follow.FollowManager(*, session: HTTPClient, client: ClientManager)¶
FollowRequestManager¶
- class mipac.manager.follow.FollowRequestManager(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)¶
ChannelManager¶
- class mipac.manager.channel.ChannelManager(*, session: HTTPClient, client: ClientManager)¶
ClientChannelManager¶
- class mipac.manager.channel.ClientChannelManager(channel_id: str, *, session: HTTPClient, client: ClientManager)¶
ClientPollManager¶
- class mipac.manager.poll.ClientPollManager(note_id: str, *, session: HTTPClient, client: ClientManager)¶
PollManager¶
- class mipac.manager.poll.PollManager(*, session: HTTPClient, client: ClientManager)¶
ClientInviteManager¶
- class mipac.manager.invite.ClientInviteManager(invite_id: str, *, session: HTTPClient, client: ClientManager)¶
InviteManager¶
- class mipac.manager.invite.InviteManager(*, session: HTTPClient, client: ClientManager)¶
HashtagManager¶
- class mipac.manager.hashtag.HashtagManager(*, session: HTTPClient, client: ClientManager)¶
EmojiManager¶
- class mipac.manager.emoji.EmojiManager(*, session: HTTPClient, client: ClientManager)¶
MyManager¶
- class mipac.manager.my.MyManager(*, session: HTTPClient, client: ClientManager)¶
ClientNoteManager¶
- class mipac.manager.note.ClientNoteManager(note_id: str, *, session: HTTPClient, client: ClientManager)¶
NoteManager¶
- class mipac.manager.note.NoteManager(*, session: HTTPClient, client: ClientManager)¶
User behavior for notes
ClientClipManager¶
- class mipac.manager.clip.ClientClipManager(clip_id: str, *, session: HTTPClient, client: ClientManager)¶
ClipManager¶
- class mipac.manager.clip.ClipManager(*, session: HTTPClient, client: ClientManager)¶
BlockingManager¶
- class mipac.manager.blocking.BlockingManager(*, session: HTTPClient, client: ClientManager)¶
ClientBlockingManager¶
- class mipac.manager.blocking.ClientBlockingManager(user_id: str, *, session: HTTPClient, client: ClientManager)¶
AntennaManager¶
- class mipac.manager.antenna.AntennaManager(*, session: HTTPClient, client: ClientManager)¶
ClientAntennaManager¶
- class mipac.manager.antenna.ClientAntennaManager(*, antenna_id: str, session: HTTPClient, client: ClientManager)¶
RoleManager¶
- class mipac.manager.role.RoleManager(*, session: HTTPClient, client: ClientManager)¶
ClientMuteManager¶
- class mipac.manager.users.mute.ClientMuteManager(user_id: str, *, session: HTTPClient, client: ClientManager)¶
MuteManager¶
- class mipac.manager.users.mute.MuteManager(*, session: HTTPClient, client: ClientManager)¶
ClientPartialUserListManager¶
- class mipac.manager.users.list.ClientPartialUserListManager(user_id: str, *, session: HTTPClient, client: ClientManager)¶
ClientUserListManager¶
- class mipac.manager.users.list.ClientUserListManager(list_id: str, *, session: HTTPClient, client: ClientManager)¶
UserListManager¶
- class mipac.manager.users.list.UserListManager(*, session: HTTPClient, client: ClientManager)¶
AdminAdManager¶
- class mipac.manager.admins.ad.AdminAdManager(*, session: HTTPClient, client: ClientManager)¶
ClientAdminAdManager¶
- class mipac.manager.admins.ad.ClientAdminAdManager(ad_id: str, *, session: HTTPClient, client: ClientManager)¶
AdminRoleManager¶
- class mipac.manager.admins.roles.AdminRoleManager(role_id: str | None = None, *, session: HTTPClient, client: ClientManager)¶
ClientAdminRoleManager¶
- class mipac.manager.admins.roles.ClientAdminRoleManager(role_id: str, *, session: HTTPClient, client: ClientManager)¶
AdminAnnouncementManager¶
- class mipac.manager.admins.announcement.AdminAnnouncementManager(*, session: HTTPClient, client: ClientManager)¶
ClientAdminAnnouncementManager¶
- class mipac.manager.admins.announcement.ClientAdminAnnouncementManager(announce_id: str, *, session: HTTPClient, client: ClientManager)¶
AdminUserManager¶
- class mipac.manager.admins.user.AdminUserManager(*, session: HTTPClient, client: ClientManager)¶
ClientAdminUserManager¶
- class mipac.manager.admins.user.ClientAdminUserManager(user_id: str, *, session: HTTPClient, client: ClientManager)¶
ClientSystemWebhookManager¶
- class mipac.manager.admins.system_webhook.ClientSystemWebhookManager(webhook_id: str, *, session: HTTPClient, client: ClientManager)¶
SystemWebhookManager¶
- class mipac.manager.admins.system_webhook.SystemWebhookManager(*, session: HTTPClient, client: ClientManager)¶
AdminManager¶
- class mipac.manager.admins.admin.AdminManager(session: HTTPClient, client: ClientManager)¶
AdminInviteManager¶
- class mipac.manager.admins.invite.AdminInviteManager(*, session: HTTPClient, client: ClientManager)¶
AdminEmojiManager¶
- class mipac.manager.admins.emoji.AdminEmojiManager(session: HTTPClient, client: ClientManager)¶
ClientAdminEmojiManager¶
- class mipac.manager.admins.emoji.ClientAdminEmojiManager(*, emoji_id: str, session: HTTPClient, client: ClientManager)¶
AdminDriveManager¶
- class mipac.manager.admins.drive.AdminDriveManager(*, session: HTTPClient, client: ClientManager)¶
AdminAccountManager¶
- class mipac.manager.admins.accounts.AdminAccountManager(*, session: HTTPClient, client: ClientManager)¶
DriveManager¶
- class mipac.manager.drive.drive.DriveManager(*, session: HTTPClient, client: ClientManager)¶
ClientFolderManager¶
- class mipac.manager.drive.folders.ClientFolderManager(folder_id: str, *, session: HTTPClient, client: ClientManager)¶
FolderManager¶
- class mipac.manager.drive.folders.FolderManager(*, session: HTTPClient, client: ClientManager)¶
ClientFileManager¶
- class mipac.manager.drive.files.ClientFileManager(file_id: str, *, session: HTTPClient, client: ClientManager)¶
DriveFileManager¶
- class mipac.manager.drive.files.DriveFileManager(*, session: HTTPClient, client: ClientManager)¶
Actions¶
AppActions¶
- class mipac.actions.app.AppActions(*, session: HTTPClient, client: ClientManager)¶
- async create(name: str, description: str, permission: list[str], callback_url: str | None = None) App ¶
Create a new app
- パラメータ:
name (str) -- The name of the app
description (str) -- The description of the app
permission (list[str]) -- The permissions the app has
callback_url (str, optional) -- The callback url of the app, by default None
- 戻り値:
The created app
- 戻り値の型:
ClientReactionActions¶
- class mipac.actions.reaction.ClientReactionActions(note_id: str, *, session: HTTPClient, client: ClientManager)¶
- async add(reaction: str) bool ¶
Add reaction to note
Endpoint: /api/notes/reactions/create
- パラメータ:
reaction (str) -- reaction
- 戻り値:
success or not
- 戻り値の型:
bool
- async remove() bool ¶
Remove reaction from note
Endpoint: /api/notes/reactions/delete
- 戻り値:
success or not
- 戻り値の型:
bool
ReactionActions¶
- class mipac.actions.reaction.ReactionActions(*, session: HTTPClient, client: ClientManager)¶
ClientUserActions¶
- asyncget_achievements
- defget_all_featured_notes
- asyncget_featured_notes
- asyncget_followers
- asyncget_following
- asyncget_frequently_replied_users
- asyncget_gallery_posts
- class mipac.actions.user.ClientUserActions(user: PartialUser, *, session: HTTPClient, client: ClientManager)¶
- async get_achievements() list[Achievement] ¶
Get achievements of user.
- async get_all_featured_notes(limit: int = 10, until_id: str | None = None) AsyncGenerator[Note, None] ¶
Get all featured notes of user.
Endpoint: /api/users/featured-notes
- パラメータ:
limit (int, default=10) -- The maximum number of featured notes to return.
until_id (str, default=None) -- Get featured notes before this id.
- 戻り値:
A list of featured notes.
- 戻り値の型:
list[Note]
- async get_featured_notes(limit: int = 10, until_id: str | None = None) list[Note] ¶
Get featured notes of user.
Endpoint: /api/users/featured-notes
- パラメータ:
limit (int, default=10) -- The maximum number of featured notes to return.
until_id (str, default=None) -- Get featured notes before this id.
- 戻り値:
A list of featured notes.
- 戻り値の型:
list[Note]
- async get_followers(since_id: str | None = None, until_id: str | None = None, limit: int = 10, username: str | None = None, host: str | None = None) list[Follower] ¶
Get followers of user.
Endpoint: /api/users/followers
- パラメータ:
since_id (str, default=None) -- Get followers after this id.
until_id (str, default=None) -- Get followers before this id.
limit (int, default=10) -- The maximum number of followers to return.
username (str, default=None) -- Get followers with this username.
host (str, default=None) -- Get followers with this host.
- 戻り値:
A list of followers.
- 戻り値の型:
list[Follower]
- async get_following(since_id: str | None = None, until_id: str | None = None, limit: int = 10, username: str | None = None, host: str | None = None, birthday: str | None = None) list[Following] ¶
Get following of user.
Endpoint: /api/users/following
- パラメータ:
since_id (str, default=None) -- Get following after this id.
until_id (str, default=None) -- Get following before this id.
limit (int, default=10) -- The maximum number of following to return.
username (str, default=None) -- Get following with this username.
host (str, default=None) -- Get following with this host.
- 戻り値:
A list of following.
- 戻り値の型:
list[Following]
- async get_frequently_replied_users(limit: int = 10) list[FrequentlyRepliedUser] ¶
Get frequently replied users of user.
Endpoint: /api/users/get-frequently-replied-users
- パラメータ:
limit (int, default=10) -- The maximum number of frequently replied users to return.
user_id (str, default=None) -- Get frequently replied users with this user id.
- 戻り値:
A list of frequently replied users.
- 戻り値の型:
list[FrequentlyRepliedUser]
- async get_gallery_posts(limit: int = 10, since_id: str | None = None, until_id: str | None = None) list[GalleryPost] ¶
Get gallery posts of user.
Endpoint: /api/users/gallery/posts
- パラメータ:
limit (int, default=10) -- The maximum number of gallery posts to return.
since_id (str, default=None) -- Get gallery posts after this id.
until_id (str, default=None) -- Get gallery posts before this id.
- 戻り値:
A list of gallery posts.
- 戻り値の型:
list[GalleryPost]
UserActions¶
- asyncfetch
- asyncget
- asyncget_me
- defget_mention
- defsearch
- asyncsearch_by_username_and_host
- class mipac.actions.user.UserActions(session: HTTPClient, client: ClientManager)¶
- async fetch(user_id: str | None = None, user_ids: list[str] | None = None, username: str | None = None, host: str | None = None) UserDetailedNotMe | MeDetailed ¶
Retrieve the latest user information using the target user ID or username. If you do not need the latest information, you should basically use the get method. This method accesses the server each time, which may increase the number of server accesses.
- パラメータ:
user_id (str) -- target user id
username (str) -- target username
username -- target username
host (str, default=None) -- Hosts with target users
- async get(user_id: str | None = None, user_ids: list[str] | None = None, username: str | None = None, host: str | None = None) UserDetailedNotMe | MeDetailed ¶
Retrieve user information from the user ID using the cache. If there is no cache, fetch is automatically used. The fetch method is recommended if you want up-to-date user information.
- パラメータ:
user_id (str) -- target user id
user_ids (list[str]) -- target user ids
username (str) -- target username
host (str, default=None) -- Hosts with target users
- async get_me() MeDetailed ¶
ログインしているユーザーの情報を取得します
- get_mention(user: PartialUser) str ¶
対象のユーザーのメンションを取得します
バージョン 0.6.3 で非推奨:
mipac.models.user.PartialUser._get_mention()
を使用することを推奨します。- パラメータ:
user (PartialUser) -- 対象のユーザー
- 戻り値:
メンション
- 戻り値の型:
str
- async search(query: str, limit: int = 100, offset: int = 0, origin: Literal['local', 'remote', 'combined'] = 'combined', detail: Literal[False] = True, *, get_all: bool = False) AsyncGenerator[PartialUser, None] ¶
- async search(query: str, limit: int = 100, offset: int = 0, origin: Literal['local', 'remote', 'combined'] = 'combined', detail: Literal[True] = True, *, get_all: bool = False) AsyncGenerator[UserDetailedNotMe | MeDetailed, None]
Search users by keyword.
- パラメータ:
query (str) -- Keyword to search.
limit (int, default=100) -- The maximum number of users to return.
offset (int, default=0) -- The number of users to skip.
origin (Literal['local', 'remote', 'combined'], default='combined') -- The origin of users to search.
detail (Literal[True, False], default=True) -- Whether to return detailed user information.
get_all (bool, default=False) -- Whether to return all users.
- async search_by_username_and_host(username: str, host: str, limit: int = 100, detail: bool = True) list[UserDetailedNotMe | MeDetailed | PartialUser] ¶
Search users by username and host.
- パラメータ:
username (str) -- Username of user.
host (str) -- Host of user.
limit (int, default=100) -- The maximum number of users to return.
detail (bool, default=True) -- Weather to get detailed user information.
- 戻り値:
A list of users.
- 戻り値の型:
list[UserDetailedNotMe | MeDetailed | PartialUser]
UsernameActions¶
- class mipac.actions.username.UsernameActions(*, session: HTTPClient, client: ClientManager)¶
FederationActions¶
- class mipac.actions.federation.FederationActions(*, session: HTTPClient, client: ClientManager)¶
ClientFavoriteActions¶
- class mipac.actions.favorite.ClientFavoriteActions(note_id: str, *, session: HTTPClient, client: ClientManager)¶
FavoriteActions¶
- class mipac.actions.favorite.FavoriteActions(*, session: HTTPClient, client: ClientManager)¶
ClientActions¶
- class mipac.actions.client.ClientActions(*, session: HTTPClient, client: ClientManager)¶
ChartActions¶
- class mipac.actions.chart.ChartActions(session: HTTPClient, client: ClientManager)¶
ClientFollowActions¶
- asyncadd
- asyncinvalidate
- asyncremove
- class mipac.actions.follow.ClientFollowActions(user_id: str, *, session: HTTPClient, client: ClientManager)¶
- async add() PartialUser ¶
対象のユーザーをフォローします
バージョン 0.6.1 で非推奨: Use
mipac.actions.follow.SharedFollowActions.create()
instead.- 戻り値:
The user that you followed
- 戻り値の型:
UserLite
- async invalidate() PartialUser ¶
Make the user unfollows you
- 戻り値:
The user that followed you
- 戻り値の型:
- async remove() PartialUser ¶
対象のユーザーのフォローを解除します
バージョン 0.6.1 で非推奨: Use
mipac.actions.follow.SharedFollowActions.delete()
instead.- 戻り値:
The user that you unfollowed
- 戻り値の型:
FollowActions¶
- class mipac.actions.follow.FollowActions(*, session: HTTPClient, client: ClientManager)¶
FollowRequestActions¶
- class mipac.actions.follow.FollowRequestActions(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)¶
- async accept(user_id: str | None = None) bool ¶
Accept a follow request
- パラメータ:
user_id (str) -- The user ID to accept
- 戻り値:
Whether the request was accepted
- 戻り値の型:
bool
- async cancel(user_id: str | None = None) PartialUser ¶
Cancel a follow request
- パラメータ:
user_id (str) -- The user ID to cancel
- 戻り値:
The user that you canceled to follow
- 戻り値の型:
- async get_all() list[FollowRequest] ¶
Get all follow requests
- 戻り値:
List of follow requests
- 戻り値の型:
list[FollowRequest]
- async reject(user_id: str | None = None) bool ¶
Reject a follow request
- パラメータ:
user_id (str) -- The user ID to reject
- 戻り値:
Whether the request was rejected
- 戻り値の型:
bool
ChannelActions¶
- asynccreate
- asyncfeatured
- defget_all_followed
- defget_all_owned
- asyncmy_favorites
- asyncowned
- asyncsearch
- asyncshow
- class mipac.actions.channel.ChannelActions(*, session: HTTPClient, client: ClientManager)¶
- async create(name: str, color: str = MISSING, description: str = MISSING, banner_id: str = MISSING, is_sensitive: bool = MISSING, allow_renote_to_external: bool = MISSING) Channel ¶
チャンネルを作成します
Endpoint: /api/channels/create
- パラメータ:
name (str) -- チャンネル名
color (str) -- チャンネルの色, default=MISSING
description (str) -- チャンネルの説明, default=MISSING
banner_id (str) -- チャンネルのバナーに使用するファイルのID, default=MISSING
is_sensitive (bool) -- チャンネルがセンシティブかどうか, default=MISSING
allow_renote_to_external (bool, optional) -- 外部へのリノートを許可するかどうか, default=MISSING
- 戻り値:
作成したチャンネル
- 戻り値の型:
- async featured() list[Channel] ¶
トレンドのチャンネルを取得します
Endpoint: /api/channels/featured
- 戻り値:
取得したチャンネルのリスト
- 戻り値の型:
list[Channel]
- async get_all_followed(since_id: str | None = None, until_id: str | None = None, limit: int = 5) AsyncGenerator[Channel, None] ¶
フォロー中のすべてのチャンネルを取得します
Endpoint: /api/channels/followed
- パラメータ:
since_id (str | None) -- 指定したチャンネルIDよりも後のチャンネルを取得します, default=None
until_id (str | None) -- 指定したチャンネルIDよりも前のチャンネルを取得します, default=None
limit (int, optional) -- 一度に取得するチャンネルの数, default=5
- 戻り値:
取得したフォロー中のチャンネル
- 戻り値の型:
AsyncGenerator[Channel, None]
- async get_all_owned(since_id: str | None = None, until_id: str | None = None, limit: int = 5) AsyncGenerator[Channel, None] ¶
自分が所有しているすべてのチャンネルを取得します
Endpoint: /api/channels/owned
- パラメータ:
since_id (str, optional) -- 指定したチャンネルIDよりも後のチャンネルを取得します, default=None
until_id (str, optional) -- 指定したチャンネルIDよりも前のチャンネルを取得します, default=None
limit (int, optional) -- 一度に取得するチャンネルの数, default=5
- 戻り値:
取得した自分が所有しているチャンネル
- 戻り値の型:
AsyncGenerator[Channel, None]
- async my_favorites() list[Channel] ¶
自分がお気に入りにしているチャンネルを取得します
Endpoint: /api/channels/myFavorites
- 戻り値:
取得したチャンネルのリスト
- 戻り値の型:
list[Channel]
- async owned(since_id: str | None = None, until_id: str | None = None, limit: int = 5) list[Channel] ¶
自分が所有しているチャンネル一覧を取得します
Endpoint: /api/channels/owned
- パラメータ:
since_id (str, optional) -- 指定したチャンネルIDよりも後のチャンネルを取得します, default=None
until_id (str, optional) -- 指定したチャンネルIDよりも前のチャンネルを取得します, default=None
limit (int, optional) -- 一度に取得するチャンネルの数, default=5
- 戻り値:
取得した自分が所有しているチャンネルのリスト
- 戻り値の型:
list[Channel]
- async search(query: str, type: Literal['nameAndDescription', 'nameOnly'] = 'nameAndDescription', since_id: str | None = None, until_id: str | None = None, limit: int = 5) list[Channel] ¶
チャンネルを検索します
Endpoint: /api/channels/search
- パラメータ:
query (str) -- 検索するキーワード
type (Literal["nameAndDescription","nameOnly"]) -- 検索に用いる形式, default="nameAndDescription"
since_id (str | None) -- 指定したIDのチャンネルより後のチャンネルを取得します, default=None
until_id (str, optional) -- 指定したIDのチャンネルより前のチャンネルを取得します, default=None
limit (int, optional) -- 一度に取得するチャンネルの数, default=5
- 戻り値:
見つかったチャンネルのリスト
- 戻り値の型:
list[Channel]
ClientChannelActions¶
- asyncfavorite
- asyncfollow
- defget_all_timeline
- asyncsend
- asynctimeline
- asyncunfavorite
- asyncunfollow
- asyncupdate
- class mipac.actions.channel.ClientChannelActions(channel_id: str, *, session: HTTPClient, client: ClientManager)¶
- async favorite() bool ¶
指定したIDのチャンネルをお気に入りにします
Endpoint: /api/channels/favorite
- 戻り値:
お気に入りに追加できたかどうか
- 戻り値の型:
bool
- async follow() bool ¶
チャンネルをフォローします
Endpoint: /api/channels/follow
- 戻り値:
チャンネルをフォローしているかどうか
- 戻り値の型:
bool
- async get_all_timeline(since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None) AsyncGenerator[Note, None] ¶
チャンネルのタイムラインを全て取得します
Endpoint: /api/channels/timeline
- パラメータ:
limit (int) -- 一度に取得する件数, default=10
since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None
until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None
since_date (int | None) -- 指定した日付のノートより後のノートを取得します, default=None
until_date (int | None) -- 指定した日付のノートより前のノートを取得します, default=None
- 戻り値:
取得したノートのリスト
- 戻り値の型:
AsyncGenerator[Note, None]
- async send(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None) Note ¶
ノートを投稿します
Endpoint: /api/notes/create
- パラメータ:
text (str, optional) -- ノートのテキスト, default=None
visibility (INoteVisibility, optional) -- ノートの公開範囲, default="public"
visible_user_ids (list[str], optional) -- 公開するユーザーのIDを持つリスト, default=None
cw (str, optional) -- ノートが閲覧注意(NSFW)であるか, default=None
local_only (bool, optional) -- ノートをローカルのみにするか否か, default=False
reaction_acceptance (IReactionAcceptance, optional) -- ノートにリアクションを受け入れるか否か, default=None
extract_mentions (bool, optional) -- メンションを抽出するかであるか, default=True
extract_hashtags (bool, optional) -- ハッシュタグを抽出するかであるか, default=True
extract_emojis (bool, optional) -- 絵文字を抽出するかであるか, default=True
reply_id (str, optional) -- 返信元のノートID, default=None
renote_id (str, optional) -- リノート元のID, default=None
files (list[MiFile | File | str], optional) -- 添付するファイル, default=None
poll (MiPoll, optional) -- アンケート, default=None
- 戻り値:
Created note
- 戻り値の型:
- async timeline(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None) list[Note] ¶
チャンネルのタイムラインを取得します
Endpoint: /api/channels/timeline
- パラメータ:
limit (int) -- 一度に取得する件数, default=10
since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None
until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None
since_date (int | None) -- 指定した日付のノートより後のノートを取得します, default=None
until_date (int | None) -- 指定した日付のノートより前のノートを取得します, default=None
- 戻り値:
取得したノートのリスト
- 戻り値の型:
list[Note]
- async unfavorite() bool ¶
指定したIDのチャンネルをお気に入りから外します
Endpoint: /api/channels/unfavorite
- 戻り値:
お気に入りから外せたかどうか
- 戻り値の型:
bool
- async unfollow() bool ¶
指定したIDのチャンネルのフォローを解除します
Endpoint: /api/channels/unfollow
- 戻り値:
フォロー解除に成功したかどうか
- 戻り値の型:
bool
- async update(name: str | None = MISSING, description: str | None = MISSING, banner_id: str | None = MISSING, is_archived: bool | None = MISSING, pinned_note_ids: list[str] | None = MISSING, color: str | None = MISSING, is_sensitive: bool | None = MISSING, allow_renote_to_external: bool | None = MISSING) Channel ¶
チャンネルの情報を更新します
Endpoint: /api/channels/update
- パラメータ:
name (str | None) -- チャンネル名, default=MISSING
description (str | None) -- チャンネルの説明, default=MISSING
banner_id (str | None) -- バナー画像のID, default=MISSING
is_archived (bool | None) -- チャンネルがアーカイブされているかどうか, default=MISSING
pinned_note_ids (list[str] | None) -- ピン留めするノートのIDリスト, default=MISSING
color (str | None) -- チャンネルの色, default=MISSING
is_sensitive (bool | None) -- チャンネルがセンシティブかどうか, default=MISSING
allow_renote_to_external (bool | None) -- 外部へのリノートを許可するかどうか, default=MISSING
- 戻り値:
更新後のチャンネル
- 戻り値の型:
ClientPollActions¶
- class mipac.actions.poll.ClientPollActions(note_id: str, *, session: HTTPClient, client: ClientManager)¶
PollActions¶
- class mipac.actions.poll.PollActions(*, session: HTTPClient, client: ClientManager)¶
ClientInviteActions¶
- asyncdelete
- class mipac.actions.invite.ClientInviteActions(invite_id: str, *, session: HTTPClient, client: ClientManager)¶
- async delete() bool ¶
Delete an invite code.
- 戻り値:
Whether the invite code was deleted.
- 戻り値の型:
bool
InviteActions¶
- asynccreate
- defget_all_list
- asyncget_limit
- asyncget_list
- class mipac.actions.invite.InviteActions(*, session: HTTPClient, client: ClientManager)¶
- async create() InviteCode ¶
Create a new invite code.
Endpoint: /api/invite/create
- 戻り値:
The invite code created.
- 戻り値の型:
PartialInviteCode
- async get_all_list(since_id: str | None = None, until_id: str | None = None) AsyncGenerator[InviteCode, None] ¶
Get all invite codes created by you.
Endpoint: /api/invite/list
- パラメータ:
since_id (str | None, optional) -- The id of the invite code to get since, by default None
until_id (str | None, optional) -- The id of the invite code to get until, by default None
- 戻り値:
The list of invite codes.
- 戻り値の型:
list[PartialInviteCode]
- async get_limit() InviteLimit ¶
Get the number of invite codes you can create.
Endpoint: /api/invite/limit
- 戻り値:
The number of invite codes you can create.
- 戻り値の型:
int
- async get_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None) list[InviteCode] ¶
Get a list of invitation codes created by you.
Endpoint: /api/invite/list
- パラメータ:
limit (int, optional) -- The number of invite codes to get, by default 30
since_id (str | None, optional) -- The id of the invite code to get since, by default None
until_id (str | None, optional) -- The id of the invite code to get until, by default None
- 戻り値:
The list of invite codes.
- 戻り値の型:
list[PartialInviteCode]
HashtagActions¶
- class mipac.actions.hashtag.HashtagActions(*, session: HTTPClient, client: ClientManager)¶
- async get_list(sort: Literal['+mentionedUsers', '-mentionedUsers', '+mentionedLocalUsers', '-mentionedLocalUsers', '+mentionedRemoteUsers', '-mentionedRemoteUsers', '+attachedUsers', '-attachedUsers', '+attachedLocalUsers', '-attachedLocalUsers', '+attachedRemoteUsers', '-attachedRemoteUsers'], limit: int = 10, attached_to_user_only: bool = False, attached_to_local_user_only: bool = False, attached_to_remote_user_only: bool = False) list[Hashtag] ¶
ハッシュタグのリストを取得します。
- パラメータ:
sort (Literal[) -- "+mentionedUsers", "-mentionedUsers", "+mentionedLocalUsers", "-mentionedLocalUsers", "+mentionedRemoteUsers", "-mentionedRemoteUsers", "+attachedUsers", "-attachedUsers", "+attachedLocalUsers", "-attachedLocalUsers", "+attachedRemoteUsers", "-attachedRemoteUsers",
] -- ソートの方法を指定します。
limit (int, optional) -- 取得するハッシュタグの数を指定します, default=10
attached_to_user_only (bool, optional) -- ユーザーに添付されたハッシュタグのみを取得するかどうかを指定します, default=False
attached_to_local_user_only (bool, optional) -- ローカルユーザーに添付されたハッシュタグのみを取得するかどうかを指定します, default=False
attached_to_remote_user_only (bool, optional) -- リモートユーザーに添付されたハッシュタグのみを取得するかどうかを指定します, default=False
- 戻り値:
取得したハッシュタグのリストです。
- 戻り値の型:
list[Hashtag]
- async get_trend()¶
トレンドのハッシュタグを取得します。
- 戻り値:
取得したハッシュタグのリストです。
- 戻り値の型:
list[TrendHashtag]
EmojiActions¶
- class mipac.actions.emoji.EmojiActions(*, session: HTTPClient, client: ClientManager)¶
MyActions¶
- class mipac.actions.my.MyActions(session: HTTPClient, client: ClientManager)¶
- async get_claim_achievement(name: Literal['notes1', 'notes10', 'notes100', 'notes500', 'notes1000', 'notes5000', 'notes10000', 'notes20000', 'notes30000', 'notes40000', 'notes50000', 'notes60000', 'notes70000', 'notes80000', 'notes90000', 'notes100000', 'login3', 'login7', 'login15', 'login30', 'login60', 'login100', 'login200', 'login300', 'login400', 'login500', 'login600', 'login700', 'login800', 'login900', 'login1000', 'passedSinceAccountCreated1', 'passedSinceAccountCreated2', 'passedSinceAccountCreated3', 'loggedInOnBirthday', 'loggedInOnNewYearsDay', 'noteClipped1', 'noteFavorited1', 'myNoteFavorited1', 'profileFilled', 'markedAsCat', 'following1', 'following10', 'following50', 'following100', 'following300', 'followers1', 'followers10', 'followers50', 'followers100', 'followers300', 'followers500', 'followers1000', 'collectAchievements30', 'viewAchievements3min', 'iLoveMisskey', 'foundTreasure', 'client30min', 'client60min', 'noteDeletedWithin1min', 'postedAtLateNight', 'postedAt0min0sec', 'selfQuote', 'htl20npm', 'viewInstanceChart', 'outputHelloWorldOnScratchpad', 'open3windows', 'driveFolderCircularReference', 'reactWithoutRead', 'clickedClickHere', 'justPlainLucky', 'setNameToSyuilo', 'cookieClicked', 'brainDiver']) bool ¶
指定した名前の実績を解除します
- パラメータ:
name (実績名) -- 解除したい実績の名前
- 戻り値:
成功したか否か
- 戻り値の型:
bool
- 例外:
NotSupportVersion -- 実績機能が存在しないサーバーを使用している
create_note_body¶
- mipac.actions.note.create_note_body(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, media_ids: list[str] | None = None, poll: MiPoll | None = None)¶
ClientNoteActions¶
- asyncadd_clips
- asynccreate_quote
- asynccreate_renote
- asyncdelete
- asyncfetch_children
- asyncfetch_state
- defget_all_children
- defget_all_replies
- asyncget_clips
- asyncget_conversation
- asyncget_renotes
- asyncget_replies
- asyncget_state
- asyncrenote
- asynctranslate
- asyncun_renote
- class mipac.actions.note.ClientNoteActions(note_id: str, *, session: HTTPClient, client: ClientManager)¶
- async add_clips(clip_id: str) bool ¶
Add a note to the clip
Endpoint: /api/clips/add-note
- パラメータ:
clip_id (str) -- clip id
- 戻り値:
success or not
- 戻り値の型:
bool
- async create_quote(content: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None) Note ¶
Create a note quote.
Endpoint: /api/notes/create
- パラメータ:
content (str | None, default=None) -- text
visibility (INoteVisibility, default='public') -- Disclosure range
visible_user_ids (list[str] | None, default=None) -- List of users to be published
cw (str | None, default=None) -- Text to be displayed when warning is given
local_only (bool, default=False) -- Whether to show only locally or not
extract_mentions (bool, default=True) -- Whether to expand the mention
extract_hashtags (bool, default=True) -- Whether to expand the hashtag
extract_emojis (bool, default=True) -- Whether to expand the emojis
files (list[MiFile | File | str] | None, default=None) -- The ID list of files to be attached
poll (MiPoll | None, default=None) -- Questionnaire to be created
- async delete() bool ¶
Delete a note
Endpoint: /api/notes/delete
- パラメータ:
note_id (str | None, default=None) -- note id
- 戻り値:
success or not
- 戻り値の型:
bool
- async fetch_children(limit: int = 100, since_id: str | None = None, untilId: str | None = None) list[Note] ¶
Get children of the note. update the cache of the
mipac.actions.note.ClientNoteActions.get_children()
methodEndpoint: /api/notes/children
- パラメータ:
limit (int, default=100) -- limit
since_id (str | None, default=None) -- Since ID
untilId (str | None, default=None) -- Until ID
- 戻り値:
Children of the note
- 戻り値の型:
list[Note]
- async fetch_state() NoteState ¶
Get the state of the note.
update the cache of the
mipac.actions.note.ClientNoteActions.get_state()
methodEndpoint: /api/notes/state
- 戻り値:
Note state
- 戻り値の型:
- async get_all_children(limit: int = 10, since_id: str | None = None, untilId: str | None = None) AsyncGenerator[Note, None] ¶
Get all children of the note
Endpoint: /api/notes/children
- パラメータ:
since_id (str | None, default=None) -- Since ID
untilId (str | None, default=None) -- Until ID
- 戻り値:
Children of the note
- 戻り値の型:
AsyncGenerator[Note, None]
- async get_all_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10) AsyncGenerator[Note, None] ¶
Get replies to the note
Endpoint: /api/notes/replies
- パラメータ:
since_id (str | None, default=None) -- since id
until_id (str | None, default=None) -- until id
- 戻り値:
replies
- 戻り値の型:
AsyncGenerator[Note, None]
- async get_clips() list[Clip] ¶
Get the clips of the note
Endpoint: /api/notes/clips
- 戻り値:
Clips of the note
- 戻り値の型:
list[Clip]
- async get_conversation(limit: int = 10, offset: int = 0) list[Note] ¶
Get the conversation of the note
Endpoint: /api/notes/conversation
- パラメータ:
limit (int, default=10) -- limit
offset (int, default=0) -- offset
- 戻り値:
Notes of the conversation
- 戻り値の型:
list[Note]
- async get_renotes(limit: int = 10, since_id: str | None = None, until_id: str | None = None) list[Note] ¶
Get renote of the note
Endpoint: /api/notes/renotes
- パラメータ:
limit (int, default=10) -- limit
since_id (str | None, default=None) -- Since ID
until_id (str | None, default=None) -- Until ID
- 戻り値:
Renotes of the note
- 戻り値の型:
list[Note]
- async get_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10) list[Note] ¶
Get replies to the note
Endpoint: /api/notes/replies
- パラメータ:
since_id (str | None, default=None) -- since id
until_id (str | None, default=None) -- until id
limit (int, default=10) -- limit
- 戻り値:
replies
- 戻り値の型:
list[Note]
- async get_state() NoteState ¶
Get the state of the note
Endpoint: /api/notes/state
- 戻り値:
Note state
- 戻り値の型:
- async renote(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None)¶
Renote a note
Endpoint: /api/notes/create
- パラメータ:
text (str | None, default=None) -- text
visibility (INoteVisibility, default='public') -- Disclosure range
visible_user_ids (list[str] | None, default=None) -- List of users to be published
cw (str | None, default=None) -- Text to be displayed when warning is given
local_only (bool, default=False) -- Whether to show only locally or not
reaction_acceptance (IReactionAcceptance, default=None) -- Reaction acceptance setting
extract_mentions (bool, default=True) -- Whether to expand the mention
extract_hashtags (bool, default=True) -- Whether to expand the hashtag
extract_emojis (bool, default=True) -- Whether to expand the emojis
channel_id (str | None, default=None) -- Channel ID
files (list[MiFile | File | str] | None, default=None) -- The ID list of files to be attached
poll (MiPoll | None, default=None)
- async translate(target_lang: str = 'en-US') NoteTranslateResult ¶
Translate a note
Endpoint: /api/notes/translate
- パラメータ:
target_lang (str, default='en') -- Target language
- 戻り値:
Translated result
- 戻り値の型:
- async un_renote() bool ¶
Releases the note renote for the specified Id
- 戻り値:
Whether the release was successful
- 戻り値の型:
bool
NoteActions¶
- asyncfetch
- asyncget
- defget_all_search
- defget_all_search_by_tag
- asyncget_featured
- asyncget_global_time_line
- asyncget_mentions
- asyncget_time_line
- asyncsearch
- asyncsearch_by_tag
- defsend
- class mipac.actions.note.NoteActions(*, session: HTTPClient, client: ClientManager)¶
- async fetch(note_id: str) Note ¶
Get a note.
update the cache of the
mipac.actions.note.NoteActions.get()
methodEndpoint: /api/notes/show
- パラメータ:
note_id (str) -- note id
- 戻り値:
note
- 戻り値の型:
- async get(note_id: str) Note ¶
Get a note
Endpoint: /api/notes/show
- パラメータ:
note_id (str) -- ノートのID
- 戻り値:
取得したノートID
- 戻り値の型:
- async get_all_search(query: str, since_id: str | None = None, until_id: str | None = None, limit: int = 10, offset: int = 0, host: str | None = None, user_id: str | None = None, channel_id: str | None = None) AsyncGenerator[Note, None] ¶
ノートを検索します
Endpoint: /api/notes/search
- パラメータ:
query (str) -- 検索クエリ
since_id (str | None, default=None) -- このIDより後のノートを取得します
until_id (str | None, default=None) -- このIDより前のノートを取得します
limit (int, default=10) -- 取得するノートの数
offset (int, default=0) -- オフセット
host (str | None, default=None) -- 対象のサーバー localhostは . で表現します
user_id (str | None, default=None) -- 対象のユーザー
channel_id (str | None, default=None) -- 対象のチャンネル
- 戻り値:
検索結果
- 戻り値の型:
AsyncGenerator[Note, None]
- async get_all_search_by_tag(tag: str, reply: bool | None = None, renote: bool | None = None, with_files: bool | None = None, poll: bool | None = None, since_id: str | None = None, until_id: str | None = None, limit: int = 10, query: list[list[str]] | None = None) AsyncGenerator[Note, None] ¶
一致するタグのノートを取得します
Endpoint: /api/notes/search-by-tag
- 戻り値:
見つかったノート
- 戻り値の型:
AsyncGenerator[Note, None]
- async get_featured(limit: int = 10, until_id: str | None = None, channel_id: str | None = None)¶
Get featured notes
Endpoint: /api/notes/featured
- パラメータ:
limit (int, default=10) -- limit
until_id (str | None, default=None) -- Until ID
channel_id (str | None, default=None) -- channel id
- 戻り値:
featured notes
- 戻り値の型:
list[Note]
- async get_global_time_line(with_files: bool = False, with_renotes: bool = True, limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None)¶
Get global timeline
Endpoint: /api/notes/global-timeline
- パラメータ:
with_files (bool, default=False) -- Whether to include files
with_renotes (bool, default=True) -- Whether to include renote
limit (int, default=10) -- limit
since_id (str | None, default=None) -- Since ID
until_id (str | None, default=None) -- Until ID
since_date (int | None, default=None) -- Since date
until_date (int | None, default=None) -- Until date
- 戻り値:
global timeline
- 戻り値の型:
list[Note]
- async get_mentions(following: bool = False, limit: int = 10, since_id: str | None = None, until_id: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public')¶
Get notes with mentions addressed to you
Endpoint: /api/notes/mentions
- パラメータ:
following (bool, default=False) -- Whether to include only users you follow
limit (int, default=10) -- limit
since_id (str | None, default=None) -- Since ID
until_id (str | None, default=None) -- Until ID
visibility (INoteVisibility, default='public') -- Disclosure range
- async get_time_line(list_id: str, limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None, include_renote_my_notes: bool = True, include_local_renotes: bool = True, with_renotes: bool = True, with_files: bool = True) list[Note] ¶
Get the timeline of the specified list
Endpoint: /api/notes/user-list-timeline
- パラメータ:
list_id (str) -- List ID
limit (int, default=10) -- limit
since_id (str | None, default=None) -- Since ID
until_id (str | None, default=None) -- Until ID
since_date (int | None, default=None) -- Since date
until_date (int | None, default=None) -- Until date
include_renote_my_notes (bool, default=True) -- Whether to include your own renote
include_local_renotes (bool, default=True) -- Whether to include local renote
with_renotes (bool, default=True) -- Whether to include renote
with_files (bool, default=True) -- Whether to include files
- 戻り値の型:
list[Note]
メモ
- async search(query: str, since_id: str | None = None, until_id: str | None = None, limit: int = 10, offset: int = 0, host: str | None = None, user_id: str | None = None, channel_id: str | None = None)¶
ノートを検索します
Endpoint: /api/notes/search
- パラメータ:
query (str) -- 検索クエリ
since_id (str | None, default=None) -- このIDより後のノートを取得します
until_id (str | None, default=None) -- このIDより前のノートを取得します
limit (int, default=10) -- 取得するノートの数
offset (int, default=0) -- オフセット
host (str | None, default=None) -- 対象のサーバー localhostは . で表現します
user_id (str | None, default=None) -- 対象のユーザー
channel_id (str | None, default=None) -- 対象のチャンネル
- 戻り値:
検索結果
- 戻り値の型:
list[Note]
- async search_by_tag(tag: str, reply: bool | None = None, renote: bool | None = None, with_files: bool | None = None, poll: bool | None = None, since_id: str | None = None, until_id: str | None = None, limit: int = 10, query: list[list[str]] | None = None)¶
一致するタグのノートを取得します
Endpoint: /api/notes/search-by-tag
- 戻り値:
見つかったノート
- 戻り値の型:
list[Note]
- send(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None) Note ¶
Send a note
Endpoint: /api/notes/create
- パラメータ:
text (str | None, default=None) -- 投稿する内容
visibility (INoteVisibility, optional) -- 公開範囲, by default "public" Enum: "public" "home" "followers" "specified"
visible_user_ids (list[str] | None, optional) -- 公開するユーザー, by default None
cw (str | None, optional) -- 閲覧注意の文字, by default None
local_only (bool, optional) -- ローカルにのみ表示するか, by default False
reaction_acceptance (IReactionAcceptance, optional) -- リアクションの受け入れ設定, by default None
extract_mentions (bool, optional) -- メンションを展開するか, by default True
extract_hashtags (bool, optional) -- ハッシュタグを展開するか, by default True
extract_emojis (bool, optional) -- 絵文字を展開するか, by default True
reply_id (str | None, optional) -- リプライ先のid, by default None
renote_id (str | None, optional) -- リノート先のid, by default None
channel_id (str | None, optional) -- チャンネルid, by default None
files (list[MiFile | File | str], optional) -- 添付するファイルのリスト, by default None
poll (MiPoll | None, optional) -- アンケート, by default None
- 戻り値:
投稿したノート
- 戻り値の型:
- 例外:
ContentRequired -- [description]
ClientClipActions¶
- asyncadd_note
- asyncdelete
- defget_all_notes
- asyncremove_note
- asyncupdate
- class mipac.actions.clip.ClientClipActions(clip_id: str, *, session: HTTPClient, client: ClientManager)¶
- async add_note(note_id: str) bool ¶
Add a note to a clip
- パラメータ:
note_id (str) -- The note id
- 戻り値:
True if the note was added to the clip, False otherwise
- 戻り値の型:
bool
- async delete() bool ¶
Delete a clip
- 戻り値:
True if the clip was deleted, False otherwise
- 戻り値の型:
bool
- async get_all_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None) AsyncGenerator[Note, None] ¶
Get notes from a clip
- パラメータ:
limit (int, optional, default=10) -- The number of notes to get
since_id (str | None, optional, default=None) -- The note id to get notes after
until_id (str | None, optional, default=None) -- The note id to get notes before
get_all (bool, optional, default=False) -- Whether to get all notes
- 列挙:
AsyncGenerator[Note, None] -- The notes
- async remove_note(note_id: str) bool ¶
Remove a note from a clip
- パラメータ:
note_id (str) -- The note id
- 戻り値:
True if the note was removed from the clip, False otherwise
- 戻り値の型:
bool
- async update(name: str, is_public: bool | None = None, description: str | None = None) Clip ¶
Update a clip
- パラメータ:
name (str) -- The clip name
is_public (bool, optional) -- Whether the clip is public, default=None
description (str, optional) -- The clip description, default=None
- 戻り値:
True if the clip was updated, False otherwise
- 戻り値の型:
bool
ClipActions¶
- asynccreate
- asyncget
- asyncget_list
- asyncget_my_favorites
- class mipac.actions.clip.ClipActions(*, session: HTTPClient, client: ClientManager)¶
- async create(name: str, is_public: bool = False, description: str | None = None) Clip ¶
Create a clip
- パラメータ:
name (str) -- The clip name
is_public (bool, optional) -- Whether the clip is public, default=False
description (str, optional) -- The clip description, default=None
- 戻り値:
The created clip
- 戻り値の型:
BlockingActions¶
- defget_all_list
- asyncget_list
- class mipac.actions.blocking.BlockingActions(*, session: HTTPClient, client: ClientManager)¶
ブロックアクション user_idを持たないメソッドのみを持ち、持つものはSharedBlockingActionsに実装する
- async get_all_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None) AsyncGenerator[Blocking, None] ¶
すべてのブロックしているユーザーの一覧を取得します
Endpoint: /api/blocking/list
- パラメータ:
limit (int, optional) -- 一度に取得する件数, default=30
since_id (str | None, optional) -- 指定したIDのユーザーより前のユーザーを取得します, default=None
until_id (str | None, optional) -- 指定したIDのユーザーより前のユーザーを取得します, default=None
- 列挙:
AsyncGenerator[Blocking, None] -- ブロックしているユーザーの一覧
- async get_list(since_id: str | None = None, until_id: str | None = None, limit: int = 100) list[Blocking] ¶
ブロックしているユーザーの一覧を取得します
Endpoint: /api/blocking/list
- パラメータ:
since_id (str | None, optional) -- 指定したIDのユーザーより後のユーザーを取得します, default=None
until_id (str | None, optional) -- 指定したIDのユーザーより前のユーザーを取得します, default=None
limit (int, optional) -- 一度に取得する件数, default=100
- 戻り値:
ブロックしているユーザーの一覧
- 戻り値の型:
list[Blocking]
ClientBlockingActions¶
- class mipac.actions.blocking.ClientBlockingActions(user_id: str, *, session: HTTPClient, client: ClientManager)¶
クライアント用のブロックアクション
基本的にoverride以外は行わない
- async add() UserDetailedNotMe | MeDetailed ¶
ユーザーをブロックします
Endpoint: /api/blocking/create
- 戻り値:
ブロック対象のユーザー情報
- 戻り値の型:
- async remove() UserDetailedNotMe | MeDetailed ¶
ユーザーのブロックを解除します
Endpoint: /api/blocking/delete
- 戻り値:
ブロック解除対象のユーザー情報
- 戻り値の型:
AntennaActions¶
- class mipac.actions.antenna.AntennaActions(*, session: HTTPClient, client: ClientManager)¶
- async create(name: str, src: Literal['home', 'all', 'users', 'list', 'users_blacklist'], keywords: list[list[str]], exclude_keywords: list[list[str]] | None = None, users: list[str] | None = None, case_sensitive: bool = False, local_only: bool = MISSING, with_replies: bool = False, with_file: bool = False, notify: bool = False, user_list_id: str | None = None) Antenna ¶
Create an antenna.
Endpoint: /api/antennas/create
- パラメータ:
name (str) -- Name of the antenna.
src (IAntennaReceiveSource) -- Receive source of the antenna.
keywords (list[list[str]]) -- Receive keywords.
exclude_keywords (list[list[str]] | None, default None) -- Excluded keywords.
local_only (bool, default MISSING) -- Whether to limit to local notes.
users (list[str] | None, default None) -- List of target user ID. Required when selecting 'users' as the receive source.
case_sensitive (bool, default False) -- Whether to differentiate between uppercase and lowercase letters.
with_replies (bool, default False) -- Whether to include replies.
with_file (bool, default False) -- Whether to limit to notes with attached files.
notify (bool, default False) -- Whether to notify for new notes.
user_list_id (str | None, default None) -- List of user IDs when selecting 'users' as the receive source for the antenna.
- 戻り値:
The created antenna.
- 戻り値の型:
ClientAntennaActions¶
- asyncdelete
- defget_all_notes
- asyncget_notes
- asyncshow
- asyncupdate
- class mipac.actions.antenna.ClientAntennaActions(*, antenna_id: str, session: HTTPClient, client: ClientManager)¶
- async delete() bool ¶
Delete antenna from identifier
Endpoint: /api/antennas/delete
- 戻り値:
success or failure
- 戻り値の型:
bool
- async get_all_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: str | None = None, until_date: str | None = None) AsyncGenerator[Note, None] ¶
すべてのノートを取得します
Endpoint: /api/antennas/notes
- パラメータ:
limit (int, optional) -- 一度に取得する件数, default=10
since_id (str | None, optional) -- 指定したIDのノートより後のノートを取得します, default=None
until_id (str | None, optional) -- 指定したIDのノートより前のノートを取得します, default=None
since_date (str | None, optional) -- 指定した日付のノートより後のノートを取得します, default=None
until_date (str | None, optional) -- 指定した日付のノートより前のノートを取得します, default=None
- 列挙:
AsyncGenerator[Note, None] -- 取得したノートのリスト
- async get_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: str | None = None, until_date: str | None = None) list[Note] ¶
ノートを取得します
Endpoint: /api/antennas/notes
- パラメータ:
limit (int, optional) -- 一度に取得する件数, default=10
since_id (str | None, optional) -- 指定したIDのノートより後のノートを取得します, by default None
until_id (str | None, optional) -- 指定したIDのノートより前のノートを取得します, by default None
since_date (str | None, optional) -- 指定した日付のノートより後のノートを取得します, by default None
until_date (str | None, optional) -- 指定した日付のノートより前のノートを取得します, by default None
- 戻り値:
取得したノートのリスト
- 戻り値の型:
list[Note]
- async show() Antenna ¶
Show antenna from identifier
Endpoint: /api/antennas/show
- 戻り値:
antenna object
- 戻り値の型:
- async update(name: str, src: Literal['home', 'all', 'users', 'list', 'users_blacklist'], keywords: list[list[str]], exclude_keywords: list[list[str]], users: list[str], case_sensitive: bool, with_replies: bool, with_file: bool, notify: bool, user_list_id: str | None = None) Antenna ¶
Update an antenna.
Endpoint: /api/antennas/update
- パラメータ:
name (str) -- Name of the antenna.
src (IAntennaReceiveSource) -- Receive source of the antenna.
keywords (list[list[str]]) -- Receive keywords.
exclude_keywords (list[list[str]]) -- Excluded keywords.
users (list[str]) -- List of target user ID. Required when selecting 'users' as the receive source.
case_sensitive (bool) -- Whether to differentiate between uppercase and lowercase letters.
with_replies (bool) -- Whether to include replies.
with_file (bool) -- Whether to limit to notes with attached files.
notify (bool) -- Whether to notify for new notes.
user_list_id (str | None, default None) -- List of user IDs when selecting 'users' as the receive source for the antenna.
- 戻り値:
The created antenna.
- 戻り値の型:
RoleActions¶
- class mipac.actions.role.RoleActions(*, session: HTTPClient, client: ClientManager)¶
- async get(role_id: str) Role ¶
Get a role from the API. Endpoint: /api/roles/show
- パラメータ:
role_id (str) -- The ID of the role to get.
- 戻り値:
The role data.
- 戻り値の型:
- async get_list() list[Role] ¶
Get a list of roles from the API. Endpoint: /api/roles/list
- 戻り値:
The role data.
- 戻り値の型:
list[Role]
- async get_notes(role_id: str, limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_data: int | None = None, until_data: int | None = None, *, get_all: bool = False)¶
Get notes in a role. Endpoint: /api/roles/notes
- パラメータ:
role_id (str) -- The ID of the role to get notes.
limit (int, optional) -- The number of notes to get, default=10
since_id (str, optional) -- The ID of the note to get notes after, default=None
until_id (str, optional) -- The ID of the note to get notes before, default=None
since_data (int, optional) -- The timestamp of the note to get notes after, default=None
until_data (int, optional) -- The timestamp of the note to get notes before, default=None
get_all (bool, optional) -- Whether to get all notes, default=False
- 列挙:
AsyncGenerator[Note, None] -- The note data.
- async get_users(role_id: str, since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, get_all: bool = False) AsyncGenerator[RoleUser, None] ¶
Get users in a role. Endpoint: /api/roles/users
- パラメータ:
role_id (str) -- The ID of the role to get users.
since_id (str, optional) -- The ID of the user to get users after, default=None
until_id (str, optional) -- The ID of the user to get users before, default=None
limit (int, optional) -- The number of users to get, default=10
get_all (bool, optional) -- Whether to get all users, default=False
- 列挙:
AsyncGenerator[RoleUser, None] -- The role user data.
ClientMuteActions¶
- class mipac.actions.users.mute.ClientMuteActions(user_id: str, *, session: HTTPClient, client: ClientManager)¶
- async create(expires_at: int | None = None) bool ¶
指定したユーザーをミュートします
- パラメータ:
expires_at (int | None) -- ミュートする期間(秒)、無期限でミュートする場合はNoneを指定します
- 戻り値:
ミュートに成功したかどうか
- 戻り値の型:
bool
- async delete() bool ¶
指定したユーザーのミュートを解除します
- 戻り値:
ミュート解除に成功したかどうか
- 戻り値の型:
bool
MuteActions¶
- defget_all_list
- asyncget_list
- class mipac.actions.users.mute.MuteActions(*, session: HTTPClient, client: ClientManager)¶
- async get_all_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None)¶
ミュートしている全てのユーザーを取得します
- パラメータ:
limit (int) -- 取得するユーザー数, by default 30
since_id (str | None) -- 指定したIDより後のミュート中のユーザーを取得します, default=None
until_id (str | None) -- 指定したIDより前のミュート中のユーザーを取得します, default=None
- 戻り値:
ミュートしているユーザー
- 戻り値の型:
AsyncGenerator[Muting]
ClientPartialUserListActions¶
- class mipac.actions.users.list.ClientPartialUserListActions(user_id: str, *, session: HTTPClient, client: ClientManager)¶
ユーザー向けのリストのアクションを提供します。
- async get_list() list[UserList] ¶
Get the user lists of a user
Endpoint /api/users/lists/list
- 戻り値:
The user lists the user has
- 戻り値の型:
list[UserList]
- async pull(*, list_id: str) bool ¶
Pull a user from a user list
Endpoint /api/users/lists/pull
- パラメータ:
list_id (str) -- The id of the user list to pull from
- 戻り値:
True if the user was pulled, False otherwise
- 戻り値の型:
bool
- async push(*, list_id: str) bool ¶
Push a user to a user list
Endpoint /api/users/lists/push
- パラメータ:
list_id (str) -- The id of the user list to push to
- 戻り値:
True if the user was pushed, False otherwise
- 戻り値の型:
bool
ClientUserListActions¶
- asyncdelete
- asyncfavorite
- asyncshow
- asyncunfavorite
- asyncupdate
- class mipac.actions.users.list.ClientUserListActions(list_id: str, *, session: HTTPClient, client: ClientManager)¶
- async delete() bool ¶
Delete a user list
Endpoint /api/users/lists/delete
- 戻り値:
True if the user list was deleted, False otherwise
- 戻り値の型:
bool
- async favorite() bool ¶
Favorite a user list
Endpoint /api/users/lists/favorite
- 戻り値:
True if the user list was favorited, False otherwise
- 戻り値の型:
bool
- async show(for_public: bool = False) UserList ¶
Show a user list
Endpoint /api/users/lists/show
- パラメータ:
for_public (bool, optional) -- Whether to show the user list for the public, by default False
- 戻り値:
The user list
- 戻り値の型:
- async unfavorite() bool ¶
Unfavorite a user list
Endpoint /api/users/lists/unfavorite
- 戻り値:
True if the user list was unfavorited, False otherwise
- 戻り値の型:
bool
- async update(name: str = MISSING, is_public: bool = MISSING) UserList ¶
Update a user list
Endpoint /api/users/lists/update
- パラメータ:
name (str, optional) -- The new name of the user list, by default MISSING
is_public (bool, optional) -- Whether the user list should be public, by default MISSING
- 戻り値:
The updated user list
- 戻り値の型:
UserListActions¶
- asynccreate
- class mipac.actions.users.list.UserListActions(*, session: HTTPClient, client: ClientManager)¶
AdminAdActions¶
- class mipac.actions.admins.ad.AdminAdActions(*, session: HTTPClient, client: ClientManager)¶
ClientAdminAdActions¶
- class mipac.actions.admins.ad.ClientAdminAdActions(ad_id: str, *, session: HTTPClient, client: ClientManager)¶
AdminRoleActions¶
- class mipac.actions.admins.roles.AdminRoleActions(*, session: HTTPClient, client: ClientManager)¶
ClientAdminRoleActions¶
- asyncassign
- asyncget_all_users
- asyncunassign
- class mipac.actions.admins.roles.ClientAdminRoleActions(role_id: str, *, session: HTTPClient, client: ClientManager)¶
- async assign(user_id: str, expires_at: int | None = None) bool ¶
指定したユーザーに指定したロールを付与します
- パラメータ:
user_id (str) -- ロールを付与する対象のユーザーID
expires_at (int | None, optional) -- いつまでロールを付与するか, by default None
role_id (str) -- ロールのID
- 戻り値:
成功したか否か
- 戻り値の型:
bool
- async get_all_users(since_id: str = MISSING, until_id: str = MISSING, limit: int = MISSING)¶
指定したロールを持つユーザーを全て取得します
- パラメータ:
since_id (str, optional) -- ページネーションの開始位置, by default MISSING
until_id (str, optional) -- ページネーションの終了位置, by default MISSING
limit (int, optional) -- 1ページあたりの取得数, by default MISSING
role_id (str) -- ロールのID
- 戻り値:
ロールユーザー
- 戻り値の型:
- async unassign(user_id: str) bool ¶
指定したユーザーから指定したロールを解除します
- パラメータ:
user_id (str) -- ロールを解除するユーザーID
role_id (str) -- ロールのID
- 戻り値:
成功したか否か
- 戻り値の型:
bool
AdminAnnouncementActions¶
- class mipac.actions.admins.announcement.AdminAnnouncementActions(*, session: HTTPClient, client: ClientManager)¶
ClientAdminAnnouncementActions¶
- class mipac.actions.admins.announcement.ClientAdminAnnouncementActions(announce_id: str, *, session: HTTPClient, client: ClientManager)¶
- async delete() bool ¶
指定したお知らせを削除します
- パラメータ:
announce_id (str) -- 削除したいお知らせのID
- 戻り値:
削除に成功した場合はTrue, それ以外はFalse
- 戻り値の型:
bool
- async update(title: str = MISSING, text: str = MISSING, image_url: str | None = MISSING, icon: Literal['info', 'wanirng', 'error', 'success'] = MISSING, display: Literal['dialog', 'normal', 'banner'] = MISSING, for_existing_users: bool = MISSING, silence: bool = MISSING, need_confirmation_to_read: bool = MISSING, is_active: bool = MISSING) bool ¶
指定したお知らせを更新します
- パラメータ:
title (str) -- お知らせのタイトル
text (str) -- お知らせの本文
image_url (str, optional) -- お知らせの画像URL, by default None
icon (AnnoucementIcon, optional) -- お知らせのアイコン, by default MISSING
display (AnnouncementDisplay, optional) -- お知らせの表示方法, by default MISSING
for_existing_users (bool, optional) -- 既存ユーザーに表示するか, by default MISSING
silence (bool, optional) -- お知らせを静かにするか, by default MISSING
need_confirmation_to_read (bool, optional) -- 読んだか確認が必要か, by default MISSING
is_active (bool, optional) -- お知らせが有効かどうか, by default MISSING
announce_id (str) -- 更新したいお知らせのID
- 戻り値:
更新に成功した場合はTrue, それ以外はFalse
- 戻り値の型:
bool
AdminUserActions¶
- class mipac.actions.admins.user.AdminUserActions(*, session: HTTPClient, client: ClientManager)¶
ClientAdminUserActions¶
- asyncdelete_account
- asyncshow_user
- asyncsuspend
- asyncunsuspend
- class mipac.actions.admins.user.ClientAdminUserActions(user_id: str, *, session: HTTPClient, client: ClientManager)¶
- async delete_account() bool ¶
対象のユーザーを削除します
Endpoint: /api/admin/accounts/delete
バージョン 0.6.2 で非推奨: Use
mipac.actions.admins.accounts.delete()
instead.- パラメータ:
user_id (str) -- 対象のユーザーID
- 戻り値:
成功ならTrue
- 戻り値の型:
bool
- async show_user()¶
ユーザーの情報を取得します
- async suspend() bool ¶
対象のユーザーを凍結します
- 戻り値:
成功ならTrue
- 戻り値の型:
bool
- async unsuspend() bool ¶
ユーザーの凍結を解除します
- 戻り値:
成功ならTrue
- 戻り値の型:
bool
ClientSystemWebhookActions¶
- class mipac.actions.admins.system_webhook.ClientSystemWebhookActions(webhook_id: str, *, session: HTTPClient, client: ClientManager)¶
SystemWebhookActions¶
- class mipac.actions.admins.system_webhook.SystemWebhookActions(*, session: HTTPClient, client: ClientManager)¶
AdminActions¶
- asyncget_meta
- asyncreset_password
- asyncresolve_abuse_user_report
- asyncsend_email
- asyncupdate_user_note
- class mipac.actions.admins.admin.AdminActions(*, session: HTTPClient, client: ClientManager)¶
-
- async reset_password(user_id: str) str ¶
target user's password reset Endpoint: /api/admin/reset-password
- パラメータ:
user_id (str) -- target user's id
- 戻り値:
new password
- 戻り値の型:
str
- async resolve_abuse_user_report(report_id: str, resolved_as: Literal['accept', 'reject'] | None = None) bool ¶
Resolve abuse user report Endpoint: /api/admin/resolve-abuse-user-report
- パラメータ:
report_id (str) -- report id
resolved_as (Literal["accept", "reject"], optional) -- resolved as, by default None
- async send_email(to: str, subject: str, text: str) bool ¶
Send email to specified address Endpoint: /api/admin/send-email
- パラメータ:
to (str) -- email address to send
subject (str) -- email subject
text (str) -- email body
- async update_user_note(user_id: str, text: str) bool ¶
Update user note Endpoint: /api/admin/update-user-note
- パラメータ:
user_id (str) -- target user's id
text (str) -- new note
AdminInviteActions¶
- class mipac.actions.admins.invite.AdminInviteActions(*, session: HTTPClient, client: ClientManager)¶
AdminEmojiActions¶
- asyncadd
- asyncadd_aliases_bulk
- asyncdelete_bulk
- defget_all_list
- defget_all_list_remote
- asyncget_list
- asyncget_list_remote
- asyncremove_aliases_bulk
- asyncset_aliases_bulk
- asyncset_category_bulk
- asyncset_license_bulk
- class mipac.actions.admins.emoji.AdminEmojiActions(*, session: HTTPClient, client: ClientManager)¶
- async add(name: str, file_id: str, category: str | None = None, aliases: list[str] | None = None, license: str | None = None, is_sensitive: bool = MISSING, local_only: bool = MISSING) EmojiDetailed ¶
Add a new emoji
- パラメータ:
name (str) -- The name of the emoji
file_id (str) -- The id of the file
category (str, optional) -- The category of the emoji, by default None
aliases (list[str], optional) -- The aliases of the emoji, by default None
license (str, optional) -- The license of the emoji, by default None
is_sensitive (bool) -- Whether the emoji is sensitive
local_only (bool) -- Whether the emoji is local only
- 戻り値:
The added emoji
- 戻り値の型:
- async add_aliases_bulk(ids: list[str], aliases: list[str]) bool ¶
Add aliases to emojis in bulk
- パラメータ:
ids (list[str]) -- The ids of the emojis
aliases (list[str]) -- The aliases to add
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
- async delete_bulk(ids: list[str]) bool ¶
Delete emojis in bulk
- パラメータ:
ids (list[str]) -- The ids of the emojis
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
- async get_all_list(query: str | None = None, limit: int = 10, since_id: str | None = None, until_id: str | None = None) AsyncGenerator[EmojiDetailed, None] ¶
List all emojis
- パラメータ:
query (str, optional) -- The query to search for, by default None
limit (int, optional) -- The limit of the emojis to get, by default 10
since_id (str, optional) -- The id to get emojis since, by default None
until_id (str, optional) -- The id to get emojis until, by default None
- 列挙:
AsyncGenerator[EmojiDetailed, None] -- The emojis
- async get_all_list_remote(query: str | None = None, host: str | None = None, limit: int = 10, since_id: str | None = None, until_id: str | None = None) AsyncGenerator[EmojiDetailed, None] ¶
List remote emojis
- パラメータ:
query (str, optional) -- The query to search for, by default None
host (str, optional) -- The host of the emoji, by default None
limit (int, optional) -- The limit of the emojis to get, by default 10
since_id (str, optional) -- The id to get emojis since, by default None
until_id (str, optional) -- The id to get emojis until, by default None
- 列挙:
AsyncGenerator[EmojiDetailed, None] -- The emojis
- async get_list(query: str | None = None, limit: int = 10, since_id: str | None = None, until_id: str | None = None) list[EmojiDetailed] ¶
List emojis
- パラメータ:
query (str, optional) -- The query to search for, by default None
limit (int, optional) -- The limit of the emojis to get, by default 10
since_id (str, optional) -- The id to get emojis since, by default None
until_id (str, optional) -- The id to get emojis until, by default None
- 戻り値:
The emojis
- 戻り値の型:
list[EmojiDetailed]
- async get_list_remote(query: str | None = None, host: str | None = None, limit: int = 10, since_id: str | None = None, until_id: str | None = None) list[EmojiDetailed] ¶
List remote emojis
- パラメータ:
query (str, optional) -- The query to search for, by default None
host (str, optional) -- The host of the emoji, by default None
limit (int, optional) -- The limit of the emojis to get, by default 10
since_id (str, optional) -- The id to get emojis since, by default None
until_id (str, optional) -- The id to get emojis until, by default None
- 戻り値:
The emojis
- 戻り値の型:
list[EmojiDetailed]
- async remove_aliases_bulk(ids: list[str], aliases: list[str]) bool ¶
Remove aliases from emojis in bulk
- パラメータ:
ids (list[str]) -- The ids of the emojis
aliases (list[str]) -- The aliases to remove
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
- async set_aliases_bulk(ids: list[str], aliases: list[str]) bool ¶
Set aliases to emojis in bulk
- パラメータ:
ids (list[str]) -- The ids of the emojis
aliases (list[str]) -- The aliases to set
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
- async set_category_bulk(ids: list[str], category: str) bool ¶
Set category to emojis in bulk
- パラメータ:
ids (list[str]) -- The ids of the emojis
category (str) -- The category to set
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
- async set_license_bulk(ids: list[str], license: str) bool ¶
Set license to emojis in bulk
- パラメータ:
ids (list[str]) -- The ids of the emojis
license (str) -- The license to set
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
ClientAdminEmojiActions¶
- class mipac.actions.admins.emoji.ClientAdminEmojiActions(*, emoji_id: str, session: HTTPClient, client: ClientManager)¶
-
- async delete() bool ¶
Delete an emoji
- パラメータ:
id (str) -- The id of the emoji
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
- async update(name: str = MISSING, file_id: str = MISSING, category: str | None = MISSING, aliases: list[str] | None = MISSING, is_sensitive: bool = MISSING, local_only: bool = MISSING, role_ids_that_can_be_used_this_emoji_as_reaction: list[str] = MISSING) bool ¶
Update an emoji
- パラメータ:
name (str) -- The name of the emoji
file_id (str) -- The id of the file
category (str, optional) -- The category of the emoji, by default None
aliases (list[str], optional) -- The aliases of the emoji, by default None
is_sensitive (bool) -- Whether the emoji is sensitive
local_only (bool) -- Whether the emoji is local only
role_ids_that_can_be_used_this_emoji_as_reaction (list[str]) -- The role ids that can be used this emoji as reaction
emoji_id (str) -- The id of the emoji
- 戻り値:
Whether the operation was successful
- 戻り値の型:
bool
AdminDriveActions¶
- asyncclean_remote_files
- asynccleanup
- asyncget_files
- asyncshow_file
- class mipac.actions.admins.drive.AdminDriveActions(*, session: HTTPClient, client: ClientManager)¶
- async clean_remote_files() bool ¶
Clean remote files
Endpoint: /api/admin/drive/clean-remote-files
- 戻り値:
Whether the remote files were cleaned
- 戻り値の型:
bool
- async cleanup() bool ¶
Clean up the drive
Endpoint: /api/admin/drive/cleanup
- 戻り値:
Whether the drive was cleaned up
- 戻り値の型:
bool
- async get_files(limit: int = 10, since_id: str | None = None, until_id: str | None = None, user_id: str | None = None, type: str | None = None, origin: Literal['combined', 'local', 'remote'] = 'local', hostname: str | None = None) list[File] ¶
Get all files
Endpoint: /api/admin/drive/files
- パラメータ:
limit (int) -- The number of files to get
since_id (str) -- The id of the file to start from
until_id (str) -- The id of the file to end at
type (str) -- The type of file to get
user_id (str) -- The id of the user to get files from
origin (Literal['combined', 'local', 'remote']) -- The origin of the files
hostname (str) -- The hostname of the files
- 戻り値:
A list of files
- 戻り値の型:
list[File]
- async show_file(file_id: str, url: str | None = None)¶
Show a file
Endpoint: /api/admin/drive/files/show
- パラメータ:
file_id (str) -- The id of the file to show
url (str) -- The url of the file to show
- 戻り値:
The file
- 戻り値の型:
dict[str, Any]
AdminAccountActions¶
- class mipac.actions.admins.accounts.AdminAccountActions(*, session: HTTPClient, client: ClientManager)¶
- async create(username: str, password: str, setup_password: str | None = None) CreatedUser ¶
ユーザーを作成します
Endpoint: /api/admin/accounts/create
- パラメータ:
username (str) -- ユーザー名
password (str) -- パスワード
setup_password (str, optional) -- セットアップパスワード, by default None
- 戻り値:
作成されたユーザー
- 戻り値の型:
- async delete(*, user_id: str) bool ¶
対象のユーザーを削除します
Endpoint: /api/admin/accounts/delete
- パラメータ:
user_id (str) -- 対象のユーザーID
- 戻り値:
成功ならTrue
- 戻り値の型:
bool
DriveActions¶
- asyncget_status
- asyncstream
- class mipac.actions.drive.drive.DriveActions(*, session: HTTPClient, client: ClientManager)¶
- async get_status() DriveStatus ¶
Get the status of the drive
Endpoint: /api/drive
- 戻り値:
The status of the drive
- 戻り値の型:
- async stream(limit: int = 10, since_id: str | None = None, until_id: str | None = None, type: str | None = None) list[File] ¶
Stream files from the drive
Endpoint: /api/drive/stream
- パラメータ:
limit (int) -- The number of files to get
since_id (str) -- The id of the file to start from
until_id (str) -- The id of the file to end at
type (str) -- The type of file to get
- 戻り値:
A list of files
- 戻り値の型:
list[File]
ClientFileActionsInFolder¶
- asynccreate
- asyncfind
- asyncupdate
- asyncupload_from_url
- class mipac.actions.drive.folders.ClientFileActionsInFolder(folder_id: str, *, session: HTTPClient, client: ClientManager)¶
File actions in a folder
- async create(file: str, name: str | None = None, comment: str | None = None, is_sensitive: bool = False, force: bool = False) File ¶
Upload a file to the drive
Endpoint: /api/drive/files/create
- パラメータ:
file (str) -- The file to upload
folder_id (str | None) -- The id of the folder to upload the file to, defaults to None
name (str | None) -- The name of the file, defaults to None
comment (str | None) -- The comment of the file, defaults to None
is_sensitive (bool) -- Whether the file is sensitive or not, defaults to False
force (bool) -- Whether to force upload the file or not, defaults to False
- 戻り値:
The uploaded file
- 戻り値の型:
- async find(name: str) list[File] ¶
Find a file by its name
Endpoint: /api/drive/files/find
- パラメータ:
name (str) -- The name of the file to find
- 戻り値:
The found files
- 戻り値の型:
list[File]
- async update(file_id: str, name: str | None = MISSING, is_sensitive: bool = MISSING, comment: str | None = MISSING)¶
Update a file
Endpoint: /api/drive/files/update
- パラメータ:
file_id (str | None) -- The id of the file to update, defaults to None
name (str | None) -- The name of the file, defaults to MISSING
is_sensitive (bool) -- Whether the file is sensitive or not, defaults to MISSING
comment (str | None) -- The comment of the file, defaults to MISSING
- 戻り値:
The updated file
- 戻り値の型:
- async upload_from_url(url: str, is_sensitive: bool = False, comment: str | None = None, marker: str | None = None, force: bool = False)¶
Upload a file to the drive from a url
Endpoint: /api/drive/files/upload-from-url
- パラメータ:
url (str) -- The url of the file to upload
is_sensitive (bool) -- Whether the file is sensitive or not, defaults to False
comment (str | None) -- The comment of the file, defaults to None
marker (str | None) -- The marker of the file, defaults to None
force (bool) -- Whether to force upload the file or not, defaults to False
- 戻り値:
Whether the file was uploaded or not
- 戻り値の型:
bool
ClientFolderActions¶
- class mipac.actions.drive.folders.ClientFolderActions(folder_id: str, *, session: HTTPClient, client: ClientManager)¶
- async create(name: str | None = None) Folder ¶
現在のフォルダに新しいフォルダを作成します。
Endpoint: /api/drive/folders/create
- パラメータ:
name (str, optional) -- The name of the folder, by default None
- 戻り値:
The created folder
- 戻り値の型:
- async delete() bool ¶
Delete a folder
Endpoint: /api/drive/folders/delete
- パラメータ:
folder_id (str, optional) -- The ID of the folder, by default None
- 戻り値:
Whether the folder was deleted or not
- 戻り値の型:
bool
- async gets(limit: int = 10, since_id: str | None = None, until_id: str | None = None) list[Folder] ¶
Get folders
Endpoint: /api/drive/folders
- パラメータ:
limit (int) -- The limit of folders to get, defaults to 10
since_id (str | None) -- The ID of the folder to get since, defaults to None
until_id (str | None) -- The ID of the folder to get until, defaults to None
- 戻り値:
The found folders
- 戻り値の型:
list[Folder]
- async update(name: str | None = MISSING, parent_id: str | None = MISSING) Folder ¶
Update a folder
Endpoint: /api/drive/folders/update
- パラメータ:
name (str, optional) -- The name of the folder, by default MISSING
parent_id (str, optional) -- The parent ID of the folder, by default MISSING
- 戻り値:
The updated folder
- 戻り値の型:
FolderActions¶
- class mipac.actions.drive.folders.FolderActions(*, session: HTTPClient, client: ClientManager)¶
ClientFileActions¶
- asyncdelete
- asyncget_attached_notes
- asyncupdate
- class mipac.actions.drive.files.ClientFileActions(file_ids: str, *, session: HTTPClient, client: ClientManager)¶
- async delete() bool ¶
指定したファイルIDのファイルを削除します
Endpoint: /api/drive/files/delete
- 戻り値:
削除に成功したかどうか
- 戻り値の型:
bool
- async get_attached_notes(since_id: str | None = None, until_id: str | None = None, limit: int = 10) list[Note] ¶
Get the attached notes of a file
Endpoint: /api/drive/files/attached-notes
- パラメータ:
since_id (str | None) -- The id of the note to start from, defaults to None
until_id (str | None) -- The id of the note to end at, defaults to None
limit (int) -- The amount of notes to get, defaults to 10
- 戻り値:
The attached notes of the file
- 戻り値の型:
list[Note]
- async update(folder_id: str | None = MISSING, name: str | None = MISSING, is_sensitive: bool = MISSING, comment: str | None = MISSING) File ¶
指定したIDのファイル情報を更新します
Endpoint: /api/drive/files/update
- パラメータ:
folder_id (str | None) -- ファイルを置くフォルダID, default=MISSING
name (str | None) -- ファイル名, default=MISSING
is_sensitive (bool) -- ファイルがセンシティブかどうか, default=MISSING
comment (str | None) -- ファイルのコメント, default=MISSING
- 戻り値:
更新後のファイル
- 戻り値の型:
FileActions¶
- asynccheck_existence
- asynccreate
- asyncfind
- asyncfind_by_hash
- asyncget_files
- asyncshow
- asyncupload_from_url
- class mipac.actions.drive.files.FileActions(*, session: HTTPClient, client: ClientManager)¶
- async check_existence(md5: str) bool ¶
指定したmd5のファイルが既に存在するか確認します
Endpoint: /api/drive/files/check-existence
- パラメータ:
md5 (str) -- 確認したいmd5
- 戻り値:
存在するかしないか
- 戻り値の型:
bool
- async create(file: str | bytes | PathLike[Any] | BufferedIOBase, folder_id: str | None = None, name: str | None = None, comment: str | None = None, is_sensitive: bool = False, force: bool = False) File ¶
Upload a file to the drive
Endpoint: /api/drive/files/create
- パラメータ:
file (str | bytes | os.PathLike[Any] | io.BufferedIOBase) -- アップロードするファイル
folder_id (str | None) -- アップロード先のフォルダID, default=None
name (str | None) -- ファイルの名前, default=None
comment (str | None) -- ファイルのコメント, default=None
is_sensitive (bool) -- ファイルがセンシティブかどうか, default=False
force (bool) -- ファイルが既に存在する場合でも強制的にアップロードするかどうか, default=False
- 戻り値:
アップロードしたファイル
- 戻り値の型:
- async find(name: str, folder_id: str | None = None) list[File] ¶
指定した名前のファイルを検索します
Endpoint: /api/drive/files/find
- パラメータ:
name (str) -- 検索したいファイルの名前
folder_id (str | None) -- ファイルを検索するフォルダID, default=None
- 戻り値:
The found files
- 戻り値の型:
list[File]
- async find_by_hash(md5: str) list[File] ¶
指定したハッシュのファイルを検索します
Endpoint: /api/drive/files/find-by-hash
- パラメータ:
md5 (str) -- 検索したいファイルのハッシュ
- 戻り値:
見つかったファイル
- 戻り値の型:
list[File]
- async get_files(limit: int = 10, since_id: str | None = None, until_id: str | None = None, folder_id: str | None = None, type: str | None = None, sort: Literal['+createdAt', '-createdAt', '+name', '-name', '+size', '-size'] | None = None) list[File] ¶
Get the files of the drive
Endpoint: /api/drive/files
- パラメータ:
limit (int) -- The amount of files to get, defaults to 10
since_id (str | None) -- The id of the file to start from, defaults to None
until_id (str | None) -- The id of the file to end at, defaults to None
folder_id (str | None) -- The id of the folder to get files from, defaults to None
type (str | None) -- The type of file to get, defaults to None
sort (IDriveSort | None) -- The way to sort the files, defaults to None
- 戻り値:
The files of the drive
- 戻り値の型:
list[File]
- async show(file_id: str, url: str | None = None) File ¶
指定したIDのファイル情報を取得します
Endpoint: /api/drive/files/show
- パラメータ:
file_id (str) -- 対象のファイルID
url (str | None) -- 取得したいファイルのURL, default=None
- 戻り値:
取得したファイル
- 戻り値の型:
- async upload_from_url(url: str, folder_id: str | None = None, is_sensitive: bool = False, comment: str | None = None, marker: str | None = None, force: bool = False)¶
Upload a file to the drive from a url
Endpoint: /api/drive/files/upload-from-url
- パラメータ:
url (str) -- アップロードするファイルのURL
folder_id (str | None) -- アップロード先のフォルダID, default=None
is_sensitive (bool) -- ファイルがセンシティブかどうか, default=False
comment (str | None) -- ファイルのコメント, default=None
marker (str | None) -- ストリーミング通信でアップロード完了後に区別するためのマーカー, default=None
force (bool) -- 同様のファイルが既に存在する場合でも強制的にアップロードするかどうか, default=False
- 戻り値:
アップロードのリクエストに成功したかどうか
- 戻り値の型:
bool
Type class¶
IApp¶
- class mipac.types.app.IApp¶
IMuting¶
- class mipac.types.mute.IMuting¶
NoteReactionPayload¶
- class mipac.types.reaction.NoteReactionPayload¶
IPartialRole¶
- class mipac.types.roles.IPartialRole¶
IRole¶
- class mipac.types.roles.IRole¶
IRolePolicies¶
- class mipac.types.roles.IRolePolicies¶
IRoleUser¶
- class mipac.types.roles.IRoleUser¶
IAnnouncement¶
- class mipac.types.announcement.IAnnouncement¶
IAnnouncementDetailed¶
- class mipac.types.announcement.IAnnouncementDetailed¶
管理者から見たアナウンス
is_me_detailed¶
- mipac.types.user.is_me_detailed(user: IPartialUser | IUserDetailedNotMeSchema | IMeDetailedSchema) TypeGuard[IMeDetailedSchema] ¶
IMeDetailedOnlySchemaで avatar_id IUserDetailedNotMeOnlySchemaで url を持っているのでどちらともを満たしたものがIMeDetailedSchema
is_partial_user¶
- mipac.types.user.is_partial_user(user: IPartialUser | IUserDetailedNotMeSchema | IMeDetailedSchema) TypeGuard[IPartialUser] ¶
他のUser型は全て IUserDetailedNotMeSchema 経由で IUserDetailedNotMeOnlySchema を継承しているため url が無いことを確認し区別する 念のために avatar_url があることも確認する
is_user_detailed¶
- mipac.types.user.is_user_detailed(user: IPartialUser | IUserDetailedNotMeSchema | IMeDetailedSchema) TypeGuard[IUserDetailedNotMeSchema | IMeDetailedSchema] ¶
is_user_detailed_not_me¶
- mipac.types.user.is_user_detailed_not_me(user: IPartialUser | IUserDetailedNotMeSchema | IMeDetailedSchema) TypeGuard[IUserDetailedNotMeSchema] ¶
IUserDetailedNotMeSchemaが持つ url が有ることを確認し IMeDetailedOnlySchema が持つ avatar_id が無いことを確認する こうすることで IMeDetailedSchema と区別する
GetFrequentlyRepliedUsersResponse¶
- class mipac.types.user.GetFrequentlyRepliedUsersResponse¶
users/get-frequently-replied-users のレスポンス
IAchievement¶
- class mipac.types.user.IAchievement¶
IAvatarDecoration¶
- class mipac.types.user.IAvatarDecoration¶
IBadgeRole¶
- class mipac.types.user.IBadgeRole¶
ICreatedUser¶
- class mipac.types.user.ICreatedUser¶
IMeDetailedOnlySchema¶
- class mipac.types.user.IMeDetailedOnlySchema¶
IMeDetailedSchema¶
- class mipac.types.user.IMeDetailedSchema¶
IPartialUser¶
- class mipac.types.user.IPartialUser¶
Misskey Schema: packedUserLiteSchema
ISignin¶
- class mipac.types.user.ISignin¶
IUserDetailedNotMeOnlySchema¶
- class mipac.types.user.IUserDetailedNotMeOnlySchema¶
Misskey Schema: packedUserDetailedNotMeOnlySchema
IUserDetailedNotMeSchema¶
- class mipac.types.user.IUserDetailedNotMeSchema¶
IUserField¶
- class mipac.types.user.IUserField¶
IUserList¶
- class mipac.types.user.IUserList¶
IUserListMembership¶
- class mipac.types.user.IUserListMembership¶
IUserRequired¶
- class mipac.types.user.IUserRequired¶
IUserSecurityKey¶
- class mipac.types.user.IUserSecurityKey¶
NotificationRecieveConfig¶
- class mipac.types.user.NotificationRecieveConfig¶
NotificationRecieveConfigType¶
- class mipac.types.user.NotificationRecieveConfigType¶
NotificationRecieveConfigWithUserList¶
- class mipac.types.user.NotificationRecieveConfigWithUserList¶
IUsernameAvailable¶
- class mipac.types.username.IUsernameAvailable¶
AttachedFilePayload¶
- class mipac.types.page.AttachedFilePayload¶
EyeCatchingImagePayload¶
- class mipac.types.page.EyeCatchingImagePayload¶
IPage¶
- class mipac.types.page.IPage¶
IPageRequired¶
- class mipac.types.page.IPageRequired¶
PageContentPayload¶
- class mipac.types.page.PageContentPayload¶
PageFilePayload¶
- class mipac.types.page.PageFilePayload¶
PagePayload¶
- class mipac.types.page.PagePayload¶
VariablePayload¶
- class mipac.types.page.VariablePayload¶
IActiveUsersChart¶
- class mipac.types.chart.IActiveUsersChart¶
IDriveChart¶
- class mipac.types.chart.IDriveChart¶
IDriveLocalChart¶
- class mipac.types.chart.IDriveLocalChart¶
IDriveRemoteChart¶
- class mipac.types.chart.IDriveRemoteChart¶
IFederationFollowCommon¶
- class mipac.types.follow.IFederationFollowCommon¶
IFederationFollower¶
- class mipac.types.follow.IFederationFollower¶
IFederationFollowing¶
- class mipac.types.follow.IFederationFollowing¶
IFollowRequest¶
- class mipac.types.follow.IFollowRequest¶
IChannel¶
- class mipac.types.channel.IChannel¶
IID¶
- class mipac.types.common.IID¶
IDを表す型
IAdminMeta¶
- class mipac.types.meta.IAdminMeta¶
IFeatures¶
- class mipac.types.meta.IFeatures¶
IMeta¶
- class mipac.types.meta.IMeta¶
IMetaDetailed¶
- class mipac.types.meta.IMetaDetailed¶
IMetaDetailedOnly¶
- class mipac.types.meta.IMetaDetailedOnly¶
IPartialMeta¶
- class mipac.types.meta.IPartialMeta¶
IUpdateMetaBody¶
- class mipac.types.meta.IUpdateMetaBody¶
IAd¶
- class mipac.types.ads.IAd¶
IPartialAd¶
- class mipac.types.ads.IPartialAd¶
ISystemWebhook¶
- class mipac.types.system_webhook.ISystemWebhook¶
IIndexStat¶
- class mipac.types.admin.IIndexStat¶
IModerationLog¶
- class mipac.types.admin.IModerationLog¶
IServerInfo¶
- class mipac.types.admin.IServerInfo¶
IServerInfoCpu¶
- class mipac.types.admin.IServerInfoCpu¶
IServerInfoFs¶
- class mipac.types.admin.IServerInfoFs¶
IServerInfoMem¶
- class mipac.types.admin.IServerInfoMem¶
IServerInfoNet¶
- class mipac.types.admin.IServerInfoNet¶
ITableStats¶
- class mipac.types.admin.ITableStats¶
IUserIP¶
- class mipac.types.admin.IUserIP¶
ICreatePoll¶
- class mipac.types.poll.ICreatePoll¶
IPoll¶
- class mipac.types.poll.IPoll¶
Questionnaire object
IPollChoice¶
- class mipac.types.poll.IPollChoice¶
IInviteCode¶
- class mipac.types.invite.IInviteCode¶
IInviteLimit¶
- class mipac.types.invite.IInviteLimit¶
IHashtag¶
- class mipac.types.hashtag.IHashtag¶
ITrendHashtag¶
- class mipac.types.hashtag.ITrendHashtag¶
EmojiPayload¶
- class mipac.types.emoji.EmojiPayload¶
ICustomEmoji¶
- class mipac.types.emoji.ICustomEmoji¶
ICustomEmojiLite¶
- class mipac.types.emoji.ICustomEmojiLite¶
ICustomEmojiLiteRequired¶
- class mipac.types.emoji.ICustomEmojiLiteRequired¶
IEmojiDetailed¶
- class mipac.types.emoji.IEmojiDetailed¶
IEmojiSimple¶
- class mipac.types.emoji.IEmojiSimple¶
IGalleryPost¶
- class mipac.types.gallery.IGalleryPost¶
ICreatedNote¶
- class mipac.types.note.ICreatedNote¶
created note
INote¶
- class mipac.types.note.INote¶
Misskey Raw Model: Note
INoteChannel¶
- class mipac.types.note.INoteChannel¶
ノート内にあるチャンネルの情報
ログインしていてもis_following等は存在しない
INoteReaction¶
- class mipac.types.note.INoteReaction¶
INoteState¶
- class mipac.types.note.INoteState¶
INoteTranslateResult¶
- class mipac.types.note.INoteTranslateResult¶
INoteUpdated¶
- class mipac.types.note.INoteUpdated¶
INoteUpdatedDelete¶
- class mipac.types.note.INoteUpdatedDelete¶
INoteUpdatedDeleteBody¶
- class mipac.types.note.INoteUpdatedDeleteBody¶
INoteUpdatedReaction¶
- class mipac.types.note.INoteUpdatedReaction¶
INoteUpdatedReactionBody¶
- class mipac.types.note.INoteUpdatedReactionBody¶
IDriveStatus¶
- class mipac.types.drive.IDriveStatus¶
IFile¶
- class mipac.types.drive.IFile¶
ファイル情報
IFileProperties¶
- class mipac.types.drive.IFileProperties¶
プロパティー情報
IFolder¶
- class mipac.types.drive.IFolder¶
フォルダーの情報
IClip¶
- class mipac.types.clip.IClip¶
IBlocking¶
- class mipac.types.blocking.IBlocking¶
IAntenna¶
- class mipac.types.antenna.IAntenna¶
IFederationInstance¶
- class mipac.types.instance.IFederationInstance¶
IFederationInstanceRequired¶
- class mipac.types.instance.IFederationInstanceRequired¶
IFederationInstanceStat¶
- class mipac.types.instance.IFederationInstanceStat¶
IInstanceLite¶
- class mipac.types.instance.IInstanceLite¶
IAchievementNf¶
- class mipac.types.notification.IAchievementNf¶
INoteNf¶
- class mipac.types.notification.INoteNf¶
INotification¶
- class mipac.types.notification.INotification¶
IPollEndNf¶
- class mipac.types.notification.IPollEndNf¶
IReactionNf¶
- class mipac.types.notification.IReactionNf¶
IUserNf¶
- class mipac.types.notification.IUserNf¶
IAvatarDecoration¶
- class mipac.types.avatar_decoration.IAvatarDecoration¶
Errors¶
AccessDeniedError¶
- class mipac.errors.errors.AccessDeniedError(data: dict | str, status: int)¶
Access denied.
AlreadyAddedError¶
- class mipac.errors.errors.AlreadyAddedError(data: dict | str, status: int)¶
That user has already been added to that list.
AlreadyBlockingError¶
- class mipac.errors.errors.AlreadyBlockingError(data: dict | str, status: int)¶
You are already blocking that user.
AlreadyClippedError¶
- class mipac.errors.errors.AlreadyClippedError(data: dict | str, status: int)¶
The note has already been clipped.
AlreadyEndedError¶
- class mipac.errors.errors.AlreadyEndedError(data: dict | str, status: int)¶
That game has already ended.
AlreadyExpiredError¶
- class mipac.errors.errors.AlreadyExpiredError(data: dict | str, status: int)¶
The poll is already expired.
AlreadyFavoritedError¶
- class mipac.errors.errors.AlreadyFavoritedError(data: dict | str, status: int)¶
You have not favorited the list.
AlreadyFollowingError¶
- class mipac.errors.errors.AlreadyFollowingError(data: dict | str, status: int)¶
You are already following that user.
AlreadyLikedError¶
- class mipac.errors.errors.AlreadyLikedError(data: dict | str, status: int)¶
The flash has already been liked.
AlreadyMovedError¶
- class mipac.errors.errors.AlreadyMovedError(data: dict | str, status: int)¶
Account was already moved to another account.
AlreadyMutingError¶
- class mipac.errors.errors.AlreadyMutingError(data: dict | str, status: int)¶
You are already muting that user.
AlreadyPinnedError¶
- class mipac.errors.errors.AlreadyPinnedError(data: dict | str, status: int)¶
That note has already been pinned.
AlreadyPromotedError¶
- class mipac.errors.errors.AlreadyPromotedError(data: dict | str, status: int)¶
The note has already promoted.
AlreadyReactedError¶
- class mipac.errors.errors.AlreadyReactedError(data: dict | str, status: int)¶
You are already reacting to that note.
AlreadyVotedError¶
- class mipac.errors.errors.AlreadyVotedError(data: dict | str, status: int)¶
You have already voted.
AuthenticationFailedError¶
- class mipac.errors.errors.AuthenticationFailedError(data: dict | str, status: int)¶
Authentication failed. Please ensure your token is correct.
AvatarNotAnImageError¶
- class mipac.errors.errors.AvatarNotAnImageError(data: dict | str, status: int)¶
The file specified as an avatar is not an image.
BirthdayDateFormatInvalidError¶
- class mipac.errors.errors.BirthdayDateFormatInvalidError(data: dict | str, status: int)¶
Birthday date format is invalid.
BlockedError¶
- class mipac.errors.errors.BlockedError(data: dict | str, status: int)¶
You are blocked by that user.
BlockeeIsYourselfError¶
- class mipac.errors.errors.BlockeeIsYourselfError(data: dict | str, status: int)¶
Blockee is yourself.
BlockingError¶
- class mipac.errors.errors.BlockingError(data: dict | str, status: int)¶
You are blocking that user.
BothWithRepliesAndWithFilesError¶
- class mipac.errors.errors.BothWithRepliesAndWithFilesError(data: dict | str, status: int)¶
Specifying both withReplies and withFiles is not supported
CanNotDeleteInviteCodeError¶
- class mipac.errors.errors.CanNotDeleteInviteCodeError(data: dict | str, status: int)¶
You can't delete this invite code.
CannotCreateAlreadyExpiredPollError¶
- class mipac.errors.errors.CannotCreateAlreadyExpiredPollError(data: dict | str, status: int)¶
Poll is already expired.
CannotReactToRenoteError¶
- class mipac.errors.errors.CannotReactToRenoteError(data: dict | str, status: int)¶
You cannot react to Renote.
CannotRenoteDueToVisibilityError¶
- class mipac.errors.errors.CannotRenoteDueToVisibilityError(data: dict | str, status: int)¶
You can not Renote due to target visibility.
CannotRenoteOutsideOfChannelError¶
- class mipac.errors.errors.CannotRenoteOutsideOfChannelError(data: dict | str, status: int)¶
Cannot renote outside of channel.
CannotRenoteToAPureRenoteError¶
- class mipac.errors.errors.CannotRenoteToAPureRenoteError(data: dict | str, status: int)¶
You can not Renote a pure Renote.
CannotReplyToAPureRenoteError¶
- class mipac.errors.errors.CannotReplyToAPureRenoteError(data: dict | str, status: int)¶
You can not reply to a pure Renote.
CannotReplyToAnInvisibleNoteError¶
- class mipac.errors.errors.CannotReplyToAnInvisibleNoteError(data: dict | str, status: int)¶
You cannot reply to an invisible Note.
CannotReplyToSpecifiedVisibilityNoteWithExtendedVisibilityError¶
- class mipac.errors.errors.CannotReplyToSpecifiedVisibilityNoteWithExtendedVisibilityError(data: dict | str, status: int)¶
You cannot reply to a specified visibility note with extended visibility.
CannotReportTheAdminError¶
- class mipac.errors.errors.CannotReportTheAdminError(data: dict | str, status: int)¶
Cannot report the admin.
CannotReportYourselfError¶
- class mipac.errors.errors.CannotReportYourselfError(data: dict | str, status: int)¶
Cannot report yourself.
CannotTranslateInvisibleNoteError¶
- class mipac.errors.errors.CannotTranslateInvisibleNoteError(data: dict | str, status: int)¶
Cannot translate invisible note.
ContainsProhibitedWordsError¶
- class mipac.errors.errors.ContainsProhibitedWordsError(data: dict | str, status: int)¶
Cannot post because it contains prohibited words.
ContainsTooManyMentionsError¶
- class mipac.errors.errors.ContainsTooManyMentionsError(data: dict | str, status: int)¶
Cannot post because it exceeds the allowed number of mentions.
CorrelationCheckEmailError¶
- class mipac.errors.errors.CorrelationCheckEmailError(data: dict | str, status: int)¶
If "method" is email, "userId" must be set.
CorrelationCheckWebhookError¶
- class mipac.errors.errors.CorrelationCheckWebhookError(data: dict | str, status: int)¶
If "method" is webhook, "systemWebhookId" must be set.
CredentialRequiredError¶
- class mipac.errors.errors.CredentialRequiredError(data: dict | str, status: int)¶
Credential required.
DestinationAccountForbidsError¶
- class mipac.errors.errors.DestinationAccountForbidsError(data: dict | str, status: int)¶
Destination account doesn't have proper 'Known As' alias, or has already moved.
DuplicateNameError¶
- class mipac.errors.errors.DuplicateNameError(data: dict | str, status: int)¶
Duplicate name.
EmailAddressNotSetError¶
- class mipac.errors.errors.EmailAddressNotSetError(data: dict | str, status: int)¶
Email address is not set.
EmailRequiredError¶
- class mipac.errors.errors.EmailRequiredError(data: dict | str, status: int)¶
Email address is required.
EmptyFileError¶
- class mipac.errors.errors.EmptyFileError(data: dict | str, status: int)¶
That file is empty.
EmptyKeywordError¶
- class mipac.errors.errors.EmptyKeywordError(data: dict | str, status: int)¶
Either keywords or excludeKeywords is required.
ExceededLimitOfCreateInviteCodeError¶
- class mipac.errors.errors.ExceededLimitOfCreateInviteCodeError(data: dict | str, status: int)¶
You have exceeded the limit for creating an invitation code.
ExtResourceHashDidntMatchError¶
- class mipac.errors.errors.ExtResourceHashDidntMatchError(data: dict | str, status: int)¶
Hash did not match.
ExtResourceReturnedInvalidSchemaError¶
- class mipac.errors.errors.ExtResourceReturnedInvalidSchemaError(data: dict | str, status: int)¶
External resource returned invalid schema.
FailedToResolveRemoteUserError¶
- class mipac.errors.errors.FailedToResolveRemoteUserError(data: dict | str, status: int)¶
Failed to resolve remote user.
FollowRequestNotFoundError¶
- class mipac.errors.errors.FollowRequestNotFoundError(data: dict | str, status: int)¶
Follow request not found.
FolloweeIsYourselfError¶
- class mipac.errors.errors.FolloweeIsYourselfError(data: dict | str, status: int)¶
Followee is yourself.
FollowerIsYourselfError¶
- class mipac.errors.errors.FollowerIsYourselfError(data: dict | str, status: int)¶
Follower is yourself.
ForbiddenError¶
- class mipac.errors.errors.ForbiddenError(data: dict | str, status: int)¶
Forbidden.
ForbiddenToSetYourselfError¶
- class mipac.errors.errors.ForbiddenToSetYourselfError(data: dict | str, status: int)¶
You can't set yourself as your own alias.
GtlDisabledError¶
- class mipac.errors.errors.GtlDisabledError(data: dict | str, status: int)¶
Global timeline has been disabled.
HasChildFilesOrFoldersError¶
- class mipac.errors.errors.HasChildFilesOrFoldersError(data: dict | str, status: int)¶
This folder has child files or folders.
IAmAiError¶
- class mipac.errors.errors.IAmAiError(data: dict | str, status: int)¶
You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
InappropriateError¶
- class mipac.errors.errors.InappropriateError(data: dict | str, status: int)¶
Cannot upload the file because it has been determined that it possibly contains inappropriate content.
IncorrectInitialPasswordError¶
- class mipac.errors.errors.IncorrectInitialPasswordError(data: dict | str, status: int)¶
Initial password is incorrect.
IncorrectPasswordError¶
- class mipac.errors.errors.IncorrectPasswordError(data: dict | str, status: int)¶
Incorrect password.
InternalErrorError¶
- class mipac.errors.errors.InternalErrorError(data: dict | str, status: int)¶
Internal error occurred. Please contact us if the error persists.
InvalidChoiceError¶
- class mipac.errors.errors.InvalidChoiceError(data: dict | str, status: int)¶
Choice ID is invalid.
InvalidDateTimeError¶
- class mipac.errors.errors.InvalidDateTimeError(data: dict | str, status: int)¶
Invalid date-time format
InvalidFileNameError¶
- class mipac.errors.errors.InvalidFileNameError(data: dict | str, status: int)¶
Invalid file name.
InvalidParamError¶
- class mipac.errors.errors.InvalidParamError(data: dict | str, status: int)¶
Invalid param.
InvalidRegexpError¶
- class mipac.errors.errors.InvalidRegexpError(data: dict | str, status: int)¶
Invalid Regular Expression.
InvalidSeedError¶
- class mipac.errors.errors.InvalidSeedError(data: dict | str, status: int)¶
Provided seed is invalid.
InvalidUrlError¶
- class mipac.errors.errors.InvalidUrlError(data: dict | str, status: int)¶
Invalid URL
IsRemoteUserError¶
- class mipac.errors.errors.IsRemoteUserError(data: dict | str, status: int)¶
Currently unavailable to display reactions of remote users. See https://github.com/misskey-dev/misskey/issues/12964
LtlDisabledError¶
- class mipac.errors.errors.LtlDisabledError(data: dict | str, status: int)¶
Local timeline has been disabled.
MuteeIsYourselfError¶
- class mipac.errors.errors.MuteeIsYourselfError(data: dict | str, status: int)¶
Mutee is yourself.
NameAlreadyExistsError¶
- class mipac.errors.errors.NameAlreadyExistsError(data: dict | str, status: int)¶
Specified name already exists.
NoFollowRequestError¶
- class mipac.errors.errors.NoFollowRequestError(data: dict | str, status: int)¶
No follow request.
NoFreeSpaceError¶
- class mipac.errors.errors.NoFreeSpaceError(data: dict | str, status: int)¶
Cannot upload the file because you have no free space of drive.
NoPollError¶
- class mipac.errors.errors.NoPollError(data: dict | str, status: int)¶
The note does not attach a poll.
NoSecurityKeyError¶
- class mipac.errors.errors.NoSecurityKeyError(data: dict | str, status: int)¶
No security key.
NoSuchAbuseReportError¶
- class mipac.errors.errors.NoSuchAbuseReportError(data: dict | str, status: int)¶
No such abuse report.
NoSuchAdError¶
- class mipac.errors.errors.NoSuchAdError(data: dict | str, status: int)¶
No such ad.
NoSuchAnnouncementError¶
- class mipac.errors.errors.NoSuchAnnouncementError(data: dict | str, status: int)¶
No such announcement.
NoSuchAntennaError¶
- class mipac.errors.errors.NoSuchAntennaError(data: dict | str, status: int)¶
No such antenna.
NoSuchAppError¶
- class mipac.errors.errors.NoSuchAppError(data: dict | str, status: int)¶
No such app.
NoSuchAvatarError¶
- class mipac.errors.errors.NoSuchAvatarError(data: dict | str, status: int)¶
No such avatar file.
NoSuchChannelError¶
- class mipac.errors.errors.NoSuchChannelError(data: dict | str, status: int)¶
No such channel.
NoSuchClipError¶
- class mipac.errors.errors.NoSuchClipError(data: dict | str, status: int)¶
No such clip.
NoSuchEmojiError¶
- class mipac.errors.errors.NoSuchEmojiError(data: dict | str, status: int)¶
No such emoji.
NoSuchFileError¶
- class mipac.errors.errors.NoSuchFileError(data: dict | str, status: int)¶
No such file.
NoSuchFlashError¶
- class mipac.errors.errors.NoSuchFlashError(data: dict | str, status: int)¶
No such flash.
NoSuchFolderError¶
- class mipac.errors.errors.NoSuchFolderError(data: dict | str, status: int)¶
No such folder.
NoSuchGameError¶
- class mipac.errors.errors.NoSuchGameError(data: dict | str, status: int)¶
No such game.
NoSuchHashtagError¶
- class mipac.errors.errors.NoSuchHashtagError(data: dict | str, status: int)¶
No such hashtag.
NoSuchInviteCodeError¶
- class mipac.errors.errors.NoSuchInviteCodeError(data: dict | str, status: int)¶
No such invite code.
NoSuchKeyError¶
- class mipac.errors.errors.NoSuchKeyError(data: dict | str, status: int)¶
No such key.
NoSuchListError¶
- class mipac.errors.errors.NoSuchListError(data: dict | str, status: int)¶
No such list.
NoSuchNoteError¶
- class mipac.errors.errors.NoSuchNoteError(data: dict | str, status: int)¶
No such note.
NoSuchObjectError¶
- class mipac.errors.errors.NoSuchObjectError(data: dict | str, status: int)¶
No such object.
NoSuchPageError¶
- class mipac.errors.errors.NoSuchPageError(data: dict | str, status: int)¶
No such page.
NoSuchParentFolderError¶
- class mipac.errors.errors.NoSuchParentFolderError(data: dict | str, status: int)¶
No such parent folder.
NoSuchPostError¶
- class mipac.errors.errors.NoSuchPostError(data: dict | str, status: int)¶
No such post.
NoSuchRecipientError¶
- class mipac.errors.errors.NoSuchRecipientError(data: dict | str, status: int)¶
No such recipient.
NoSuchRegistrationError¶
- class mipac.errors.errors.NoSuchRegistrationError(data: dict | str, status: int)¶
No such registration.
NoSuchRenoteTargetError¶
- class mipac.errors.errors.NoSuchRenoteTargetError(data: dict | str, status: int)¶
No such renote target.
NoSuchReplyTargetError¶
- class mipac.errors.errors.NoSuchReplyTargetError(data: dict | str, status: int)¶
No such reply target.
NoSuchRoleError¶
- class mipac.errors.errors.NoSuchRoleError(data: dict | str, status: int)¶
No such role.
NoSuchSessionError¶
- class mipac.errors.errors.NoSuchSessionError(data: dict | str, status: int)¶
No such session.
NoSuchSystemWebhookError¶
- class mipac.errors.errors.NoSuchSystemWebhookError(data: dict | str, status: int)¶
No such SystemWebhook.
NoSuchUserError¶
- class mipac.errors.errors.NoSuchUserError(data: dict | str, status: int)¶
No such user.
NoSuchUserListError¶
- class mipac.errors.errors.NoSuchUserListError(data: dict | str, status: int)¶
No such user list.
NoSuchWebhookError¶
- class mipac.errors.errors.NoSuchWebhookError(data: dict | str, status: int)¶
No such webhook.
NotAssignedError¶
- class mipac.errors.errors.NotAssignedError(data: dict | str, status: int)¶
Not assigned.
NotBlockingError¶
- class mipac.errors.errors.NotBlockingError(data: dict | str, status: int)¶
You are not blocking that user.
NotFavoritedError¶
- class mipac.errors.errors.NotFavoritedError(data: dict | str, status: int)¶
You have not marked that note a favorite.
NotFollowingError¶
- class mipac.errors.errors.NotFollowingError(data: dict | str, status: int)¶
The other use is not following you.
NotLikedError¶
- class mipac.errors.errors.NotLikedError(data: dict | str, status: int)¶
You have not liked that flash.
NotMutingError¶
- class mipac.errors.errors.NotMutingError(data: dict | str, status: int)¶
You are not muting that user.
NotReactedError¶
- class mipac.errors.errors.NotReactedError(data: dict | str, status: int)¶
You are not reacting to that note.
NotRootForbiddenError¶
- class mipac.errors.errors.NotRootForbiddenError(data: dict | str, status: int)¶
The root can't migrate.
PendingSessionError¶
- class mipac.errors.errors.PendingSessionError(data: dict | str, status: int)¶
This session is not completed yet.
PinLimitExceededError¶
- class mipac.errors.errors.PinLimitExceededError(data: dict | str, status: int)¶
You can not pin notes any more.
RateLimitExceededError¶
- class mipac.errors.errors.RateLimitExceededError(data: dict | str, status: int)¶
Rate limit exceeded. Please try again later.
ReactionsNotPublicError¶
- class mipac.errors.errors.ReactionsNotPublicError(data: dict | str, status: int)¶
Reactions of the user is not public.
RecursiveNestingError¶
- class mipac.errors.errors.RecursiveNestingError(data: dict | str, status: int)¶
It can not be structured like nesting folders recursively.
RemoteUserNotAllowedError¶
- class mipac.errors.errors.RemoteUserNotAllowedError(data: dict | str, status: int)¶
Not allowed to load the remote user's list
RestrictedByRoleError¶
- class mipac.errors.errors.RestrictedByRoleError(data: dict | str, status: int)¶
This feature is restricted by your role.
SameNameEmojiExistsError¶
- class mipac.errors.errors.SameNameEmojiExistsError(data: dict | str, status: int)¶
Emoji that have same name already exists.
StlDisabledError¶
- class mipac.errors.errors.StlDisabledError(data: dict | str, status: int)¶
Hybrid timeline has been disabled.
TargetIsYourselfError¶
- class mipac.errors.errors.TargetIsYourselfError(data: dict | str, status: int)¶
Target user is yourself.
TooBigFileError¶
- class mipac.errors.errors.TooBigFileError(data: dict | str, status: int)¶
That file is too big.
TooManyAntennasError¶
- class mipac.errors.errors.TooManyAntennasError(data: dict | str, status: int)¶
You cannot create antenna any more.
TooManyClipNotesError¶
- class mipac.errors.errors.TooManyClipNotesError(data: dict | str, status: int)¶
You cannot add notes to the clip any more.
TooManyClipsError¶
- class mipac.errors.errors.TooManyClipsError(data: dict | str, status: int)¶
You cannot create clip any more.
TooManyMutedWordsError¶
- class mipac.errors.errors.TooManyMutedWordsError(data: dict | str, status: int)¶
Too many muted words.
TooManyUserlistsError¶
- class mipac.errors.errors.TooManyUserlistsError(data: dict | str, status: int)¶
You cannot create user list any more.
TooManyUsersError¶
- class mipac.errors.errors.TooManyUsersError(data: dict | str, status: int)¶
You can not push users any more.
TooManyWebhooksError¶
- class mipac.errors.errors.TooManyWebhooksError(data: dict | str, status: int)¶
You cannot create webhook any more.
TwoFactorNotEnabledError¶
- class mipac.errors.errors.TwoFactorNotEnabledError(data: dict | str, status: int)¶
2fa not enabled.
UnexpectedFileTypeError¶
- class mipac.errors.errors.UnexpectedFileTypeError(data: dict | str, status: int)¶
We need csv file.
UriNullError¶
- class mipac.errors.errors.UriNullError(data: dict | str, status: int)¶
Local User ActivityPup URI is null.
UserIsDeletedError¶
- class mipac.errors.errors.UserIsDeletedError(data: dict | str, status: int)¶
User is deleted.
UserNotFoundError¶
- class mipac.errors.errors.UserNotFoundError(data: dict | str, status: int)¶
User not found.
YouHaveBeenBlockedError¶
- class mipac.errors.errors.YouHaveBeenBlockedError(data: dict | str, status: int)¶
You cannot push this user because you have been blocked by this user.
YourFlashError¶
- class mipac.errors.errors.YourFlashError(data: dict | str, status: int)¶
You cannot like your flash.
YourPageError¶
- class mipac.errors.errors.YourPageError(data: dict | str, status: int)¶
You cannot like your page.
YourPostError¶
- class mipac.errors.errors.YourPostError(data: dict | str, status: int)¶
You cannot like your post.
APIError¶
- class mipac.errors.base.APIError(data: dict | str, status: int)¶
APIのエラー
NotExistRequiredData¶
- class mipac.errors.base.NotExistRequiredData¶
クラスの中に必要なデータが不足している
__OTHER¶
MiFile¶
- class mipac.file.MiFile(path: str | None = None, file_id: str | None = None, name: str | None = None, folder_id: str | None = None, comment: str | None = None, is_sensitive: bool = False, force: bool = False)¶
json_or_text¶
- async mipac.http.json_or_text(response: ClientResponse)¶
HTTPClient¶
- asyncclose_session
- deflogin
- class mipac.http.HTTPClient(url: str, token: str | None = None)¶
MisskeyのAPIを使用するためのクライアントクラス
- パラメータ:
url (str) -- MisskeyのURL
token (str | None) -- Misskeyのトークン
- async close_session() None ¶
セッションを終了します
- login() IMeDetailedSchema | None ¶
現在指定されているTokenのユーザー情報を返します
- ..deprecated:: 0.6.4
mipac.http.HTTPClient
をインスタンス化した際に自動的にセッションが作成されるようになったため非推奨になりました。現在のTokenのユーザー情報を取得する場合はmipac.actions.user.get_me()
を使用してください。
- 戻り値:
Tokenがある場合は自身の情報を返します。Tokenが無い場合はNoneを返します
- 戻り値の型:
IMeDetailedSchema | None
- property session: ClientSession¶
現在のセッションを返します
- 戻り値:
現在のセッション
- 戻り値の型:
aiohttp.ClientSession
MisskeyClientWebSocketResponse¶
- class mipac.http.MisskeyClientWebSocketResponse(reader: FlowControlDataQueue[WSMessage], writer: WebSocketWriter, protocol: str | None, response: ClientResponse, timeout: float, autoclose: bool, autoping: bool, loop: AbstractEventLoop, *, receive_timeout: float | None = None, heartbeat: float | None = None, compress: int = 0, client_notakeover: bool = False)¶
Route¶
- class mipac.http.Route(method: Literal['GET', 'POST'], path: Literal['/api/admin/meta', '/api/admin/abuse-user-reports', '/api/admin/abuse-report/notification-recipient/list', '/api/admin/abuse-report/notification-recipient/show', '/api/admin/abuse-report/notification-recipient/create', '/api/admin/abuse-report/notification-recipient/update', '/api/admin/abuse-report/notification-recipient/delete', '/api/admin/accounts/create', '/api/admin/accounts/delete', '/api/admin/accounts/find-by-email', '/api/admin/ad/create', '/api/admin/ad/delete', '/api/admin/ad/list', '/api/admin/ad/update', '/api/admin/announcements/create', '/api/admin/announcements/delete', '/api/admin/announcements/list', '/api/admin/announcements/update', '/api/admin/avatar-decorations/create', '/api/admin/avatar-decorations/delete', '/api/admin/avatar-decorations/list', '/api/admin/avatar-decorations/update', '/api/admin/delete-all-files-of-a-user', '/api/admin/unset-user-avatar', '/api/admin/unset-user-banner', '/api/admin/drive/clean-remote-files', '/api/admin/drive/cleanup', '/api/admin/drive/files', '/api/admin/drive/show-file', '/api/admin/emoji/add-aliases-bulk', '/api/admin/emoji/add', '/api/admin/emoji/copy', '/api/admin/emoji/delete-bulk', '/api/admin/emoji/delete', '/api/admin/emoji/import-zip', '/api/admin/emoji/list-remote', '/api/admin/emoji/list', '/api/admin/emoji/remove-aliases-bulk', '/api/admin/emoji/set-aliases-bulk', '/api/admin/emoji/set-category-bulk', '/api/admin/emoji/set-license-bulk', '/api/admin/emoji/update', '/api/admin/federation/delete-all-files', '/api/admin/federation/refresh-remote-instance-metadata', '/api/admin/federation/remove-all-following', '/api/admin/federation/update-instance', '/api/admin/get-index-stats', '/api/admin/get-table-stats', '/api/admin/get-user-ips', '/api/admin/invite/create', '/api/admin/invite/list', '/api/admin/promo/create', '/api/admin/queue/clear', '/api/admin/queue/deliver-delayed', '/api/admin/queue/inbox-delayed', '/api/admin/queue/promote', '/api/admin/queue/stats', '/api/admin/relays/add', '/api/admin/relays/list', '/api/admin/relays/remove', '/api/admin/reset-password', '/api/admin/resolve-abuse-user-report', '/api/admin/forward-abuse-user-report', '/api/admin/update-abuse-user-report', '/api/admin/send-email', '/api/admin/server-info', '/api/admin/show-moderation-logs', '/api/admin/show-user', '/api/admin/show-users', '/api/admin/suspend-user', '/api/admin/unsuspend-user', '/api/admin/update-meta', '/api/admin/delete-account', '/api/admin/update-user-note', '/api/admin/roles/create', '/api/admin/roles/delete', '/api/admin/roles/list', '/api/admin/roles/show', '/api/admin/roles/update', '/api/admin/roles/assign', '/api/admin/roles/unassign', '/api/admin/roles/update-default-policies', '/api/admin/roles/users', '/api/admin/system-webhook/create', '/api/admin/system-webhook/delete', '/api/admin/system-webhook/list', '/api/admin/system-webhook/show', '/api/admin/system-webhook/update', '/api/admin/system-webhook/test', '/api/announcements', '/api/announcements/show', '/api/antennas/create', '/api/antennas/delete', '/api/antennas/list', '/api/antennas/notes', '/api/antennas/show', '/api/antennas/update', '/api/ap/get', '/api/ap/show', '/api/app/create', '/api/app/show', '/api/auth/accept', '/api/auth/session/generate', '/api/auth/session/show', '/api/auth/session/userkey', '/api/blocking/create', '/api/blocking/delete', '/api/blocking/list', '/api/channels/create', '/api/channels/featured', '/api/channels/follow', '/api/channels/followed', '/api/channels/owned', '/api/channels/show', '/api/channels/timeline', '/api/channels/unfollow', '/api/channels/update', '/api/channels/favorite', '/api/channels/unfavorite', '/api/channels/my-favorites', '/api/channels/search', '/api/charts/active-users', '/api/charts/ap-request', '/api/charts/drive', '/api/charts/federation', '/api/charts/instance', '/api/charts/notes', '/api/charts/user/drive', '/api/charts/user/following', '/api/charts/user/notes', '/api/charts/user/pv', '/api/charts/user/reactions', '/api/charts/users', '/api/clips/add-note', '/api/clips/remove-note', '/api/clips/create', '/api/clips/delete', '/api/clips/list', '/api/clips/notes', '/api/clips/show', '/api/clips/update', '/api/clips/favorite', '/api/clips/unfavorite', '/api/clips/my-favorites', '/api/drive', '/api/drive/files', '/api/drive/files/attached-notes', '/api/drive/files/check-existence', '/api/drive/files/create', '/api/drive/files/delete', '/api/drive/files/find-by-hash', '/api/drive/files/find', '/api/drive/files/show', '/api/drive/files/update', '/api/drive/files/upload-from-url', '/api/drive/folders', '/api/drive/folders/create', '/api/drive/folders/delete', '/api/drive/folders/find', '/api/drive/folders/show', '/api/drive/folders/update', '/api/drive/stream', '/api/email-address/available', '/api/endpoint', '/api/endpoints', '/api/export-custom-emojis', '/api/federation/followers', '/api/federation/following', '/api/federation/instances', '/api/federation/show-instance', '/api/federation/update-remote-user', '/api/federation/users', '/api/federation/stats', '/api/following/create', '/api/following/delete', '/api/following/update', '/api/following/update-all', '/api/following/invalidate', '/api/following/requests/accept', '/api/following/requests/cancel', '/api/following/requests/list', '/api/following/requests/reject', '/api/gallery/featured', '/api/gallery/popular', '/api/gallery/posts', '/api/gallery/posts/create', '/api/gallery/posts/delete', '/api/gallery/posts/like', '/api/gallery/posts/show', '/api/gallery/posts/unlike', '/api/gallery/posts/update', '/api/get-online-users-count', '/api/get-avatar-decorations', '/api/hashtags/list', '/api/hashtags/search', '/api/hashtags/show', '/api/hashtags/trend', '/api/hashtags/users', '/api/i', '/api/i/2fa/done', '/api/i/2fa/key-done', '/api/i/2fa/password-less', '/api/i/2fa/register-key', '/api/i/2fa/register', '/api/i/2fa/update-key', '/api/i/2fa/remove-key', '/api/i/2fa/unregister', '/api/i/apps', '/api/i/authorized-apps', '/api/i/claim-achievement', '/api/i/change-password', '/api/i/delete-account', '/api/i/export-blocking', '/api/i/export-following', '/api/i/export-mute', '/api/i/export-notes', '/api/i/export-clips', '/api/i/export-favorites', '/api/i/export-user-lists', '/api/i/export-antennas', '/api/i/favorites', '/api/i/gallery/likes', '/api/i/gallery/posts', '/api/i/import-blocking', '/api/i/import-following', '/api/i/import-muting', '/api/i/import-user-lists', '/api/i/import-antennas', '/api/i/notifications', '/api/i/notifications-grouped', '/api/i/page-likes', '/api/i/pages', '/api/i/pin', '/api/i/read-all-unread-notes', '/api/i/read-announcement', '/api/i/regenerate-token', '/api/i/registry/get-all', '/api/i/registry/get-detail', '/api/i/registry/get', '/api/i/registry/keys-with-type', '/api/i/registry/keys', '/api/i/registry/remove', '/api/i/registry/scopes-with-domain', '/api/i/registry/set', '/api/i/revoke-token', '/api/i/signin-history', '/api/i/unpin', '/api/i/update-email', '/api/i/update', '/api/i/move', '/api/i/webhooks/create', '/api/i/webhooks/list', '/api/i/webhooks/show', '/api/i/webhooks/update', '/api/i/webhooks/delete', '/api/i/webhooks/test', '/api/invite/create', '/api/invite/delete', '/api/invite/list', '/api/invite/limit', '/api/meta', '/api/emojis', '/api/emoji', '/api/miauth/gen-token', '/api/mute/create', '/api/mute/delete', '/api/mute/list', '/api/renote-mute/create', '/api/renote-mute/delete', '/api/renote-mute/list', '/api/my/apps', '/api/notes', '/api/notes/children', '/api/notes/clips', '/api/notes/conversation', '/api/notes/create', '/api/notes/delete', '/api/notes/favorites/create', '/api/notes/favorites/delete', '/api/notes/featured', '/api/notes/global-timeline', '/api/notes/hybrid-timeline', '/api/notes/local-timeline', '/api/notes/mentions', '/api/notes/polls/recommendation', '/api/notes/polls/vote', '/api/notes/reactions', '/api/notes/reactions/create', '/api/notes/reactions/delete', '/api/notes/renotes', '/api/notes/replies', '/api/notes/search-by-tag', '/api/notes/search', '/api/notes/show', '/api/notes/state', '/api/notes/thread-muting/create', '/api/notes/thread-muting/delete', '/api/notes/timeline', '/api/notes/translate', '/api/notes/unrenote', '/api/notes/user-list-timeline', '/api/notifications/create', '/api/notifications/flush', '/api/notifications/mark-all-as-read', '/api/notifications/test-notification', '/api/page-push', '/api/pages/create', '/api/pages/delete', '/api/pages/featured', '/api/pages/like', '/api/pages/show', '/api/pages/unlike', '/api/pages/update', '/api/flash/create', '/api/flash/delete', '/api/flash/featured', '/api/flash/like', '/api/flash/show', '/api/flash/unlike', '/api/flash/update', '/api/flash/my', '/api/flash/my-likes', '/api/ping', '/api/pinned-users', '/api/promo/read', '/api/roles/list', '/api/roles/show', '/api/roles/users', '/api/roles/notes', '/api/request-reset-password', '/api/reset-db', '/api/reset-password', '/api/server-info', '/api/stats', '/api/sw/show-registration', '/api/sw/update-registration', '/api/sw/register', '/api/sw/unregister', '/api/test', '/api/username/available', '/api/users', '/api/users/clips', '/api/users/followers', '/api/users/following', '/api/users/gallery/posts', '/api/users/get-frequently-replied-users', '/api/users/featured-notes', '/api/users/lists/create', '/api/users/lists/delete', '/api/users/lists/list', '/api/users/lists/pull', '/api/users/lists/push', '/api/users/lists/show', '/api/users/lists/favorite', '/api/users/lists/unfavorite', '/api/users/lists/update', '/api/users/lists/create-from-public', '/api/users/lists/update-membership', '/api/users/lists/get-memberships', '/api/users/notes', '/api/users/pages', '/api/users/flashs', '/api/users/reactions', '/api/users/recommendation', '/api/users/relation', '/api/users/report-abuse', '/api/users/search-by-username-and-host', '/api/users/search', '/api/users/show', '/api/users/achievements', '/api/users/update-memo', '/api/fetch-rss', '/api/fetch-external-resources', '/api/retention', '/api/bubble-game/register', '/api/bubble-game/ranking', '/api/reversi/cancel-match', '/api/reversi/games', '/api/reversi/match', '/api/reversi/invitations', '/api/reversi/show-game', '/api/reversi/surrender', '/api/reversi/verify'])¶
MisskeyのAPIを使用するためのルートとメソッドを定義するクラス
- パラメータ:
method (Literal["GET", "POST"]) -- メソッド
path (ENDPOINTS) -- ルートパス
- path¶
ルートパス
- Type:
str
- method¶
メソッド
- Type:
str
Client¶
- class mipac.client.Client(url: str, token: str | None = None, *, log_level: Literal['NOTSET', 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] | None = 'INFO')¶
クライアントを定義したクラス
CacheConfig¶
- class mipac.config.CacheConfig(options: CacheConfigData)¶
キャッシュの設定を保持するクラス
CacheConfigData¶
- class mipac.config.CacheConfigData(maxsize: int = 1024, ttl: int = 360)¶
キャッシュの設定を保持するクラス
Config¶
- deffrom_dict
- class mipac.config.Config(*, host: str = '', is_ssl: bool = True, cache: CacheConfigData | None = None)¶
MiPACで使用する設定を保持するクラス
- from_dict(*, host: str | None = None, is_ssl: bool | None = None, cache: CacheConfigData | None = None) Self ¶
dictから設定を更新します
- パラメータ:
host (str | None, optional) -- サーバーのhost, by default None
is_ssl (bool | None, optional) -- サーバーがsslかどうか, by default None
cache (CacheConfigData | None, optional) -- キャッシュの設定, by default None
- 戻り値:
更新されたConfigクラス
- 戻り値の型:
Self
AbstractManager¶
- class mipac.abstract.manager.AbstractManager(*, session: HTTPClient, client: ClientManager)¶
AbstractAction¶
- class mipac.abstract.action.AbstractAction(*, session: HTTPClient, client: ClientManager)¶
Pagination¶
- class mipac.utils.pagination.Pagination(http_client: HTTPClient, route: Route, json: dict[str, Any], auth: bool = True, remove_none: bool = True, lower: bool = True, pagination_type: Literal['until', 'count'] = 'until', limit: int = 100)¶
ページネーションを行うためのクラスです
- property is_final: bool¶
現在のページネーションが最後の戻り値かを返します
- 戻り値:
最後の戻り値かどうか
- 戻り値の型:
bool
- async next() list[T] ¶
次のページを取得します
- 戻り値:
取得したページの戻り値
- 戻り値の型:
list
check_char_length_least¶
- mipac.utils.util.check_char_length_least(char: str | list[str], length: int) bool ¶
指定した文字列の長さが指定した長さ以上かをboolで返します
- パラメータ:
char (str | list[str]) -- 確認したい文字列
length (int) -- 指定した長さ
- 戻り値:
指定した長さ以上の場合はTrue, それ以外はFalse
- 戻り値の型:
bool
check_multi_arg¶
- mipac.utils.util.check_multi_arg(*args: Any) bool ¶
複数の値を受け取り値が存在するかをboolで返します
- パラメータ:
args (list) -- 確認したい変数のリスト
- 戻り値:
存在する場合はTrue, 存在しない場合はFalse
- 戻り値の型:
bool
deprecated¶
- mipac.utils.util.deprecated(func)¶
指定した関数が非推奨であることを示す為のデコレータ
Colors¶
- class mipac.utils.util.Colors¶
DeprecatedClass¶
- class mipac.utils.util.DeprecatedClass(remove_in_version: str)¶
MiTime¶
- class mipac.utils.util.MiTime(start: timedelta, end: datetime)¶
Missing¶
- class mipac.utils.util.Missing¶
値が存在しないことを示すクラス
bool_to_string¶
- mipac.utils.format.bool_to_string(boolean: bool) str ¶
boolを小文字にして文字列として返します
- パラメータ:
boolean (bool) -- 変更したいbool値
- 戻り値:
true or false -- 小文字になったbool文字列
- 戻り値の型:
str
convert_dict_keys_to_camel¶
- mipac.utils.format.convert_dict_keys_to_camel(data: Mapping[Any, Any], replace_list: dict[str, str] | None = None) Mapping[Any, Any] ¶
dictに含まれるkeyをスネークケースからキャメルケースに変換します
- パラメータ:
data (Mapping[Any, Any]) -- 変更したいdict
replace_list (dict[str, str] | None, default=None) -- dictのkey名を特定の物に置き換える
- 戻り値:
new_dict -- 変更後のdict
- 戻り値の型:
Mapping[Any, Any]
remove_dict_empty¶
- mipac.utils.format.remove_dict_empty(data: dict[str, Any], ignore_keys: list[str] | None = None) dict[str, Any] ¶
辞書から値がNoneのkeyを削除します
- パラメータ:
data (dict) -- 空のkeyを削除したいdict
ignore_keys (list) -- 削除したくないkeyのリスト
- 戻り値:
_data -- 空のkeyがなくなったdict
- 戻り値の型:
dict
remove_dict_missing¶
- mipac.utils.format.remove_dict_missing(data: dict[str, Any]) dict[str, Any] ¶
辞書からMISSINGのkeyを削除します
- パラメータ:
data (dict) -- 空のkeyを削除したいdict
- 戻り値:
_data -- MISSINGのkeyがなくなったdict
- 戻り値の型:
dict
snake_to_camel¶
- mipac.utils.format.snake_to_camel(snake_str: str, replace_list: dict[str, str]) str ¶
スネークケースをキャメルケースに変換します
- パラメータ:
snake_str (str) -- 変更したい文字列
replace_list (dict[str, str]) -- snake_strの特定の文字列を置き換える為の辞書
- 戻り値:
変換後の文字列
- 戻り値の型:
str
str_to_datetime¶
- mipac.utils.format.str_to_datetime(data: str, format: str = '%Y-%m-%dT%H:%M:%S.%fZ') datetime ¶
文字列をdatetimeに変換します
- パラメータ:
data (str) -- datetimeに変更したい文字列
format (str) -- dataのフォーマット
- 戻り値:
変換後のデータ
- 戻り値の型:
datetime
upper_to_lower¶
- mipac.utils.format.upper_to_lower(data: dict[str, Any], field: dict[str, Any] | None = None, nest: bool = True, replace_list: dict[str, Any] | None = None) dict[str, Any] ¶
dictのkeyを小文字に変換します
- パラメータ:
data (dict[str, Any]) -- 小文字にしたいkeyがあるdict
field (dict[str, Any] | None, default=None) -- 謎
nest (bool, default=True) -- ネストされたdictのkeyも小文字にするか否か
replace_list (dict[str, Any] | None, default=None) -- dictのkey名を特定の物に置き換える
- 戻り値:
field -- 小文字になった, key名が変更されたdict
- 戻り値の型:
dict[str, Any]
setup_logging¶
- mipac.utils.log.setup_logging(*, handler: Handler | None = None, formatter: Formatter | None = None, level: Literal['NOTSET', 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] = 'INFO') None ¶
ログの設定を行います
- パラメータ:
handler (logging.Handler | None, default=None) -- ログのハンドラー
formatter (logging.Formatter | None, default=None) -- ログのフォーマッター
level (LOGING_LEVEL_TYPE, default="INFO") -- ログのレベル
IMiAuthPayload¶
- class mipac.utils.auth.IMiAuthPayload¶
MiAuthの戻り値
MiAuth¶
- asynccheck_session
- asyncgen_session
- defset_session
- asyncwait_complete
- class mipac.utils.auth.MiAuth(host: str, protocol: Literal['http', 'https'])¶
Misskey v12以降のインスタンスで使用可能な認証方式です
- async check_session() Any ¶
MiAuthのセッションが完了したか確認します
- 戻り値:
MiAuthの戻り値
- 戻り値の型:
Any
- async gen_session(name: str | None = None, icon: str | None = None, callback: str | None = None, permission: list[Literal['read:account', 'write:account', 'read:blocks', 'write:blocks', 'read:drive', 'write:drive', 'read:favorites', 'write:favorites', 'read:following', 'write:following', 'read:messaging', 'write:messaging', 'read:mutes', 'write:mutes', 'write:notes', 'read:notifications', 'write:notifications', 'read:reactions', 'write:reactions', 'write:votes', 'read:pages', 'write:pages', 'write:page-likes', 'read:page-likes', 'read:user-groups', 'write:user-groups', 'read:channels', 'write:channels', 'read:gallery', 'write:gallery', 'read:gallery-likes', 'write:gallery-likes', 'read:flash', 'write:flash', 'read:flash-likes', 'write:flash-likes', 'read:admin:abuse-user-reports', 'write:admin:delete-account', 'write:admin:delete-all-files-of-a-user', 'read:admin:index-stats', 'read:admin:table-stats', 'read:admin:user-ips', 'read:admin:meta', 'write:admin:reset-password', 'write:admin:resolve-abuse-user-report', 'write:admin:send-email', 'read:admin:server-info', 'read:admin:show-moderation-log', 'read:admin:show-user', 'read:admin:show-users', 'write:admin:suspend-user', 'write:admin:unset-user-avatar', 'write:admin:unset-user-banner', 'write:admin:unsuspend-user', 'write:admin:meta', 'write:admin:user-note', 'write:admin:roles', 'read:admin:roles', 'write:admin:relays', 'read:admin:relays', 'write:admin:invite-codes', 'read:admin:invite-codes', 'write:admin:announcements', 'read:admin:announcements', 'write:admin:avatar-decorations', 'read:admin:avatar-decorations', 'write:admin:federation', 'write:admin:account', 'read:admin:account', 'write:admin:emoji', 'read:admin:emoji', 'write:admin:queue', 'read:admin:queue', 'write:admin:promo', 'write:admin:drive', 'read:admin:drive', 'write:admin:ad', 'read:admin:ad', 'write:invite-codes', 'read:invite-codes', 'write:clip-favorite', 'read:clip-favorite', 'read:federation', 'write:report-abuse']] | None = None) str ¶
MiAuthのセッションを生成します
- パラメータ:
name (str, optional) -- セッション名, by default None
icon (str, optional) -- アイコンのURL, by default None
callback (str, optional) -- コールバックURL, by default None
permission (list[Permissions], optional) -- 許可する権限, by default None
- 戻り値:
生成された認証用URL
- 戻り値の型:
str
- set_session() None ¶
sessionを生成してインスタンス変数にセットします
- async wait_complete() IMiAuthPayload ¶
MiAuthのセッションが完了するまで待機します
- 戻り値:
MiAuthの戻り値
- 戻り値の型:
cache¶
- mipac.utils.cache.cache(group: str = 'default', override: bool = False)¶
キャッシュを行います
LRUCache¶
- class mipac.utils.cache.LRUCache(capacity: int = 100)¶