API Reference

Misskey Models

Channel

class mipac.models.channel.Channel(raw_channel: IChannel, *, client: ClientManager)
property allow_renote_to_external: bool

外部へのリノートを許可するかどうか

戻り値の型:

bool

property api: ClientChannelManager

チャンネルに関するAPIを利用するためのクライアント

戻り値の型:

ClientChannelManager

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 pinned_notes: list[Note]

ピン留めされているノートのリスト

戻り値の型:

list[Note]

property user_id: str | None

チャンネルを作成したユーザーのID

戻り値の型:

str | None

property users_count: int

チャンネルに参加しているユーザー数

戻り値の型:

int

FollowRequest

class mipac.models.follow.FollowRequest(follow_request: IFollowRequest, *, client: ClientManager)

AdminMeta

class mipac.models.meta.AdminMeta(raw_meta: IAdminMeta, *, client: ClientManager)

Features

class mipac.models.meta.Features(raw_features: IFeatures)

Meta

class mipac.models.meta.Meta(instance_metadata: IMeta, *, 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)

Note

class mipac.models.note.Note(raw_note: INote, client: ClientManager)

Noteモデル

パラメータ:
property api: ClientNoteManager

Note api

戻り値:

note api

戻り値の型:

ClientNoteManager

property author: PartialUser

Note author

バージョン 0.6.0 で非推奨: Use mipac.models.note.Note.user() instead.

戻り値:

note author

戻り値の型:

PartialUser

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 files: list[File]

Note files

戻り値:

note files

戻り値の型:

list[IFile]

property id: str

note id

戻り値:

note id

戻り値の型:

str

property is_hidden: bool | None

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 poll: Poll | None

Note poll

戻り値:

note poll

戻り値の型:

IPoll | 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 reactions: dict[str, int]

Note reactions

戻り値:

note reactions

戻り値の型:

dict[str, int]

property renote: Note | None

Note renote

戻り値:

note renote

戻り値の型:

Note | None

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: Note | None

Note reply

戻り値:

note reply

戻り値の型:

Note | None

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

戻り値の型:

PartialUser

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

Attributes
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

戻り値の型:

PartialUser

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

Role

class mipac.models.roles.Role(role_data: IRole, *, client: ClientManager)

RolePolicies

class mipac.models.roles.RolePolicies(role_policies_data: IRolePolicies)

RoleUser

class mipac.models.roles.RoleUser(role_user: IRoleUser, *, client: ClientManager)

UsernameAvailable

Attributes
class mipac.models.username.UsernameAvailable(raw_username_available: IUsernameAvailable)
property available: bool

ユーザー名が使用可能かどうか

戻り値:

ユーザー名が使用可能かどうか

戻り値の型:

bool

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

Attributes
class mipac.models.announcement.AnnouncementDetailed(raw_announcement: IAnnouncementDetailed, *, client: ClientManager)
property reads: int

Returns the number of reads of the announcement.

PartialReaction

class mipac.models.reaction.PartialReaction(reaction: INoteUpdated[INoteUpdatedReaction], *, client: ClientManager)

FederationInstance

class mipac.models.instance.FederationInstance(instance: IFederationInstance, *, client: ClientManager)

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

Blocking

class mipac.models.blocking.Blocking(*, raw_blocking: IBlocking, client: ClientManager)
property api: ClientBlockingManager

ブロック対象に対するAPIを利用するためのManager

戻り値:

ブロック対象に対するAPIを利用するためのManager

戻り値の型:

ClientBlockingManager

property blockee: UserDetailedNotMe

ブロック対象のユーザー情報

戻り値:

ブロック対象のユーザー情報

戻り値の型:

UserDetailedNotMe

property blockee_id: str

ブロック対象のユーザーID

戻り値:

ブロック対象のユーザーID

戻り値の型:

str

property created_at: datetime

ブロックした日時

戻り値:

ブロックした日時

戻り値の型:

datetime

property id: str

ブロックID

戻り値:

ブロックID

戻り値の型:

str

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

GalleryPost

class mipac.models.gallery.GalleryPost(raw_gallery: IGalleryPost, *, 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

class mipac.models.admin.UserIP(user_ip: IUserIP)

Hashtag

class mipac.models.hashtag.Hashtag(*, raw_hashtag: IHashtag, client: ClientManager)

TrendHashtag

Attributes
class mipac.models.hashtag.TrendHashtag(*, raw_trend_hashtag: ITrendHashtag, client: ClientManager)
property chart

チャート

戻り値:

チャート

戻り値の型:

list[int]

property tag

ハッシュタグ

戻り値:

ハッシュタグ

戻り値の型:

str

property users_count

ユーザー数

戻り値:

ユーザー数

戻り値の型:

int

DriveStatus

Attributes
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クライアント

戻り値の型:

ClientFileManager

property blurhash: str | None

ファイルのBlurHash

戻り値:

ファイルのBlurHash

戻り値の型:

str | None

property comment: str | None

ファイルのコメント

戻り値:

ファイルのコメント

戻り値の型:

str | None

property created_at: datetime

ファイルの作成日時

戻り値:

ファイルの作成日時

戻り値の型:

datetime

property folder: Folder | None

ファイルが存在するフォルダ

戻り値:

ファイルが存在するフォルダ

戻り値の型:

Folder | None

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

ファイルのプロパティ

戻り値:

ファイルのプロパティ

戻り値の型:

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

Attributes
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: Folder | None

親フォルダー

戻り値:

親フォルダー

戻り値の型:

Folder | None

property parent_id: str | None

親フォルダーのID

戻り値:

親フォルダーのID

戻り値の型:

str | None

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)

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)

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)

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)

Muting

class mipac.models.mute.Muting(raw_mute_user: IMuting, *, client: ClientManager)

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)

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)

PartialMeta

class mipac.models.lite.meta.PartialMeta(raw_meta: T, *, client: ClientManager)

Policies

class mipac.models.lite.meta.Policies(raw_policies: IPolicies)
property can_edit_note: bool

Whether you can edit a note

property can_hide_ads: bool

Whether you can hide ads

property can_invite: bool

Whether you can invite

property can_manage_custom_emojis: bool

Whether you can manage custom emojis

property can_public_note: bool

Whether you can post a public note

property can_search_notes: bool

Whether you can search note

property can_use_translator: bool

Whether you can use translator

property gtl_available: bool

Whether GTL is effective

property ltl_available: bool

Whether LTL is effective

PartialAd

Attributes
class mipac.models.lite.ad.PartialAd(raw_ad: T, *, client: ClientManager)
property id: str

広告のID

戻り値:

広告のID

戻り値の型:

str

property url: str

広告のURL

戻り値:

広告のURL

戻り値の型:

str

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

PartialRole

class mipac.models.lite.role.PartialRole(role_data: T, *, client: ClientManager)

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

class mipac.models.lite.user.PartialUser(raw_user: PU, *, client: ClientManager)
property api: ClientUserManager

Returns the user manager instance.

戻り値:

The user manager instance

戻り値の型:

ClientUserManager

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

PartialCustomEmoji

class mipac.models.lite.emoji.PartialCustomEmoji(emoji: ICustomEmojiLite, *, client: ClientManager)

Managers

ChannelManager

class mipac.manager.channel.ChannelManager(*, session: HTTPClient, client: ClientManager)

ClientChannelManager

class mipac.manager.channel.ClientChannelManager(channel_id: str, *, session: HTTPClient, client: ClientManager)

PagesManager

class mipac.manager.page.PagesManager(*, 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)

ClientFavoriteManager

Attributes
class mipac.manager.favorite.ClientFavoriteManager(note_id: str, *, session: HTTPClient, client: ClientManager)
property action: ClientFavoriteActions

お気に入りに関するアクション

戻り値:

お気に入りに対するアクションを行うクラス

戻り値の型:

ClientFavoriteActions

FavoriteManager

Attributes
class mipac.manager.favorite.FavoriteManager(note_id: str | None = None, *, session: HTTPClient, client: ClientManager)
property action: FavoriteActions

お気に入りに関するアクション

戻り値:

お気に入りに対するアクションを行うクラス

戻り値の型:

ReactionActions

ClientManager

class mipac.manager.client.ClientManager(session: HTTPClient, config: Config)

ClientInviteManager

class mipac.manager.invite.ClientInviteManager(invite_id: str, *, session: HTTPClient, client: ClientManager)

InviteManager

class mipac.manager.invite.InviteManager(*, 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

FederationManager

class mipac.manager.federation.FederationManager(*, session: HTTPClient, client: ClientManager)

UsernameManager

class mipac.manager.username.UsernameManager(*, session: HTTPClient, client: ClientManager)

ClientReactionManager

Attributes
class mipac.manager.reaction.ClientReactionManager(note_id: str, *, session: HTTPClient, client: ClientManager)
property action: ClientReactionActions

リアクションに関するアクション

戻り値:

Reactionに対するアクションを行うクラス

戻り値の型:

ClientReactionActions

ReactionManager

Attributes
class mipac.manager.reaction.ReactionManager(note_id: str | None = None, *, session: HTTPClient, client: ClientManager)
property action: ReactionActions

リアクションに関するアクション

戻り値:

Reactionに対するアクションを行うクラス

戻り値の型:

ReactionActions

AntennaManager

class mipac.manager.antenna.AntennaManager(*, session: HTTPClient, client: ClientManager)

ClientAntennaManager

class mipac.manager.antenna.ClientAntennaManager(*, antenna_id: str, 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)

ClientClipManager

class mipac.manager.clip.ClientClipManager(clip_id: str, *, session: HTTPClient, client: ClientManager)

ClipManager

class mipac.manager.clip.ClipManager(*, session: HTTPClient, client: ClientManager)

RoleManager

class mipac.manager.role.RoleManager(*, session: HTTPClient, client: ClientManager)

HashtagManager

class mipac.manager.hashtag.HashtagManager(*, session: HTTPClient, client: ClientManager)

MyManager

class mipac.manager.my.MyManager(*, session: HTTPClient, client: ClientManager)

ClientUserManager

class mipac.manager.user.ClientUserManager(user: PartialUser, *, session: HTTPClient, client: ClientManager)

UserManager

class mipac.manager.user.UserManager(*, session: HTTPClient, client: ClientManager)

ChartManager

class mipac.manager.chart.ChartManager(*, session: HTTPClient, client: ClientManager)

EmojiManager

class mipac.manager.emoji.EmojiManager(*, 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)

AdminInviteManager

class mipac.manager.admins.invite.AdminInviteManager(*, session: HTTPClient, client: ClientManager)

AdminRolesManager

class mipac.manager.admins.roles.AdminRolesManager(role_id: str | None = None, *, session: HTTPClient, client: ClientManager)

AdminRolesModelManager

class mipac.manager.admins.roles.AdminRolesModelManager(role_id: str | None = None, *, 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)

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)

AdminManager

class mipac.manager.admins.admin.AdminManager(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)

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)

AdminEmojiManager

class mipac.manager.admins.emoji.AdminEmojiManager(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)

DriveManager

class mipac.manager.drive.drive.DriveManager(*, 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)

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)

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)

Actions

ChannelActions

Methods
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

戻り値:

作成したチャンネル

戻り値の型:

Channel

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]

async show(channel_id: str) Channel

指定したIDのチャンネルを取得します

Endpoint: /api/channels/show

パラメータ:

channel_id (str) -- 対象のチャンネルID

戻り値:

取得したチャンネル

戻り値の型:

Channel

ClientChannelActions

Methods
class mipac.actions.channel.ClientChannelActions(channel_id: str, *, session: HTTPClient, client: ClientManager)
async favorite(*, channel_id: str) bool

指定したIDのチャンネルをお気に入りにします

Endpoint: /api/channels/favorite

パラメータ:

channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

お気に入りに追加できたかどうか

戻り値の型:

bool

async follow(*, channel_id: str) bool

Follow a channel

Endpoint: /api/channels/follow

パラメータ:

channel_id (str, optional) -- ID of the channel, by default None

戻り値:

Whether the channel is followed

戻り値の型:

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, *, channel_id: str | 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

  • channel_id (str | None) -- 対象のチャンネルID, 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, *, channel_id: str | None = None) Note

Send a note

Endpoint: /api/notes/create

パラメータ:
  • text (str, optional) -- Text of the note, by default None

  • visibility (INoteVisibility, optional) -- Visibility of the note, by default "public"

  • visible_user_ids (list[str], optional) -- Visible user IDs, by default None

  • cw (str, optional) -- CW of the note, by default None

  • local_only (bool, optional) -- Whether the note is local only, by default False

  • reaction_acceptance (IReactionAcceptance, optional) -- Reaction acceptance of the note, by default None

  • extract_mentions (bool, optional) -- Whether to extract mentions, by default True

  • extract_hashtags (bool, optional) -- Whether to extract hashtags, by default True

  • extract_emojis (bool, optional) -- Whether to extract emojis, by default True

  • reply_id (str, optional) -- Reply ID, by default None

  • renote_id (str, optional) -- Renote ID, by default None

  • files (list[MiFile | File | str], optional) -- Files, by default None

  • poll (MiPoll, optional) -- Poll, by default None

  • channel_id (str, optional) -- ID of the channel, by default None

戻り値:

Created note

戻り値の型:

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, *, channel_id: str) 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

  • channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

取得したノートのリスト

戻り値の型:

list[Note]

async unfavorite(*, channel_id: str) bool

指定したIDのチャンネルをお気に入りから外します

Endpoint: /api/channels/unfavorite

パラメータ:

channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

お気に入りから外せたかどうか

戻り値の型:

bool

async unfollow(*, channel_id: str) bool

指定したIDのチャンネルのフォローを解除します

Endpoint: /api/channels/unfollow

パラメータ:

channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

フォロー解除に成功したかどうか

戻り値の型:

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_id: str) 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

  • channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

更新後のチャンネル

戻り値の型:

Channel

SharedChannelActions

Methods
class mipac.actions.channel.SharedChannelActions(*, session: HTTPClient, client: ClientManager)
async favorite(*, channel_id: str) bool

指定したIDのチャンネルをお気に入りにします

Endpoint: /api/channels/favorite

パラメータ:

channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

お気に入りに追加できたかどうか

戻り値の型:

bool

async follow(*, channel_id: str) bool

Follow a channel

Endpoint: /api/channels/follow

パラメータ:

channel_id (str, optional) -- ID of the channel, by default None

戻り値:

Whether the channel is followed

戻り値の型:

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, *, channel_id: str) 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

  • channel_id (str | None) -- 対象のチャンネルID, 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, *, channel_id: str) Note

Send a note

Endpoint: /api/notes/create

パラメータ:
  • text (str, optional) -- Text of the note, by default None

  • visibility (INoteVisibility, optional) -- Visibility of the note, by default "public"

  • visible_user_ids (list[str], optional) -- Visible user IDs, by default None

  • cw (str, optional) -- CW of the note, by default None

  • local_only (bool, optional) -- Whether the note is local only, by default False

  • reaction_acceptance (IReactionAcceptance, optional) -- Reaction acceptance of the note, by default None

  • extract_mentions (bool, optional) -- Whether to extract mentions, by default True

  • extract_hashtags (bool, optional) -- Whether to extract hashtags, by default True

  • extract_emojis (bool, optional) -- Whether to extract emojis, by default True

  • reply_id (str, optional) -- Reply ID, by default None

  • renote_id (str, optional) -- Renote ID, by default None

  • files (list[MiFile | File | str], optional) -- Files, by default None

  • poll (MiPoll, optional) -- Poll, by default None

  • channel_id (str, optional) -- ID of the channel, by default None

戻り値:

Created note

戻り値の型:

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, *, channel_id: str) 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

  • channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

取得したノートのリスト

戻り値の型:

list[Note]

async unfavorite(*, channel_id: str) bool

指定したIDのチャンネルをお気に入りから外します

Endpoint: /api/channels/unfavorite

パラメータ:

channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

お気に入りから外せたかどうか

戻り値の型:

bool

async unfollow(*, channel_id: str) bool

指定したIDのチャンネルのフォローを解除します

Endpoint: /api/channels/unfollow

パラメータ:

channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

フォロー解除に成功したかどうか

戻り値の型:

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_id: str) 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

  • channel_id (str | None) -- 対象のチャンネルID, default=None

戻り値:

更新後のチャンネル

戻り値の型:

Channel

ClientFollowActions

Methods
class mipac.actions.follow.ClientFollowActions(user_id: str, *, session: HTTPClient, client: ClientManager)
async add(*, user_id: str | None = None) PartialUser

対象のユーザーをフォローします

バージョン 0.6.1 で非推奨: Use mipac.actions.follow.SharedFollowActions.create() instead.

戻り値:

The user that you followed

戻り値の型:

UserLite

async invalidate(*, user_id: str | None = None) PartialUser

Make the user unfollows you

戻り値:

The user that followed you

戻り値の型:

PartialUser

async remove(*, user_id: str | None = None) PartialUser

対象のユーザーのフォローを解除します

バージョン 0.6.1 で非推奨: Use mipac.actions.follow.SharedFollowActions.delete() instead.

戻り値:

The user that you unfollowed

戻り値の型:

PartialUser

FollowActions

class mipac.actions.follow.FollowActions(*, session: HTTPClient, client: ClientManager)

FollowRequestActions

Methods
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

戻り値の型:

PartialUser

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

SharedFollowActions

Methods
class mipac.actions.follow.SharedFollowActions(*, session: HTTPClient, client: ClientManager)
add(*, user_id: str) PartialUser

対象のユーザーをフォローします

バージョン 0.6.1 で非推奨: Use mipac.actions.follow.SharedFollowActions.create() instead.

戻り値:

The user that you followed

戻り値の型:

UserLite

async invalidate(*, user_id: str) PartialUser

Make the user unfollows you

戻り値:

The user that followed you

戻り値の型:

PartialUser

remove(*, user_id: str) PartialUser

対象のユーザーのフォローを解除します

バージョン 0.6.1 で非推奨: Use mipac.actions.follow.SharedFollowActions.delete() instead.

戻り値:

The user that you unfollowed

戻り値の型:

PartialUser

ClientFavoriteActions

class mipac.actions.favorite.ClientFavoriteActions(note_id: str, *, session: HTTPClient, client: ClientManager)

FavoriteActions

class mipac.actions.favorite.FavoriteActions(*, session: HTTPClient, client: ClientManager)

SharedFavoriteActions

class mipac.actions.favorite.SharedFavoriteActions(*, session: HTTPClient, client: ClientManager)

ClientActions

class mipac.actions.client.ClientActions(*, session: HTTPClient, client: ClientManager)

ClientInviteActions

Methods
class mipac.actions.invite.ClientInviteActions(invite_id: str, *, session: HTTPClient, client: ClientManager)
async delete(*, invite_id: str | None = None) bool

Delete an invite code.

パラメータ:

invite_id (str | None, optional) -- The invite code to delete, by default None

戻り値:

Whether the invite code was deleted.

戻り値の型:

bool

InviteActions

Methods
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]

SharedInviteActions

Methods
class mipac.actions.invite.SharedInviteActions(*, session: HTTPClient, client: ClientManager)
async delete(*, invite_id: str) bool

Delete an invite code.

パラメータ:

invite_id (str | None, optional) -- The invite code to delete, by default None

戻り値:

Whether the invite code was deleted.

戻り値の型:

bool

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

class mipac.actions.note.ClientNoteActions(note_id: str, *, session: HTTPClient, client: ClientManager)
async add_clips(clip_id: str, *, note_id: str | None = None) bool

Add a note to the clip

Endpoint: /api/clips/add-note

パラメータ:
  • note_id (str | None, default=None) -- note id

  • 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_id: str | 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

  • note_id (str | None, default=None) -- Note IDs to target for renote and citations

async create_renote(*, note_id: str | None = None) Note

Renote a note

Endpoint: /api/notes/create

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Renoted note

戻り値の型:

Note

async delete(*, note_id: str | None = None) 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, *, note_id: str | None = None) list[Note]

Get children of the note. update the cache of the mipac.actions.note.ClientNoteActions.get_children() method

Endpoint: /api/notes/children

パラメータ:
  • limit (int, default=100) -- limit

  • since_id (str | None, default=None) -- Since ID

  • untilId (str | None, default=None) -- Until ID

  • note_id (str | None, default=None) -- note id

戻り値:

Children of the note

戻り値の型:

list[Note]

async fetch_state(*, note_id: str | None = None) NoteState

Get the state of the note.

update the cache of the mipac.actions.note.ClientNoteActions.get_state() method

Endpoint: /api/notes/state

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Note state

戻り値の型:

NoteState

async get_all_children(limit: int = 10, since_id: str | None = None, untilId: str | None = None, *, note_id: 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

  • note_id (str | None, default=None) -- note 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, *, note_id: str | None = None) 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

  • note_id (str | None, default=None) -- note id

戻り値:

replies

戻り値の型:

AsyncGenerator[Note, None]

async get_clips(*, note_id: str | None = None) list[Clip]

Get the clips of the note

Endpoint: /api/notes/clips

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Clips of the note

戻り値の型:

list[Clip]

async get_conversation(limit: int = 10, offset: int = 0, *, note_id: str | None = None) list[Note]

Get the conversation of the note

Endpoint: /api/notes/conversation

パラメータ:
  • limit (int, default=10) -- limit

  • offset (int, default=0) -- offset

  • note_id (str | None, default=None) -- note id

戻り値:

Notes of the conversation

戻り値の型:

list[Note]

async get_renotes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, *, note_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

  • note_id (str | None, default=None) -- note id

戻り値:

Renotes of the note

戻り値の型:

list[Note]

async get_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, note_id: str | None = None) 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

  • note_id (str | None, default=None) -- note id

戻り値:

replies

戻り値の型:

list[Note]

async get_state(*, note_id: str | None = None) NoteState

Get the state of the note

Endpoint: /api/notes/state

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Note state

戻り値の型:

NoteState

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_id: str | 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', *, note_id: str | None = None) NoteTranslateResult

Translate a note

Endpoint: /api/notes/translate

パラメータ:
  • note_id (str | None, default=None) -- Note ID to target for translation

  • target_lang (str, default='en') -- Target language

戻り値:

Translated result

戻り値の型:

NoteTranslateResult

async un_renote(*, note_id: str | None = None) bool

Releases the note renote for the specified Id

パラメータ:

note_id (str | None, optional) -- Target note Id., by default None

戻り値:

Whether the release was successful

戻り値の型:

bool

NoteActions

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() method

Endpoint: /api/notes/show

パラメータ:

note_id (str) -- note id

戻り値:

note

戻り値の型:

Note

async get(note_id: str) Note

Get a note

Endpoint: /api/notes/show

パラメータ:

note_id (str) -- ノートのID

戻り値:

取得したノートID

戻り値の型:

Note

ノートを検索します

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]

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

戻り値:

投稿したノート

戻り値の型:

Note

例外:

ContentRequired -- [description]

SharedNoteActions

class mipac.actions.note.SharedNoteActions(session: HTTPClient, client: ClientManager)
async add_clips(clip_id: str, *, note_id: str) bool

Add a note to the clip

Endpoint: /api/clips/add-note

パラメータ:
  • note_id (str | None, default=None) -- note id

  • 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_id: str) 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

  • note_id (str | None, default=None) -- Note IDs to target for renote and citations

async create_renote(*, note_id: str) Note

Renote a note

Endpoint: /api/notes/create

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Renoted note

戻り値の型:

Note

async delete(*, note_id: str) 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, *, note_id: str) list[Note]

Get children of the note. update the cache of the mipac.actions.note.ClientNoteActions.get_children() method

Endpoint: /api/notes/children

パラメータ:
  • limit (int, default=100) -- limit

  • since_id (str | None, default=None) -- Since ID

  • untilId (str | None, default=None) -- Until ID

  • note_id (str | None, default=None) -- note id

戻り値:

Children of the note

戻り値の型:

list[Note]

async fetch_state(*, note_id: str) NoteState

Get the state of the note.

update the cache of the mipac.actions.note.ClientNoteActions.get_state() method

Endpoint: /api/notes/state

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Note state

戻り値の型:

NoteState

async get_all_children(limit: int = 10, since_id: str | None = None, untilId: str | None = None, *, note_id: str) 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

  • note_id (str | None, default=None) -- note 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, *, note_id: str) 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

  • note_id (str | None, default=None) -- note id

戻り値:

replies

戻り値の型:

AsyncGenerator[Note, None]

async get_clips(*, note_id: str) list[Clip]

Get the clips of the note

Endpoint: /api/notes/clips

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Clips of the note

戻り値の型:

list[Clip]

async get_conversation(limit: int = 10, offset: int = 0, *, note_id: str) list[Note]

Get the conversation of the note

Endpoint: /api/notes/conversation

パラメータ:
  • limit (int, default=10) -- limit

  • offset (int, default=0) -- offset

  • note_id (str | None, default=None) -- note id

戻り値:

Notes of the conversation

戻り値の型:

list[Note]

async get_renotes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, *, note_id: str) 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

  • note_id (str | None, default=None) -- note id

戻り値:

Renotes of the note

戻り値の型:

list[Note]

async get_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, note_id: str) 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

  • note_id (str | None, default=None) -- note id

戻り値:

replies

戻り値の型:

list[Note]

async get_state(*, note_id: str) NoteState

Get the state of the note

Endpoint: /api/notes/state

パラメータ:

note_id (str | None, default=None) -- note id

戻り値:

Note state

戻り値の型:

NoteState

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_id: str)

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', *, note_id: str) NoteTranslateResult

Translate a note

Endpoint: /api/notes/translate

パラメータ:
  • note_id (str | None, default=None) -- Note ID to target for translation

  • target_lang (str, default='en') -- Target language

戻り値:

Translated result

戻り値の型:

NoteTranslateResult

async un_renote(*, note_id: str) bool

Releases the note renote for the specified Id

パラメータ:

note_id (str | None, optional) -- Target note Id., by default None

戻り値:

Whether the release was successful

戻り値の型:

bool

FederationActions

class mipac.actions.federation.FederationActions(*, session: HTTPClient, client: ClientManager)

UsernameActions

class mipac.actions.username.UsernameActions(*, session: HTTPClient, client: ClientManager)

ClientReactionActions

Methods
class mipac.actions.reaction.ClientReactionActions(note_id: str, *, session: HTTPClient, client: ClientManager)
async add(reaction: str, *, note_id: str | None = None) bool

Add reaction to note

Endpoint: /api/notes/reactions/create

パラメータ:
  • reaction (str) -- reaction

  • note_id (str, optional) -- note id, by default None

戻り値:

success or not

戻り値の型:

bool

async remove(*, note_id: str | None = None) bool

Remove reaction from note

Endpoint: /api/notes/reactions/delete

パラメータ:

note_id (str, optional) -- note id, by default None

戻り値:

success or not

戻り値の型:

bool

ReactionActions

class mipac.actions.reaction.ReactionActions(*, session: HTTPClient, client: ClientManager)

SharedReactionActions

Methods
class mipac.actions.reaction.SharedReactionActions(*, session: HTTPClient, client: ClientManager)
async add(reaction: str, *, note_id: str) bool

Add reaction to note

Endpoint: /api/notes/reactions/create

パラメータ:
  • reaction (str) -- reaction

  • note_id (str, optional) -- note id, by default None

戻り値:

success or not

戻り値の型:

bool

async remove(*, note_id: str) bool

Remove reaction from note

Endpoint: /api/notes/reactions/delete

パラメータ:

note_id (str, optional) -- note id, by default None

戻り値:

success or not

戻り値の型:

bool

AntennaActions

Methods
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.

パラメータ:
  • 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.

戻り値の型:

Antenna

ClientAntennaActions

Methods
class mipac.actions.antenna.ClientAntennaActions(*, antenna_id: str, session: HTTPClient, client: ClientManager)
async delete(*, antenna_id: str | None = None) bool

Delete antenna from identifier

パラメータ:

antenna_id (str | None, optional) -- target identifier

戻り値:

success or failure

戻り値の型:

bool

async show(*, antenna_id: str | None = None) Antenna

Show antenna from identifier

パラメータ:

antenna_id (str | None, optional) -- target identifier, by default None

戻り値:

antenna object

戻り値の型:

Antenna

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_id: str | None = None) Antenna

Update an antenna.

パラメータ:
  • 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.

戻り値の型:

Antenna

SharedAntennaActions

Methods
class mipac.actions.antenna.SharedAntennaActions(*, session: HTTPClient, client: ClientManager)
async delete(*, antenna_id: str) bool

Delete antenna from identifier

パラメータ:

antenna_id (str | None, optional) -- target identifier

戻り値:

success or failure

戻り値の型:

bool

async show(*, antenna_id: str) Antenna

Show antenna from identifier

パラメータ:

antenna_id (str | None, optional) -- target identifier, by default None

戻り値:

antenna object

戻り値の型:

Antenna

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_id: str) Antenna

Update an antenna.

パラメータ:
  • 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.

戻り値の型:

Antenna

BlockingActions

class mipac.actions.blocking.BlockingActions(*, session: HTTPClient, client: ClientManager)

ブロックアクション user_idを持たないメソッドのみを持ち、持つものはSharedBlockingActionsに実装する

ClientBlockingActions

class mipac.actions.blocking.ClientBlockingActions(user_id: str, *, session: HTTPClient, client: ClientManager)

クライアント用のブロックアクション

基本的にoverride以外は行わない

SharedBlockingActions

class mipac.actions.blocking.SharedBlockingActions(*, session: HTTPClient, client: ClientManager)

ClientClipActions

Methods
class mipac.actions.clip.ClientClipActions(clip_id: str, *, session: HTTPClient, client: ClientManager)
async add_note(note_id: str, *, clip_id: str | None = None) bool

Add a note to a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • note_id (str) -- The note id

戻り値:

True if the note was added to the clip, False otherwise

戻り値の型:

bool

async delete(*, clip_id: str | None = None) bool

Delete a clip

パラメータ:

clip_id (str | None, optional, by default None) -- The clip id

戻り値:

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, *, clip_id: str | None = None) AsyncGenerator[Note, None]

Get notes from a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • limit (int, optional, by default 10) -- The number of notes to get

  • since_id (str | None, optional, by default None) -- The note id to get notes after

  • until_id (str | None, optional, by default None) -- The note id to get notes before

  • get_all (bool, optional, by default False) -- Whether to get all notes

列挙:

AsyncGenerator[Note, None] -- The notes

async remove_note(note_id: str, *, clip_id: str | None) bool

Remove a note from a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • 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_id: str | None = None) Clip

Update a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • name (str) -- The clip name

  • is_public (bool, optional) -- Whether the clip is public, by default None

  • description (str, optional) -- The clip description, by default None

戻り値:

True if the clip was updated, False otherwise

戻り値の型:

bool

ClipActions

Methods
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, by default False

  • description (str, optional) -- The clip description, by default None

戻り値:

The created clip

戻り値の型:

Clip

async get(clip_id: str) Clip

Get a clip

パラメータ:

clip_id (str) -- The clip id

戻り値:

The clip

戻り値の型:

Clip

async get_list() list[Clip]

Get my clips

戻り値:

The clips

戻り値の型:

list[Clip]

async get_my_favorites()

Get my favorite clips

戻り値:

The favorite clips

戻り値の型:

list[Clip]

SharedClipActions

Methods
class mipac.actions.clip.SharedClipActions(*, session: HTTPClient, client: ClientManager)
async add_note(note_id: str, *, clip_id: str) bool

Add a note to a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • note_id (str) -- The note id

戻り値:

True if the note was added to the clip, False otherwise

戻り値の型:

bool

async delete(*, clip_id: str) bool

Delete a clip

パラメータ:

clip_id (str | None, optional, by default None) -- The clip id

戻り値:

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, *, clip_id: str) AsyncGenerator[Note, None]

Get notes from a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • limit (int, optional, by default 10) -- The number of notes to get

  • since_id (str | None, optional, by default None) -- The note id to get notes after

  • until_id (str | None, optional, by default None) -- The note id to get notes before

列挙:

AsyncGenerator[Note, None] -- The notes

async remove_note(note_id: str, *, clip_id: str) bool

Remove a note from a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • 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_id: str) Clip

Update a clip

パラメータ:
  • clip_id (str | None, optional, by default None) -- The clip id

  • name (str) -- The clip name

  • is_public (bool, optional) -- Whether the clip is public, by default None

  • description (str, optional) -- The clip description, by default None

戻り値:

True if the clip was updated, False otherwise

戻り値の型:

bool

RoleActions

Methods
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.

戻り値の型:

Role

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, by default 10

  • since_id (str, optional) -- The ID of the note to get notes after, by default None

  • until_id (str, optional) -- The ID of the note to get notes before, by default None

  • since_data (int, optional) -- The timestamp of the note to get notes after, by default None

  • until_data (int, optional) -- The timestamp of the note to get notes before, by default None

  • get_all (bool, optional) -- Whether to get all notes, by 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, by default None

  • until_id (str, optional) -- The ID of the user to get users before, by default None

  • limit (int, optional) -- The number of users to get, by default 10

  • get_all (bool, optional) -- Whether to get all users, by default False

列挙:

AsyncGenerator[RoleUser, None] -- The role user data.

HashtagActions

Methods
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]

async search(query: str, limit: int = 10, offset: int = 0) list[str]

ハッシュタグを検索します

パラメータ:
  • query (str) -- 検索するクエリを指定します。

  • limit (int, optional) -- 取得するハッシュタグの数を指定します, default=10

  • offset (int, optional) -- オフセットを指定します, default=0

戻り値:

取得したハッシュタグのリストです。

戻り値の型:

list[Hashtag]

async show(tag: str)

ハッシュタグの情報を取得します。

パラメータ:

tag (str) -- 取得するハッシュタグの名前です。

戻り値:

取得したハッシュタグの情報です。

戻り値の型:

Hashtag

MyActions

Methods
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 -- 実績機能が存在しないサーバーを使用している

ClientUserActions

class mipac.actions.user.ClientUserActions(user: PartialUser, *, session: HTTPClient, client: ClientManager)
async get_achievements(*, user_id: str | None = None) list[Achievement]

Get achievements of user.

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.

  • user_id (str, default=None) -- Get featured notes with this user id.

戻り値:

A list of featured notes.

戻り値の型:

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.

  • user_id (str, default=None) -- Get featured notes with this user 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, *, user_id: 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.

  • user_id (str, default=None) -- Get followers with this user id.

戻り値:

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, *, user_id: 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.

  • user_id (str, default=None) -- Get following with this user id.

戻り値:

A list of following.

戻り値の型:

list[Following]

async get_frequently_replied_users(limit: int = 10, *, user_id: str | None = None) 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]

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.

  • user_id (str, default=None) -- Get gallery posts with this user id.

戻り値:

A list of gallery posts.

戻り値の型:

list[GalleryPost]

SharedUserActions

class mipac.actions.user.SharedUserActions(*, session: HTTPClient, client: ClientManager)
async get_achievements(*, user_id: str) list[Achievement]

Get achievements of user.

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.

  • user_id (str, default=None) -- Get featured notes with this user id.

戻り値:

A list of featured notes.

戻り値の型:

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.

  • user_id (str, default=None) -- Get featured notes with this user 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, *, user_id: str) 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.

  • user_id (str, default=None) -- Get followers with this user id.

戻り値:

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, *, user_id: str) 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.

  • user_id (str, default=None) -- Get following with this user id.

戻り値:

A list of following.

戻り値の型:

list[Following]

async get_frequently_replied_users(limit: int = 10, *, user_id: str) 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]

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.

  • user_id (str, default=None) -- Get gallery posts with this user id.

戻り値:

A list of gallery posts.

戻り値の型:

list[GalleryPost]

UserActions

Methods
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, **kwargs) 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]

ChartActions

class mipac.actions.chart.ChartActions(session: HTTPClient, client: ClientManager)

EmojiActions

class mipac.actions.emoji.EmojiActions(*, session: HTTPClient, client: ClientManager)

ClientPollActions

class mipac.actions.poll.ClientPollActions(note_id: str, *, session: HTTPClient, client: ClientManager)

PollActions

class mipac.actions.poll.PollActions(*, session: HTTPClient, client: ClientManager)

SharedPollActions

class mipac.actions.poll.SharedPollActions(*, session: HTTPClient, client: ClientManager)

AdminInviteActions

class mipac.actions.admins.invite.AdminInviteActions(*, session: HTTPClient, client: ClientManager)

AdminRoleActions

class mipac.actions.admins.roles.AdminRoleActions(role_id: str | None = None, *, session: HTTPClient, client: ClientManager)

AdminRoleModelActions

Methods
class mipac.actions.admins.roles.AdminRoleModelActions(role_id: str | None = None, *, session: HTTPClient, client: ClientManager)
async assign(user_id: str, role_id: str | None = None, expires_at: int | None = None) bool

指定したユーザーに指定したロールを付与します

パラメータ:
  • role_id (str) -- ロールのID

  • user_id (str) -- ロールを付与する対象のユーザーID

  • expires_at (int | None, optional) -- いつまでロールを付与するか, by default None

戻り値:

成功したか否か

戻り値の型:

bool

async unassign(user_id: str, role_id: str | None = None) bool

指定したユーザーに指定したロールを付与します

パラメータ:
  • role_id (str) -- ロールのID

  • user_id (str) -- ロールを付与する対象のユーザーID

  • expires_at (int | None, optional) -- いつまでロールを付与するか, by default None

戻り値:

成功したか否か

戻り値の型:

bool

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)

SharedAdminAdActions

class mipac.actions.admins.ad.SharedAdminAdActions(*, session: HTTPClient, client: ClientManager)

AdminAnnouncementActions

class mipac.actions.admins.announcement.AdminAnnouncementActions(*, session: HTTPClient, client: ClientManager)

ClientAdminAnnouncementActions

Methods
class mipac.actions.admins.announcement.ClientAdminAnnouncementActions(announce_id: str, *, session: HTTPClient, client: ClientManager)
async delete(*, announce_id: str | None = None) 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, *, announce_id: str | None = None) 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

SharedAdminAnnouncementActions

Methods
class mipac.actions.admins.announcement.SharedAdminAnnouncementActions(*, session: HTTPClient, client: ClientManager)
async delete(*, announce_id: str) 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, *, announce_id: str) 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

AdminActions

class mipac.actions.admins.admin.AdminActions(*, session: HTTPClient, client: ClientManager)
async get_meta(detail: bool = False) AdminMeta

Get admin meta Endpoint: /api/admin/meta

パラメータ:

detail (bool, optional) -- flag of detail, by default False

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, forward: bool = False) bool

Resolve abuse user report Endpoint: /api/admin/resolve-abuse-user-report

パラメータ:
  • report_id (str) -- report id

  • forward (bool, optional) -- Whether to forward the report to a remote server

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

AdminDriveActions

Methods
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

Methods
class mipac.actions.admins.accounts.AdminAccountActions(*, session: HTTPClient, client: ClientManager)
async create(username: str, password: str) CreatedUser

ユーザーを作成します

Endpoint: /api/admin/accounts/create

パラメータ:
  • username (str) -- ユーザー名

  • password (str) -- パスワード

戻り値:

作成されたユーザー

戻り値の型:

CreatedUser

async delete(*, user_id: str) bool

対象のユーザーを削除します

Endpoint: /api/admin/accounts/delete

パラメータ:

user_id (str) -- 対象のユーザーID

戻り値:

成功ならTrue

戻り値の型:

bool

AdminUserActions

class mipac.actions.admins.user.AdminUserActions(*, session: HTTPClient, client: ClientManager)

ClientAdminUserActions

Methods
class mipac.actions.admins.user.ClientAdminUserActions(user_id: str, *, session: HTTPClient, client: ClientManager)
async delete_account(*, user_id: str | None = None) 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(*, user_id: str | None = None)

ユーザーの情報を取得します

パラメータ:

user_id (str) -- 対象のユーザーID

async suspend(*, user_id: str | None = None) bool

対象のユーザーを凍結します

パラメータ:

user_id (str) -- 対象のユーザーID

戻り値:

成功ならTrue

戻り値の型:

bool

async unsuspend(*, user_id: str | None = None) bool

ユーザーの凍結を解除します

パラメータ:

user_id (str) -- 対象のユーザーID

戻り値:

成功ならTrue

戻り値の型:

bool

SharedAdminUserActions

Methods
class mipac.actions.admins.user.SharedAdminUserActions(*, session: HTTPClient, client: ClientManager)
delete_account(*, user_id: str) 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(*, user_id: str)

ユーザーの情報を取得します

パラメータ:

user_id (str) -- 対象のユーザーID

async suspend(*, user_id: str) bool

対象のユーザーを凍結します

パラメータ:

user_id (str) -- 対象のユーザーID

戻り値:

成功ならTrue

戻り値の型:

bool

async unsuspend(*, user_id: str) bool

ユーザーの凍結を解除します

パラメータ:

user_id (str) -- 対象のユーザーID

戻り値:

成功ならTrue

戻り値の型:

bool

AdminEmojiActions

Methods
class mipac.actions.admins.emoji.AdminEmojiActions(emoji_id: None | str = None, *, session: HTTPClient, client: ClientManager)
async remove(emoji_id: str | None = None) bool

指定したIdの絵文字を削除します

パラメータ:

emoji_id (str | None, optional) -- 削除する絵文字のId, by default None

戻り値:

成功したかどうか

戻り値の型:

bool

例外:

NotExistRequiredData -- Idが不足している

ClientFileActionsInFolder

Methods
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

戻り値の型:

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

戻り値の型:

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

Methods
class mipac.actions.drive.folders.ClientFolderActions(folder_id: str, *, session: HTTPClient, client: ClientManager)
async create(name: str | None = None, *, parent_id: str | None = None) Folder

Create a new folder

Endpoint: /api/drive/folders/create

パラメータ:
  • name (str, optional) -- The name of the folder, by default None

  • parent_id (str, optional) -- The parent ID of the folder, by default None

戻り値:

The created folder

戻り値の型:

Folder

async delete(*, folder_id: str | None = None) 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, *, folder_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

  • folder_id (str | None) -- The ID of the folder to get, defaults to None

戻り値:

The found folders

戻り値の型:

list[Folder]

async update(name: str | None = MISSING, parent_id: str | None = MISSING, *, folder_id: str | None = None) 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

  • folder_id (str, optional) -- The ID of the folder, by default None

戻り値:

The updated folder

戻り値の型:

Folder

FolderActions

Methods
class mipac.actions.drive.folders.FolderActions(*, session: HTTPClient, client: ClientManager)
async find(name: str, parent_id: str | None = None) list[Folder]

Find folders

Endpoint: /api/drive/folders/find

パラメータ:
  • name (str) -- The name of the folder

  • parent_id (str, optional) -- The parent ID of the folder, by default None

戻り値:

The found folders

戻り値の型:

list[Folder]

async show(folder_id: str) Folder

Show a folder

Endpoint: /api/drive/folders/show

パラメータ:

folder_id (str) -- The ID of the folder

戻り値:

The found folder

戻り値の型:

Folder

SharedFolderActions

Methods
class mipac.actions.drive.folders.SharedFolderActions(*, session: HTTPClient, client: ClientManager)
async create(name: str | None = None, *, parent_id: str | None = None) Folder

Create a new folder

Endpoint: /api/drive/folders/create

パラメータ:
  • name (str, optional) -- The name of the folder, by default None

  • parent_id (str, optional) -- The parent ID of the folder, by default None

戻り値:

The created folder

戻り値の型:

Folder

async delete(*, folder_id: str) 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, *, folder_id: str) 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

  • folder_id (str | None) -- The ID of the folder to get, defaults to None

戻り値:

The found folders

戻り値の型:

list[Folder]

async update(name: str | None = MISSING, parent_id: str | None = MISSING, *, folder_id: str) 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

  • folder_id (str, optional) -- The ID of the folder, by default None

戻り値:

The updated folder

戻り値の型:

Folder

DriveActions

Methods
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

戻り値の型:

DriveStatus

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]

ClientFileActions

Methods
class mipac.actions.drive.files.ClientFileActions(file_ids: str, *, session: HTTPClient, client: ClientManager)
async delete(*, file_id: str | None = None) bool

指定したファイルIDのファイルを削除します

Endpoint: /api/drive/files/delete

パラメータ:

file_id (str | None) -- 対象のファイルID, default=None

戻り値:

削除に成功したかどうか

戻り値の型:

bool

async get_attached_notes(since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, file_id: str | None = None) 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

  • file_id (str | None) -- The id of the file to get notes from, defaults to None

戻り値:

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: str | None = None) 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

  • file_id (str | None) -- 対象のファイルID, default=None

戻り値:

更新後のファイル

戻り値の型:

File

FileActions

Methods
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

戻り値:

アップロードしたファイル

戻り値の型:

File

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

戻り値:

取得したファイル

戻り値の型:

File

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

SharedFileActions

Methods
class mipac.actions.drive.files.SharedFileActions(*, session: HTTPClient, client: ClientManager)
async delete(*, file_id: str) bool

指定したファイルIDのファイルを削除します

Endpoint: /api/drive/files/delete

パラメータ:

file_id (str | None) -- 対象のファイルID, default=None

戻り値:

削除に成功したかどうか

戻り値の型:

bool

async get_attached_notes(since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, file_id: str) 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

  • file_id (str | None) -- The id of the file to get notes from, defaults to None

戻り値:

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: str) 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

  • file_id (str | None) -- 対象のファイルID, default=None

戻り値:

更新後のファイル

戻り値の型:

File

ClientPartialUserListActions

Methods
class mipac.actions.users.list.ClientPartialUserListActions(user_id: str, *, session: HTTPClient, client: ClientManager)

ユーザー向けのリストのアクションを提供します。

async get_list(*, user_id: str | None = None) list[UserList]

Get the user lists of a user

Endpoint /api/users/lists/list

パラメータ:

user_id (str) -- The id of the user to get the lists of

戻り値:

The user lists the user has

戻り値の型:

list[UserList]

async pull(*, list_id: str, user_id: str | None = None) 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

  • user_id (str, optional) -- The id of the user to pull, by default None

戻り値:

True if the user was pulled, False otherwise

戻り値の型:

bool

async push(*, list_id: str, user_id: str | None = None) 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

  • user_id (str, optional) -- The id of the user to push, by default None

戻り値:

True if the user was pushed, False otherwise

戻り値の型:

bool

ClientUserListActions

Methods
class mipac.actions.users.list.ClientUserListActions(list_id: str, *, session: HTTPClient, client: ClientManager)
async delete(*, list_id: str | None = None) bool

Delete a user list

Endpoint /api/users/lists/delete

パラメータ:

list_id (str, optional) -- The id of the user list to delete, by default None

戻り値:

True if the user list was deleted, False otherwise

戻り値の型:

bool

async favorite(*, list_id: str | None = None) bool

Favorite a user list

Endpoint /api/users/lists/favorite

パラメータ:

list_id (str, optional) -- The id of the user list to favorite, by default None

戻り値:

True if the user list was favorited, False otherwise

戻り値の型:

bool

async show(for_public: bool = False, *, list_id: str | None = None) 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

  • list_id (str, optional) -- The id of the user list to show, by default None

戻り値:

The user list

戻り値の型:

UserList

async unfavorite(*, list_id: str | None = None) bool

Unfavorite a user list

Endpoint /api/users/lists/unfavorite

パラメータ:

list_id (str, optional) -- The id of the user list to unfavorite, by default None

戻り値:

True if the user list was unfavorited, False otherwise

戻り値の型:

bool

async update(name: str = MISSING, is_public: bool = MISSING, *, list_id: str | None = None) 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

  • list_id (str, optional) -- The id of the user list to update, by default None

戻り値:

The updated user list

戻り値の型:

UserList

SharedPartialUserListActions

Methods
class mipac.actions.users.list.SharedPartialUserListActions(*, session: HTTPClient, client: ClientManager)
async get_list(*, user_id: str) list[UserList]

Get the user lists of a user

Endpoint /api/users/lists/list

パラメータ:

user_id (str) -- The id of the user to get the lists of

戻り値:

The user lists the user has

戻り値の型:

list[UserList]

async pull(*, list_id: str, user_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

  • user_id (str, optional) -- The id of the user to pull, by default None

戻り値:

True if the user was pulled, False otherwise

戻り値の型:

bool

async push(*, list_id: str, user_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

  • user_id (str, optional) -- The id of the user to push, by default None

戻り値:

True if the user was pushed, False otherwise

戻り値の型:

bool

SharedUserListActions

Methods
class mipac.actions.users.list.SharedUserListActions(*, session: HTTPClient, client: ClientManager)
async delete(*, list_id: str) bool

Delete a user list

Endpoint /api/users/lists/delete

パラメータ:

list_id (str, optional) -- The id of the user list to delete, by default None

戻り値:

True if the user list was deleted, False otherwise

戻り値の型:

bool

async favorite(*, list_id: str) bool

Favorite a user list

Endpoint /api/users/lists/favorite

パラメータ:

list_id (str, optional) -- The id of the user list to favorite, by default None

戻り値:

True if the user list was favorited, False otherwise

戻り値の型:

bool

async show(for_public: bool = False, *, list_id: str) 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

  • list_id (str, optional) -- The id of the user list to show, by default None

戻り値:

The user list

戻り値の型:

UserList

async unfavorite(*, list_id: str | None = None) bool

Unfavorite a user list

Endpoint /api/users/lists/unfavorite

パラメータ:

list_id (str, optional) -- The id of the user list to unfavorite, by default None

戻り値:

True if the user list was unfavorited, False otherwise

戻り値の型:

bool

async update(name: str = MISSING, is_public: bool = MISSING, *, list_id: str) 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

  • list_id (str, optional) -- The id of the user list to update, by default None

戻り値:

The updated user list

戻り値の型:

UserList

UserListActions

Methods
class mipac.actions.users.list.UserListActions(*, session: HTTPClient, client: ClientManager)
async create(name: str) UserList

Create a new user list

Endpoint /api/users/lists/create

パラメータ:

name (str) -- The name of the new user list

戻り値:

The created user list

戻り値の型:

UserList

ClientMuteActions

Methods
class mipac.actions.users.mute.ClientMuteActions(user_id: str, *, session: HTTPClient, client: ClientManager)
async create(expires_at: int | None = None, *, user_id: str | None = None) bool

指定したユーザーをミュートします

パラメータ:
  • user_id (str) -- 対象のユーザーID

  • expires_at (int | None) -- ミュートする期間(秒)、無期限でミュートする場合はNoneを指定します

戻り値:

ミュートに成功したかどうか

戻り値の型:

bool

async delete(*, user_id: str | None = None) bool

指定したユーザーのミュートを解除します

パラメータ:

user_id (str) -- 対象のユーザーID

戻り値:

ミュート解除に成功したかどうか

戻り値の型:

bool

MuteActions

Methods
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]

async get_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None) list[Muting]

ミュートしているユーザーの一覧を取得します

戻り値:

ミュートしているユーザーの一覧

戻り値の型:

list[Muting]

SharedMuteActions

Methods
class mipac.actions.users.mute.SharedMuteActions(*, session: HTTPClient, client: ClientManager)
async create(expires_at: int | None = None, *, user_id: str) bool

指定したユーザーをミュートします

パラメータ:
  • user_id (str | None) -- 対象のユーザーID, default=None

  • expires_at (int | None) -- ミュートする期間(秒)、無期限でミュートする場合はNoneを指定します

戻り値:

ミュートに成功したかどうか

戻り値の型:

bool

async delete(*, user_id: str) bool

指定したユーザーのミュートを解除します

パラメータ:

user_id (str | None) -- 対象のユーザーID, default=None

戻り値:

ミュート解除に成功したかどうか

戻り値の型:

bool

Type class

IChannel

class mipac.types.channel.IChannel

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

IFederationFollowCommon

class mipac.types.follow.IFederationFollowCommon

IFederationFollower

class mipac.types.follow.IFederationFollower

IFederationFollowing

class mipac.types.follow.IFederationFollowing

IFollowRequest

class mipac.types.follow.IFollowRequest

IAdminMeta

class mipac.types.meta.IAdminMeta

IFeatures

class mipac.types.meta.IFeatures

IMeta

class mipac.types.meta.IMeta

IPartialMeta

class mipac.types.meta.IPartialMeta

IPolicies

class mipac.types.meta.IPolicies

IUpdateMetaBody

class mipac.types.meta.IUpdateMetaBody

IInviteCode

class mipac.types.invite.IInviteCode

IInviteLimit

class mipac.types.invite.IInviteLimit

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

IPartialRole

class mipac.types.roles.IPartialRole

IRole

class mipac.types.roles.IRole

IRolePolicies

class mipac.types.roles.IRolePolicies

IRoleUser

class mipac.types.roles.IRoleUser

IUsernameAvailable

class mipac.types.username.IUsernameAvailable

IAnnouncement

class mipac.types.announcement.IAnnouncement

IAnnouncementDetailed

class mipac.types.announcement.IAnnouncementDetailed

管理者から見たアナウンス

NoteReactionPayload

class mipac.types.reaction.NoteReactionPayload

IFederationInstance

class mipac.types.instance.IFederationInstance

IFederationInstanceRequired

class mipac.types.instance.IFederationInstanceRequired

IFederationInstanceStat

class mipac.types.instance.IFederationInstanceStat

IInstanceLite

class mipac.types.instance.IInstanceLite

IAntenna

class mipac.types.antenna.IAntenna

IBlocking

class mipac.types.blocking.IBlocking

IClip

class mipac.types.clip.IClip

IGalleryPost

class mipac.types.gallery.IGalleryPost

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

IHashtag

class mipac.types.hashtag.IHashtag

ITrendHashtag

class mipac.types.hashtag.ITrendHashtag

IDriveStatus

class mipac.types.drive.IDriveStatus

IFile

class mipac.types.drive.IFile

ファイル情報

IFileProperties

class mipac.types.drive.IFileProperties

プロパティー情報

IFolder

class mipac.types.drive.IFolder

フォルダーの情報

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

IUserRole

class mipac.types.user.IUserRole

Deprecated

Will be removed in v0.7.0

IUserSecurityKey

class mipac.types.user.IUserSecurityKey

NotificationRecieveConfig

class mipac.types.user.NotificationRecieveConfig

NotificationRecieveConfigType

class mipac.types.user.NotificationRecieveConfigType

NotificationRecieveConfigWithUserList

class mipac.types.user.NotificationRecieveConfigWithUserList

IAd

class mipac.types.ads.IAd

IPartialAd

class mipac.types.ads.IPartialAd

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

IActiveUsersChart

class mipac.types.chart.IActiveUsersChart

IDriveChart

class mipac.types.chart.IDriveChart

IDriveLocalChart

class mipac.types.chart.IDriveLocalChart

IDriveRemoteChart

class mipac.types.chart.IDriveRemoteChart

IMuting

class mipac.types.mute.IMuting

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

ICreatePoll

class mipac.types.poll.ICreatePoll

IPoll

class mipac.types.poll.IPoll

Questionnaire object

IPollChoice

class mipac.types.poll.IPollChoice

Errors

APIError

class mipac.errors.base.APIError(data: dict | str, status: int)

APIのエラー

NotExistRequiredData

class mipac.errors.base.NotExistRequiredData

クラスの中に必要なデータが不足している

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.

BannerNotAnImageError

class mipac.errors.errors.BannerNotAnImageError(data: dict | str, status: int)

The file specified as a banner 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.

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.

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.

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.

EmptyFileError

class mipac.errors.errors.EmptyFileError(data: dict | str, status: int)

That file is empty.

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.

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.

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.

NoSuchBannerError

class mipac.errors.errors.NoSuchBannerError(data: dict | str, status: int)

No such banner 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.

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.

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.

UnavailableError

class mipac.errors.errors.UnavailableError(data: dict | str, status: int)

Translate of notes unavailable.

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.

__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)

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

Methods
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

json_or_text

async mipac.http.json_or_text(response: ClientResponse)

HTTPClient

Attributes
Methods
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

Attributes
class mipac.http.Route(method: Literal['GET', 'POST'], path: Literal['/api/admin/meta', '/api/admin/abuse-user-reports', '/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/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/announcements', '/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/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/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

AbstractAction

class mipac.abstract.action.AbstractAction(*, session: HTTPClient, client: ClientManager)

AbstractManager

class mipac.abstract.manager.AbstractManager(*, session: HTTPClient, client: ClientManager)

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]

IMiAuthPayload

class mipac.utils.auth.IMiAuthPayload

MiAuthの戻り値

MiAuth

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の戻り値

戻り値の型:

IMiAuthPayload

cache

mipac.utils.cache.cache(group: str = 'default', override: bool = False)

キャッシュを行います

set_cache

mipac.utils.cache.set_cache(group: str, key: str, value: Any) None

キャッシュを設定します

パラメータ:
  • group (str) -- キャッシュのグループ名

  • key (str) -- 一意のキー

  • value (Any) -- 設定する値

Pagination

Attributes
Methods
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

値が存在しないことを示すクラス

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") -- ログのレベル