API Reference#
Misskey Models#
Blocking#
- class mipac.models.blocking.Blocking(*, raw_blocking: IBlocking, client: ClientManager)#
- property api: ClientBlockingManager#
ブロック対象に対するAPIを利用するためのManager
- Returns:
ブロック対象に対するAPIを利用するためのManager
- Return type:
- property blockee: UserDetailedNotMe#
ブロック対象のユーザー情報
- Returns:
ブロック対象のユーザー情報
- Return type:
- property blockee_id: str#
ブロック対象のユーザーID
- Returns:
ブロック対象のユーザーID
- Return type:
str
- property created_at: datetime#
ブロックした日時
- Returns:
ブロックした日時
- Return type:
datetime
- property id: str#
ブロックID
- Returns:
ブロックID
- Return type:
str
InviteCode#
- class mipac.models.invite.InviteCode(raw_invite_code: IInviteCode, *, client: ClientManager)#
InviteLimit#
- class mipac.models.invite.InviteLimit(raw_invite_limit: IInviteLimit, *, client: ClientManager)#
GalleryPost#
- class mipac.models.gallery.GalleryPost(raw_gallery: IGalleryPost, *, client: ClientManager)#
MutedUser#
- class mipac.models.mute.MutedUser(raw_mute_user: IMutedUser, *, client: ClientManager)#
FollowRequest#
- class mipac.models.follow.FollowRequest(follow_request: IFollowRequest, *, client: ClientManager)#
Announcement#
- class mipac.models.announcement.Announcement(announcement: IAnnouncement, *, client: ClientManager)#
AnnouncementDetailed#
- class mipac.models.announcement.AnnouncementDetailed(raw_announcement: IAnnouncementDetailed, *, client: ClientManager)#
- property reads: int#
Returns the number of reads of the announcement.
Header#
- class mipac.models.note.Header(data)#
Note#
- api
- author
- channel
- channel_id
- clipped_count
- content
- created_at
- cw
- deleted_at
- emojis
- file_ids
- files
- id
- is_hidden
- local_only
- mentions
- my_reaction
- poll
- reaction_acceptance
- reaction_and_user_pair_cache
- reactions
- renote
- renote_count
- renote_id
- replies_count
- reply
- reply_id
- tags
- text
- uri
- url
- user
- user_id
- visibility
- visible_user_ids
- class mipac.models.note.Note(raw_note: INote, client: ClientManager)#
Noteモデル
- Parameters:
note (INote) – The raw data of the note
client (ClientManager) –
- property api: ClientNoteManager#
note api
- Returns:
note api
- Return type:
- property author: PartialUser#
note author
Deprecated since version 0.6.0: Use
mipac.models.note.Note.user()
instead.- Returns:
note author
- Return type:
- property channel: NoteChannel | None#
note channel
- Returns:
note channel
- Return type:
NoteChannel | None
- property channel_id: str | None#
note channelId
- Returns:
note channelId
- Return type:
str | None
- property clipped_count: int | None#
note clippedCount
- Returns:
note clippedCount
- Return type:
int | None
- property content: str | None#
note content
Deprecated since version 0.6.0: Use
mipac.models.note.Note.text()
instead.- Returns:
note content
- Return type:
str | None
- property created_at: datetime#
note createdAt
- Returns:
note createdAt
- Return type:
datetime
- property cw: str | None#
note cw
- Returns:
note cw
- Return type:
str | None
- property deleted_at: datetime | None#
note deletedAt
- Returns:
note deletedAt
- Return type:
datetime | None
- property emojis: dict[str, str]#
note emojis
- Returns:
note emojis
- Return type:
dict[str, str]
- property file_ids: list[str]#
note fileIds
- Returns:
note fileIds
- Return type:
list[str]
- property id: str#
note id
- Returns:
note id
- Return type:
str
note isHidden
- Returns:
note isHidden
- Return type:
bool | None
- property local_only: bool#
note localOnly
- Returns:
note localOnly
- Return type:
bool
- property mentions: list[str]#
note mentions
- Returns:
note mentions
- Return type:
list[str]
- property my_reaction: str | None#
note myReaction
- Returns:
note myReaction
- Return type:
str | None
- property reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote']#
note reactionAcceptance
- Returns:
note reactionAcceptance
- Return type:
IReactionAcceptance
- property reaction_and_user_pair_cache: dict[str, list[PartialUser]]#
note reactionAndUserPairCache
- Returns:
note reactionAndUserPairCache
- Return type:
dict[str, list[PartialUser]]
- property reactions: dict[str, int]#
note reactions
- Returns:
note reactions
- Return type:
dict[str, int]
- property renote_count: int#
note renoteCount
- Returns:
note renoteCount
- Return type:
int
- property renote_id: str | None#
note renoteId
- Returns:
note renoteId
- Return type:
str | None
- property replies_count: int#
note repliesCount
- Returns:
note repliesCount
- Return type:
int
- property reply_id: str | None#
note replyId
- Returns:
note replyId
- Return type:
str | None
- property tags: list[str]#
note tags
- Returns:
note tags
- Return type:
list[str] | None
- property text: str | None#
note text
- Returns:
note text
- Return type:
str | None
- property uri: str | None#
note uri
- Returns:
note uri
- Return type:
str
- property url: str | None#
note url
- Returns:
note url
- Return type:
str
- property user: PartialUser#
note author
- Returns:
note user
- Return type:
- property user_id: str#
note userId
- Returns:
note userId
- Return type:
str
- property visibility: Literal['public', 'home', 'followers', 'specified']#
note visibility
- Returns:
note visibility
- Return type:
INoteVisibility
- property visible_user_ids: list[str]#
note visibleUserIds
- Returns:
note visibleUserIds
- Return type:
list[str] | None
NoteChannel#
- class mipac.models.note.NoteChannel(raw_note_channel: INoteChannel, *, client: ClientManager)#
- property allow_renote_to_external: bool#
note channelAllowRenoteToExternal
- Returns:
note channelAllowRenoteToExternal
- Return type:
bool
- property color: str#
note channelColor
- Returns:
note channelColor
- Return type:
str
- property id: str#
note channelId
- Returns:
note channelId
- Return type:
str
- property is_sensitive: bool#
note channelIsSensitive
- Returns:
note channelIsSensitive
- Return type:
bool
- property name: str#
note channelName
- Returns:
note channelName
- Return type:
str
- property user_id: str | None#
note channelUserId
- Returns:
note channelUserId
- Return type:
str | None
NoteDeleted#
- class mipac.models.note.NoteDeleted(data: INoteUpdated[INoteUpdatedDelete])#
NoteReaction#
- class mipac.models.note.NoteReaction(raw_reaction: INoteReaction, *, client: ClientManager)#
- property created_at: datetime | None#
note createdAt
- Returns:
note createdAt
- Return type:
datetime | None
- property id: str | None#
note reactionId
- Returns:
note reactionId
- Return type:
str | None
- property type: str | None#
reaction type
- Returns:
reaction type
- Return type:
str | None
- property user: PartialUser#
note user
- Returns:
note user
- Return type:
NoteState#
- class mipac.models.note.NoteState(data: INoteState)#
NoteTranslateResult#
- class mipac.models.note.NoteTranslateResult(translate_result: INoteTranslateResult)#
- Parameters:
translate_result (INoteTranslateResult) – The raw data of the note translate result
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)#
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)#
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
PartialReaction#
- class mipac.models.reaction.PartialReaction(reaction: INoteUpdated[INoteUpdatedReaction], *, client: ClientManager)#
Channel#
- class mipac.models.channel.Channel(raw_channel: IChannel, *, client: ClientManager)#
- property allow_renote_to_external: bool#
外部へのリノートを許可するかどうか
- Return type:
bool
- property api: ClientChannelManager#
チャンネルに関するAPIを利用するためのクライアント
- Return type:
- property banner_url: str | None#
チャンネルのバナー画像URL
- Return type:
str | None
- property color: str#
チャンネルの色
- Return type:
str
- property created_at: datetime#
チャンネルが作成された日時
- Return type:
datetime
- property description: str | None#
チャンネルの説明
- Return type:
str | None
- property id: str#
チャンネルID
- Return type:
str
- property is_archived: bool#
チャンネルがアーカイブされているかどうか
- Return type:
bool
- property is_favorited: bool | None#
自身がお気に入り登録しているかどうか
- Return type:
bool
- property is_following: bool | None#
自身がフォローしているかどうか
- Return type:
bool
- property is_sensitive: bool#
チャンネルがセンシティブかどうか
- Return type:
bool
- property last_noted_at: datetime | None#
チャンネルに最後にノートが投稿された日時
- Return type:
datetime | None
- property name: str#
チャンネル名
- Return type:
str
- property notes_count: int#
チャンネル内のノート数
- Return type:
int
- property pinned_note_ids: list[str]#
ピン留めされているノートのIDのリスト
- Return type:
list[str]
- property user_id: str | None#
チャンネルを作成したユーザーのID
- Return type:
str | None
- property users_count: int#
チャンネルに参加しているユーザー数
- Return type:
int
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#
UsernameAvailable#
- class mipac.models.username.UsernameAvailable(raw_username_available: IUsernameAvailable)#
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)#
DriveStatus#
- class mipac.models.drive.DriveStatus(raw_drive_status: IDriveStatus, *, client: ClientManager)#
- property capacity: int#
Total capacity of the drive in bytes
- Returns:
Total capacity of the drive in bytes
- Return type:
int
- property usage: int#
Total usage of the drive in bytes
- Returns:
Total usage of the drive in bytes
- Return type:
int
File#
- class mipac.models.drive.File(raw_file: IFile, *, client: ClientManager)#
FileProperties#
- class mipac.models.drive.FileProperties(raw_properties: IFileProperties)#
Folder#
- class mipac.models.drive.Folder(raw_folder: IFolder, client: ClientManager)#
Antenna#
- class mipac.models.antenna.Antenna(antenna: IAntenna, *, client: ClientManager)#
Ad#
- class mipac.models.ad.Ad(ad_data: IAd, *, client: ClientManager)#
FederationInstance#
- class mipac.models.instance.FederationInstance(instance: IFederationInstance, *, 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)#
MeRole#
- class mipac.models.roles.MeRole(data: IMeRole, *, client: ClientManager)#
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)#
packed_user#
- mipac.models.user.packed_user(user: IUser, client: ClientManager) UserDetailedNotMe | MeDetailed #
Achievement#
- class mipac.models.user.Achievement(detail: IAchievement)#
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: IMeDetailedSchema, *, 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)#
AdminMeta#
- class mipac.models.meta.AdminMeta(raw_meta: IAdminMeta, *, client: ClientManager)#
Features#
Meta#
- class mipac.models.meta.Meta(instance_metadata: IMeta, *, client: ClientManager)#
PartialCustomEmoji#
- class mipac.models.lite.emoji.PartialCustomEmoji(emoji: ICustomEmojiLite, *, client: ClientManager)#
PartialRole#
- class mipac.models.lite.role.PartialRole(role_data: T, *, client: ClientManager)#
PartialAd#
- class mipac.models.lite.ad.PartialAd(raw_ad: T, *, client: ClientManager)#
LiteInstance#
- class mipac.models.lite.instance.LiteInstance(instance: IInstanceLite)#
AvatarDecoration#
- class mipac.models.lite.user.AvatarDecoration(raw_avatar_decoration: IAvatarDecoration, *, client: ClientManager)#
- property angle: int | None#
Returns the angle of the avatar decoration.
- Returns:
The angle of the avatar decoration.
- Return type:
int | None
- property flip_h: bool | None#
Returns whether the avatar decoration is flipped horizontally.
- Returns:
Whether the avatar decoration is flipped horizontally.
- Return type:
bool | None
- property id: str#
Returns the id of the avatar decoration.
- Returns:
The id of the avatar decoration.
- Return type:
str
- property offset_x: int | None#
Returns the x offset of the avatar decoration.
- Returns:
The x offset of the avatar decoration.
- Return type:
int | None
- property offset_y: int | None#
Returns the y offset of the avatar decoration.
- Returns:
The y offset of the avatar decoration.
- Return type:
int | None
- property url: str#
Returns the url of the avatar decoration.
- Returns:
The url of the avatar decoration.
- Return type:
str
BadgeRole#
- class mipac.models.lite.user.BadgeRole(data: T, *, client: ClientManager)#
- property display_order: int#
Returns the display order of the badge role.
- Returns:
The display order of the badge role.
- Return type:
int
- property icon_url: str | None#
Returns the icon url of the badge role.
- Returns:
The icon url of the badge role.
- Return type:
str | None
- property name: str#
Returns the name of the badge role.
- Returns:
The name of the badge role.
- Return type:
str
PartialUser#
- defnickname
- class mipac.models.lite.user.PartialUser(raw_user: PU, *, client: ClientManager)#
- property api: ClientUserManager#
Returns the user manager instance.
- Returns:
The user manager instance
- Return type:
- property avatar_blurhash: str | None#
Returns the avatar blurhash of the user.
- Returns:
The avatar blurhash of the user.
- Return type:
str | None
- property avatar_decoration: list[AvatarDecoration]#
Returns the avatar decoration of the user.
- Returns:
The avatar decoration of the user.
- Return type:
list[AvatarDecoration]
- property avatar_url: str | None#
Returns the avatar url of the user.
- Returns:
The avatar url of the user.
- Return type:
str | None
- property badge_roles: list[BadgeRole] | None#
Returns the badge roles of the user.
- Returns:
The badge roles of the user.
- Return type:
list[BadgeRole] | None
- property emojis: dict[str, str]#
Returns the emojis of the user.
- Returns:
The emojis of the user.
- Return type:
dict[str, str]
- property host: str | None#
Returns the host of the user.
- Returns:
The host of the user.
- Return type:
str | None
- property id: str#
Returns the id of the user.
- property instance: LiteInstance | None#
Returns the instance of the user.
- Returns:
The instance of the user.
- Return type:
LiteInstance | None
- property is_bot: bool | None#
Returns whether the user is a bot.
- Returns:
Whether the user is a bot.
- Return type:
bool | None
- property is_cat: bool | None#
Returns whether the user is a cat.
- Returns:
Whether the user is a cat.
- Return type:
bool | None
- property name: str | None#
Returns the nickname of the user.
- Returns:
The nickname of the user.
- Return type:
str | None
- nickname#
Returns the nickname of the user.
Deprecated since version 0.6.0: Use
mipac.models.lite.user.PartialUser.name()
instead.- Returns:
The nickname of the user.
- Return type:
str | None
- property online_status: Literal['online', 'active', 'offline', 'unknown']#
Returns the online status of the user.
- Returns:
The online status of the user.
- Return type:
IUserOnlineStatus
- property username: str#
Returns the username of the user.
- Returns:
The username of the user.
- Return type:
str
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
Managers#
BlockingManager#
- class mipac.manager.blocking.BlockingManager(*, session: HTTPClient, client: ClientManager)#
ClientBlockingManager#
- class mipac.manager.blocking.ClientBlockingManager(user_id: str, *, session: HTTPClient, client: ClientManager)#
ClientInviteManager#
- class mipac.manager.invite.ClientInviteManager(invite_id: str, *, session: HTTPClient, client: ClientManager)#
InviteManager#
- class mipac.manager.invite.InviteManager(*, session: HTTPClient, client: ClientManager)#
FollowManager#
- class mipac.manager.follow.FollowManager(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
FollowRequestManager#
- class mipac.manager.follow.FollowRequestManager(user_id: str | None = None, *, 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
EmojiManager#
- class mipac.manager.emoji.EmojiManager(*, 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)#
FederationManager#
- class mipac.manager.federation.FederationManager(*, session: HTTPClient, client: ClientManager)#
ClientReactionManager#
- class mipac.manager.reaction.ClientReactionManager(note_id: str, *, session: HTTPClient, client: ClientManager)#
- property action: ClientReactionActions#
リアクションに関するアクション
- Returns:
Reactionに対するアクションを行うクラス
- Return type:
ReactionManager#
- class mipac.manager.reaction.ReactionManager(note_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
- property action: ReactionActions#
リアクションに関するアクション
- Returns:
Reactionに対するアクションを行うクラス
- Return type:
ChannelManager#
- class mipac.manager.channel.ChannelManager(*, session: HTTPClient, client: ClientManager)#
ClientChannelManager#
- class mipac.manager.channel.ClientChannelManager(channel_id: str, *, session: HTTPClient, client: ClientManager)#
RoleManager#
- class mipac.manager.role.RoleManager(*, session: HTTPClient, client: ClientManager)#
UsernameManager#
- class mipac.manager.username.UsernameManager(*, session: HTTPClient, client: ClientManager)#
ChartManager#
- class mipac.manager.chart.ChartManager(*, session: HTTPClient, client: ClientManager)#
AntennaManager#
- class mipac.manager.antenna.AntennaManager(*, session: HTTPClient, client: ClientManager)#
ClientAntennaManager#
- class mipac.manager.antenna.ClientAntennaManager(*, antenna_id: str, session: HTTPClient, client: ClientManager)#
PagesManager#
- class mipac.manager.page.PagesManager(*, 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)#
MyManager#
- class mipac.manager.my.MyManager(*, session: HTTPClient, client: ClientManager)#
ClientFavoriteManager#
- class mipac.manager.favorite.ClientFavoriteManager(note_id: str, *, session: HTTPClient, client: ClientManager)#
- property action: ClientFavoriteActions#
お気に入りに関するアクション
- Returns:
お気に入りに対するアクションを行うクラス
- Return type:
FavoriteManager#
- class mipac.manager.favorite.FavoriteManager(note_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
- property action: FavoriteActions#
お気に入りに関するアクション
- Returns:
お気に入りに対するアクションを行うクラス
- Return type:
ClientUserManager#
- class mipac.manager.user.ClientUserManager(user: PartialUser, *, session: HTTPClient, client: ClientManager)#
UserManager#
- class mipac.manager.user.UserManager(*, session: HTTPClient, client: ClientManager)#
ClientManager#
- class mipac.manager.client.ClientManager(session: HTTPClient, config: Config)#
ClientMuteManager#
- class mipac.manager.users.mute.ClientMuteManager(user_id: str, *, session: HTTPClient, client: ClientManager)#
MuteManager#
- class mipac.manager.users.mute.MuteManager(*, session: HTTPClient, client: ClientManager)#
ClientPartialUserListManager#
- class mipac.manager.users.list.ClientPartialUserListManager(user_id: str, *, session: HTTPClient, client: ClientManager)#
ClientUserListManager#
- class mipac.manager.users.list.ClientUserListManager(list_id: str, *, session: HTTPClient, client: ClientManager)#
UserListManager#
- class mipac.manager.users.list.UserListManager(*, session: HTTPClient, client: ClientManager)#
AdminInviteManager#
- class mipac.manager.admins.invite.AdminInviteManager(*, 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)#
AdminEmojiManager#
- class mipac.manager.admins.emoji.AdminEmojiManager(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)#
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)#
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)#
AdminUserManager#
- class mipac.manager.admins.user.AdminUserManager(user_id: str | None = None, *, 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)#
Actions#
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以外は行わない
ClientInviteActions#
- asyncdelete
- class mipac.actions.invite.ClientInviteActions(invite_id: str, *, session: HTTPClient, client: ClientManager)#
- async delete(*, invite_id: str | None = None) bool #
Delete an invite code.
- Parameters:
invite_id (str | None, optional) – The invite code to delete, by default None
- Returns:
Whether the invite code was deleted.
- Return type:
bool
InviteActions#
- asynccreate
- defget_all_list
- asyncget_limit
- asyncget_list
- class mipac.actions.invite.InviteActions(*, session: HTTPClient, client: ClientManager)#
- async create() InviteCode #
Create a new invite code.
Endpoint: /api/invite/create
- Returns:
The invite code created.
- Return type:
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
- Parameters:
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
- Returns:
The list of invite codes.
- Return type:
list[PartialInviteCode]
- async get_limit() InviteLimit #
Get the number of invite codes you can create.
Endpoint: /api/invite/limit
- Returns:
The number of invite codes you can create.
- Return type:
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
- Parameters:
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
- Returns:
The list of invite codes.
- Return type:
list[PartialInviteCode]
FollowActions#
- asyncadd
- asyncinvalidate
- asyncremove
- class mipac.actions.follow.FollowActions(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
- async add(user_id: str | None = None) PartialUser #
Follow a user
- Returns:
The user that you followed
- Return type:
UserLite
- async invalidate(user_id: str | None = None) PartialUser #
Make the user unfollows you
- Returns:
The user that followed you
- Return type:
- async remove(user_id: str | None = None) PartialUser #
Unfollow a user
- Returns:
The user that you unfollowed
- Return type:
FollowRequestActions#
- class mipac.actions.follow.FollowRequestActions(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
- async accept(user_id: str | None = None) bool #
Accept a follow request
- Parameters:
user_id (str) – The user ID to accept
- Returns:
Whether the request was accepted
- Return type:
bool
- async cancel(user_id: str | None = None) PartialUser #
Cancel a follow request
- Parameters:
user_id (str) – The user ID to cancel
- Returns:
The user that you canceled to follow
- Return type:
- async get_all() list[FollowRequest] #
Get all follow requests
- Returns:
List of follow requests
- Return type:
list[FollowRequest]
- async reject(user_id: str | None = None) bool #
Reject a follow request
- Parameters:
user_id (str) – The user ID to reject
- Returns:
Whether the request was rejected
- Return type:
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#
- asyncadd_clips
- asynccreate_quote
- asynccreate_renote
- asyncdelete
- asyncfetch_children
- asyncfetch_state
- defget_all_children
- defget_all_replies
- asyncget_clips
- asyncget_conversation
- asyncget_renotes
- asyncget_replies
- asyncget_state
- asyncrenote
- asynctranslate
- asyncun_renote
- class mipac.actions.note.ClientNoteActions(note_id: str, *, session: HTTPClient, client: ClientManager)#
- async add_clips(clip_id: str, *, note_id: str | None = None) bool #
Add a note to the clip
Endpoint: /api/clips/add-note
- Parameters:
note_id (str | None, default=None) – note id
clip_id (str) – clip id
- Returns:
success or not
- Return type:
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
- Parameters:
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
- Parameters:
note_id (str | None, default=None) – note id
- Returns:
Renoted note
- Return type:
- async delete(*, note_id: str | None = None) bool #
Delete a note
Endpoint: /api/notes/delete
- Parameters:
note_id (str | None, default=None) – note id
- Returns:
success or not
- Return type:
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()
methodEndpoint: /api/notes/children
- Parameters:
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
- Returns:
Children of the note
- Return type:
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()
methodEndpoint: /api/notes/state
- Parameters:
note_id (str | None, default=None) – note id
- Returns:
Note state
- Return type:
- async get_all_children(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
- Parameters:
since_id (str | None, default=None) – Since ID
untilId (str | None, default=None) – Until ID
note_id (str | None, default=None) – note id
- Returns:
Children of the note
- Return type:
AsyncGenerator[Note, None]
- async get_all_replies(since_id: str | None = None, until_id: str | None = None, *, note_id: str | None = None) AsyncGenerator[Note, None] #
Get replies to the note
Endpoint: /api/notes/replies
- Parameters:
since_id (str | None, default=None) – since id
until_id (str | None, default=None) – until id
note_id (str | None, default=None) – note id
- Returns:
replies
- Return type:
AsyncGenerator[Note, None]
- async get_clips(*, note_id: str | None = None) list[Clip] #
Get the clips of the note
Endpoint: /api/notes/clips
- Parameters:
note_id (str | None, default=None) – note id
- Returns:
Clips of the note
- Return type:
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
- Parameters:
limit (int, default=10) – limit
offset (int, default=0) – offset
note_id (str | None, default=None) – note id
- Returns:
Notes of the conversation
- Return type:
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
- Parameters:
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
- Returns:
Renotes of the note
- Return type:
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
- Parameters:
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
- Returns:
replies
- Return type:
list[Note]
- async get_state(*, note_id: str | None = None) NoteState #
Get the state of the note
Endpoint: /api/notes/state
- Parameters:
note_id (str | None, default=None) – note id
- Returns:
Note state
- Return type:
- 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
- Parameters:
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
- Parameters:
note_id (str | None, default=None) – Note ID to target for translation
target_lang (str, default='en') – Target language
- Returns:
Translated result
- Return type:
- async un_renote(*, note_id: str | None = None) bool #
Releases the note renote for the specified Id
- Parameters:
note_id (str | None, optional) – Target note Id., by default None
- Returns:
Whether the release was successful
- Return type:
bool
NoteActions#
- asyncfetch
- asyncget
- asyncget_featured
- asyncget_global_time_line
- asyncget_mentions
- asyncget_time_line
- defsend
- class mipac.actions.note.NoteActions(*, session: HTTPClient, client: ClientManager)#
- async fetch(note_id: str) Note #
Get a note.
update the cache of the
mipac.actions.note.NoteActions.get()
methodEndpoint: /api/notes/show
- Parameters:
note_id (str) – note id
- Returns:
note
- Return type:
- async get(note_id: str) Note #
Get a note
Endpoint: /api/notes/show
- Parameters:
note_id (str) – ノートのID
- Returns:
取得したノートID
- Return type:
- async get_featured(limit: int = 10, until_id: str | None = None, channel_id: str | None = None)#
Get featured notes
Endpoint: /api/notes/featured
- Parameters:
limit (int, default=10) – limit
until_id (str | None, default=None) – Until ID
channel_id (str | None, default=None) – channel id
- Returns:
featured notes
- Return type:
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
- Parameters:
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
- Returns:
global timeline
- Return type:
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
- Parameters:
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
- Parameters:
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
- Returns:
Notes
- Return type:
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
- Parameters:
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
- Returns:
投稿したノート
- Return type:
- Raises:
ContentRequired – [description]
EmojiActions#
- class mipac.actions.emoji.EmojiActions(*, session: HTTPClient, client: ClientManager)#
ClientClipActions#
- asyncadd_note
- asyncdelete
- defget_notes
- asyncremove_note
- asyncupdate
- 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
- Parameters:
clip_id (str | None, optional, by default None) – The clip id
note_id (str) – The note id
- Returns:
True if the note was added to the clip, False otherwise
- Return type:
bool
- async delete(*, clip_id: str | None = None) bool #
Delete a clip
- Parameters:
clip_id (str | None, optional, by default None) – The clip id
- Returns:
True if the clip was deleted, False otherwise
- Return type:
bool
- async get_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, get_all: bool = False, *, clip_id: str | None = None) AsyncGenerator[Note, None] #
Get notes from a clip :param clip_id: The clip id :type clip_id: str | None, optional, by default None :param limit: The number of notes to get :type limit: int, optional, by default 10 :param since_id: The note id to get notes after :type since_id: str | None, optional, by default None :param until_id: The note id to get notes before :type until_id: str | None, optional, by default None :param get_all: Whether to get all notes :type get_all: bool, optional, by default False
- Yields:
AsyncGenerator[Note, None] – The notes
- async remove_note(note_id: str, *, clip_id: str | None) bool #
Remove a note from a clip
- Parameters:
clip_id (str | None, optional, by default None) – The clip id
note_id (str) – The note id
- Returns:
True if the note was removed from the clip, False otherwise
- Return type:
bool
- async update(name: str, is_public: bool | None = None, description: str | None = None, *, clip_id: str | None = None) Clip #
Update a clip
- Parameters:
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
- Returns:
True if the clip was updated, False otherwise
- Return type:
bool
ClipActions#
- asynccreate
- asyncget
- asyncget_list
- asyncget_my_favorites
- class mipac.actions.clip.ClipActions(*, session: HTTPClient, client: ClientManager)#
- async create(name: str, is_public: bool = False, description: str | None = None) Clip #
Create a clip
- Parameters:
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
- Returns:
The created clip
- Return type:
FederationActions#
- class mipac.actions.federation.FederationActions(*, session: HTTPClient, client: ClientManager)#
ClientReactionActions#
- 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
- Parameters:
reaction (str) – reaction
note_id (str, optional) – note id, by default None
- Returns:
success or not
- Return type:
bool
- async remove(*, note_id: str | None = None) bool #
Remove reaction from note
Endpoint: /api/notes/reactions/delete
- Parameters:
note_id (str, optional) – note id, by default None
- Returns:
success or not
- Return type:
bool
ReactionActions#
- class mipac.actions.reaction.ReactionActions(*, session: HTTPClient, client: ClientManager)#
ChannelActions#
- asynccreate
- asyncfeatured
- defget_all_followed
- defget_all_owned
- asyncmy_favorites
- asyncowned
- asyncsearch
- asyncshow
- class mipac.actions.channel.ChannelActions(*, session: HTTPClient, client: ClientManager)#
- async create(name: str, color: str = MISSING, description: str = MISSING, banner_id: str = MISSING, is_sensitive: bool = MISSING, allow_renote_to_external: bool = MISSING) Channel #
チャンネルを作成します
Endpoint: /api/channels/create
- Parameters:
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
- Returns:
作成したチャンネル
- Return type:
- async featured() list[Channel] #
トレンドのチャンネルを取得します
Endpoint: /api/channels/featured
- Returns:
取得したチャンネルのリスト
- Return type:
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
- Parameters:
since_id (str | None) – 指定したチャンネルIDよりも後のチャンネルを取得します, default=None
until_id (str | None) – 指定したチャンネルIDよりも前のチャンネルを取得します, default=None
limit (int, optional) – 一度に取得するチャンネルの数, default=5
- Returns:
取得したフォロー中のチャンネル
- Return type:
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
- Parameters:
since_id (str, optional) – 指定したチャンネルIDよりも後のチャンネルを取得します, default=None
until_id (str, optional) – 指定したチャンネルIDよりも前のチャンネルを取得します, default=None
limit (int, optional) – 一度に取得するチャンネルの数, default=5
- Returns:
取得した自分が所有しているチャンネル
- Return type:
AsyncGenerator[Channel, None]
- async my_favorites() list[Channel] #
自分がお気に入りにしているチャンネルを取得します
Endpoint: /api/channels/myFavorites
- Returns:
取得したチャンネルのリスト
- Return type:
list[Channel]
- async owned(since_id: str | None = None, until_id: str | None = None, limit: int = 5) list[Channel] #
自分が所有しているチャンネル一覧を取得します
Endpoint: /api/channels/owned
- Parameters:
since_id (str, optional) – 指定したチャンネルIDよりも後のチャンネルを取得します, default=None
until_id (str, optional) – 指定したチャンネルIDよりも前のチャンネルを取得します, default=None
limit (int, optional) – 一度に取得するチャンネルの数, default=5
- Returns:
取得した自分が所有しているチャンネルのリスト
- Return type:
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
- Parameters:
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
- Returns:
見つかったチャンネルのリスト
- Return type:
list[Channel]
ClientChannelActions#
- asyncfavorite
- asyncfollow
- defget_all_timeline
- asyncsend
- asynctimeline
- asyncunfavorite
- asyncunfollow
- asyncupdate
- class mipac.actions.channel.ClientChannelActions(channel_id: str, *, session: HTTPClient, client: ClientManager)#
- async favorite(*, channel_id: str) bool #
指定したIDのチャンネルをお気に入りにします
Endpoint: /api/channels/favorite
- Parameters:
channel_id (str | None) – 対象のチャンネルID, default=None
- Returns:
お気に入りに追加できたかどうか
- Return type:
bool
- async follow(*, channel_id: str) bool #
Follow a channel
Endpoint: /api/channels/follow
- Parameters:
channel_id (str, optional) – ID of the channel, by default None
- Returns:
Whether the channel is followed
- Return type:
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
- Parameters:
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
- Returns:
取得したノートのリスト
- Return type:
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
- Parameters:
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
- Returns:
Created note
- Return type:
- 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
- Parameters:
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
- Returns:
取得したノートのリスト
- Return type:
list[Note]
- async unfavorite(*, channel_id: str) bool #
指定したIDのチャンネルをお気に入りから外します
Endpoint: /api/channels/unfavorite
- Parameters:
channel_id (str | None) – 対象のチャンネルID, default=None
- Returns:
お気に入りから外せたかどうか
- Return type:
bool
- async unfollow(*, channel_id: str) bool #
指定したIDのチャンネルのフォローを解除します
Endpoint: /api/channels/unfollow
- Parameters:
channel_id (str | None) – 対象のチャンネルID, default=None
- Returns:
フォロー解除に成功したかどうか
- Return type:
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
- Parameters:
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
- Returns:
更新後のチャンネル
- Return type:
RoleActions#
- class mipac.actions.role.RoleActions(*, session: HTTPClient, client: ClientManager)#
- async get(role_id: str) Role #
Get a role from the API. Endpoint: /api/roles/show
- Parameters:
role_id (str) – The ID of the role to get.
- Returns:
The role data.
- Return type:
- async get_list() list[Role] #
Get a list of roles from the API. Endpoint: /api/roles/list
- Returns:
The role data.
- Return type:
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
- Parameters:
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
- Yields:
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[MeRole | RoleUser, None] #
Get users in a role. Endpoint: /api/roles/users
- Parameters:
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
- Yields:
AsyncGenerator[MeRole | RoleUser, None] – The role user data.
UsernameActions#
- class mipac.actions.username.UsernameActions(*, session: HTTPClient, client: ClientManager)#
ChartActions#
- class mipac.actions.chart.ChartActions(session: HTTPClient, client: ClientManager)#
AntennaActions#
- asynccreate
- class mipac.actions.antenna.AntennaActions(*, session: HTTPClient, client: ClientManager)#
- async create(name: str, src: Literal['home', 'all', 'users', 'list'], 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.
- Parameters:
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.
- Returns:
The created antenna.
- Return type:
ClientAntennaActions#
- class mipac.actions.antenna.ClientAntennaActions(*, antenna_id: str, session: HTTPClient, client: ClientManager)#
- async delete(*, antenna_id: str | None = None) bool #
Delete antenna from identifier
- Parameters:
antenna_id (str | None, optional) – target identifier
- Raises:
ParameterError – antenna id is required
- Returns:
success or failure
- Return type:
bool
- async show(*, antenna_id: str | None = None) Antenna #
Show antenna from identifier
- Parameters:
antenna_id (str | None, optional) – target identifier, by default None
- Returns:
antenna object
- Return type:
- Raises:
ParameterError – antenna id is required
- async update(name: str, src: Literal['home', 'all', 'users', 'list'], 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.
- Parameters:
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.
- Returns:
The created antenna.
- Return type:
ClientPollActions#
- class mipac.actions.poll.ClientPollActions(note_id: str, *, session: HTTPClient, client: ClientManager)#
PollActions#
- class mipac.actions.poll.PollActions(*, session: HTTPClient, client: ClientManager)#
MyActions#
- class mipac.actions.my.MyActions(session: HTTPClient, client: ClientManager)#
- async get_claim_achievement(name: Literal['notes1', 'notes10', 'notes100', 'notes500', 'notes1000', 'notes5000', 'notes10000', 'notes20000', 'notes30000', 'notes40000', 'notes50000', 'notes60000', 'notes70000', 'notes80000', 'notes90000', 'notes100000', 'login3', 'login7', 'login15', 'login30', 'login60', 'login100', 'login200', 'login300', 'login400', 'login500', 'login600', 'login700', 'login800', 'login900', 'login1000', 'passedSinceAccountCreated1', 'passedSinceAccountCreated2', 'passedSinceAccountCreated3', 'loggedInOnBirthday', 'loggedInOnNewYearsDay', 'noteClipped1', 'noteFavorited1', 'myNoteFavorited1', 'profileFilled', 'markedAsCat', 'following1', 'following10', 'following50', 'following100', 'following300', 'followers1', 'followers10', 'followers50', 'followers100', 'followers300', 'followers500', 'followers1000', 'collectAchievements30', 'viewAchievements3min', 'iLoveMisskey', 'foundTreasure', 'client30min', 'client60min', 'noteDeletedWithin1min', 'postedAtLateNight', 'postedAt0min0sec', 'selfQuote', 'htl20npm', 'viewInstanceChart', 'outputHelloWorldOnScratchpad', 'open3windows', 'driveFolderCircularReference', 'reactWithoutRead', 'clickedClickHere', 'justPlainLucky', 'setNameToSyuilo', 'cookieClicked', 'brainDiver']) bool #
指定した名前の実績を解除します
- Parameters:
name (実績名) – 解除したい実績の名前
- Returns:
成功したか否か
- Return type:
bool
- Raises:
NotSupportVersion – 実績機能が存在しないサーバーを使用している
ClientFavoriteActions#
- class mipac.actions.favorite.ClientFavoriteActions(note_id: str, *, session: HTTPClient, client: ClientManager)#
FavoriteActions#
- class mipac.actions.favorite.FavoriteActions(*, session: HTTPClient, client: ClientManager)#
ClientUserActions#
- asyncget_achievements
- defget_all_featured_notes
- asyncget_featured_notes
- asyncget_followers
- asyncget_following
- asyncget_frequently_replied_users
- asyncget_gallery_posts
- class mipac.actions.user.ClientUserActions(user: PartialUser, *, session: HTTPClient, client: ClientManager)#
- async get_achievements(*, user_id: str | None = None) list[Achievement] #
Get achievements of user.
- async get_all_featured_notes(limit: int = 10, until_id: str | None = None, *, user_id: str | None = None) AsyncGenerator[Note, None] #
Get all featured notes of user.
Endpoint: /api/users/featured-notes
- Parameters:
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.
- Returns:
A list of featured notes.
- Return type:
list[Note]
- async get_featured_notes(limit: int = 10, until_id: str | None = None, *, user_id: str | None = None) list[Note] #
Get featured notes of user.
Endpoint: /api/users/featured-notes
- Parameters:
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.
- Returns:
A list of featured notes.
- Return type:
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
- Parameters:
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.
- Returns:
A list of followers.
- Return type:
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
- Parameters:
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.
- Returns:
A list of following.
- Return type:
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
- Parameters:
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.
- Returns:
A list of frequently replied users.
- Return type:
list[FrequentlyRepliedUser]
- async get_gallery_posts(limit: int = 10, since_id: str | None = None, until_id: str | None = None, *, user_id: str | None = None) list[GalleryPost] #
Get gallery posts of user.
Endpoint: /api/users/gallery/posts
- Parameters:
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.
- Returns:
A list of gallery posts.
- Return type:
list[GalleryPost]
UserActions#
- asyncfetch
- asyncget
- asyncget_me
- defget_mention
- defsearch
- asyncsearch_by_username_and_host
- class mipac.actions.user.UserActions(session: HTTPClient, client: ClientManager)#
- async fetch(user_id: str | None = None, user_ids: list[str] | None = None, username: str | None = None, host: str | None = None) UserDetailedNotMe | MeDetailed #
Retrieve the latest user information using the target user ID or username. If you do not need the latest information, you should basically use the get method. This method accesses the server each time, which may increase the number of server accesses.
- Parameters:
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.
- Parameters:
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 #
Get mention name of user.
- Parameters:
user (Optional[User], default=None) – The object of the user whose mentions you want to retrieve
- Returns:
メンション
- Return type:
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.
- Parameters:
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.
- Parameters:
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.
- Returns:
A list of users.
- Return type:
list[UserDetailedNotMe | MeDetailed | PartialUser]
ClientActions#
- class mipac.actions.client.ClientActions(*, session: HTTPClient, client: ClientManager)#
ClientMuteActions#
- 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 #
指定したユーザーをミュートします
- Parameters:
user_id (str) – 対象のユーザーID
expires_at (int | None) – ミュートする期間(秒)、無期限でミュートする場合はNoneを指定します
- Returns:
ミュートに成功したかどうか
- Return type:
bool
- async delete(*, user_id: str | None = None) bool #
指定したユーザーのミュートを解除します
- Parameters:
user_id (str) – 対象のユーザーID
- Returns:
ミュート解除に成功したかどうか
- Return type:
bool
MuteActions#
- defget_all_list
- asyncget_list
- class mipac.actions.users.mute.MuteActions(*, session: HTTPClient, client: ClientManager)#
- async get_all_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None)#
ミュートしている全てのユーザーを取得します
- Parameters:
limit (int) – 取得するユーザー数, by default 30
since_id (str | None) – 指定したIDより後のミュート中のユーザーを取得します, default=None
until_id (str | None) – 指定したIDより前のミュート中のユーザーを取得します, default=None
- Returns:
ミュートしているユーザー
- Return type:
AsyncGenerator[MutedUser]
ClientPartialUserListActions#
- 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
- Parameters:
user_id (str) – The id of the user to get the lists of
- Returns:
The user lists the user has
- Return type:
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
- Parameters:
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
- Returns:
True if the user was pulled, False otherwise
- Return type:
bool
- async push(*, list_id: str, user_id: str | None = None) bool #
Push a user to a user list
Endpoint /api/users/lists/push
- Parameters:
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
- Returns:
True if the user was pushed, False otherwise
- Return type:
bool
ClientUserListActions#
- asyncdelete
- asyncfavorite
- asyncshow
- asyncunfavorite
- asyncupdate
- 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
- Parameters:
list_id (str, optional) – The id of the user list to delete, by default None
- Returns:
True if the user list was deleted, False otherwise
- Return type:
bool
- async favorite(*, list_id: str | None = None) bool #
Favorite a user list
Endpoint /api/users/lists/favorite
- Parameters:
list_id (str, optional) – The id of the user list to favorite, by default None
- Returns:
True if the user list was favorited, False otherwise
- Return type:
bool
- async show(for_public: bool = False, *, list_id: str | None = None) UserList #
Show a user list
Endpoint /api/users/lists/show
- Parameters:
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
- Returns:
The user list
- Return type:
- async unfavorite(*, list_id: str | None = None) bool #
Unfavorite a user list
Endpoint /api/users/lists/unfavorite
- Parameters:
list_id (str, optional) – The id of the user list to unfavorite, by default None
- Returns:
True if the user list was unfavorited, False otherwise
- Return type:
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
- Parameters:
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
- Returns:
The updated user list
- Return type:
UserListActions#
- asynccreate
- class mipac.actions.users.list.UserListActions(*, session: HTTPClient, client: ClientManager)#
AdminInviteActions#
- class mipac.actions.admins.invite.AdminInviteActions(*, session: HTTPClient, client: ClientManager)#
AdminAnnouncementActions#
- class mipac.actions.admins.announcement.AdminAnnouncementActions(*, session: HTTPClient, client: ClientManager)#
ClientAdminAnnouncementActions#
- class mipac.actions.admins.announcement.ClientAdminAnnouncementActions(announce_id: str, *, session: HTTPClient, client: ClientManager)#
AdminEmojiActions#
- asyncremove
- class mipac.actions.admins.emoji.AdminEmojiActions(emoji_id: None | str = None, *, session: HTTPClient, client: ClientManager)#
- async remove(emoji_id: str | None = None) bool #
指定したIdの絵文字を削除します
- Parameters:
emoji_id (str | None, optional) – 削除する絵文字のId, by default None
- Returns:
成功したかどうか
- Return type:
bool
- Raises:
NotExistRequiredData – Idが不足している
AdminActions#
- asyncget_meta
- asyncreset_password
- asyncresolve_abuse_user_report
- asyncsend_email
- asyncsuspend_user
- asyncunsuspend_user
- asyncupdate_user_note
- class mipac.actions.admins.admin.AdminActions(*, session: HTTPClient, client: ClientManager)#
- async get_meta(detail: bool = False) AdminMeta #
Get admin meta Endpoint: /api/admin/meta
- Parameters:
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
- Parameters:
user_id (str) – target user’s id
- Returns:
new password
- Return type:
str
- async resolve_abuse_user_report(report_id: str, forward: bool = False) bool #
Resolve abuse user report Endpoint: /api/admin/resolve-abuse-user-report
- Parameters:
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
- Parameters:
to (str) – email address to send
subject (str) – email subject
text (str) – email body
- async suspend_user(user_id: str) bool #
Suspends the user for the specified Id Endpoint: /api/admin/suspend-user
- Parameters:
user_id (str) – Id of user to suspend
- Returns:
success or failed
- Return type:
bool
- async unsuspend_user(user_id: str) bool #
Unsuspend user with specified Id Endpoint: /api/admin/unsuspend-user
- Parameters:
user_id (str) – Id of user to unsuspend
- Returns:
success or failed
- Return type:
bool
- async update_user_note(user_id: str, text: str) bool #
Update user note Endpoint: /api/admin/update-user-note
- Parameters:
user_id (str) – target user’s id
text (str) – new note
AdminDriveActions#
- asyncclean_remote_files
- asynccleanup
- asyncget_files
- asyncshow_file
- class mipac.actions.admins.drive.AdminDriveActions(*, session: HTTPClient, client: ClientManager)#
- async clean_remote_files() bool #
Clean remote files
Endpoint: /api/admin/drive/clean-remote-files
- Returns:
Whether the remote files were cleaned
- Return type:
bool
- async cleanup() bool #
Clean up the drive
Endpoint: /api/admin/drive/cleanup
- Returns:
Whether the drive was cleaned up
- Return type:
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
- Parameters:
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
- Returns:
A list of files
- Return type:
list[File]
- async show_file(file_id: str, url: str | None = None)#
Show a file
Endpoint: /api/admin/drive/files/show
- Parameters:
file_id (str) – The id of the file to show
url (str) – The url of the file to show
- Returns:
The file
- Return type:
dict[str, Any]
AdminAdActions#
- class mipac.actions.admins.ad.AdminAdActions(*, session: HTTPClient, client: ClientManager)#
ClientAdminAdActions#
- class mipac.actions.admins.ad.ClientAdminAdActions(ad_id: str, *, session: HTTPClient, client: ClientManager)#
AdminRoleActions#
- class mipac.actions.admins.roles.AdminRoleActions(role_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
AdminRoleModelActions#
- 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 #
指定したユーザーに指定したロールを付与します
- Parameters:
role_id (str) – ロールのID
user_id (str) – ロールを付与する対象のユーザーID
expires_at (int | None, optional) – いつまでロールを付与するか, by default None
- Returns:
成功したか否か
- Return type:
bool
- async unassign(user_id: str, role_id: str | None = None) bool #
指定したユーザーに指定したロールを付与します
- Parameters:
role_id (str) – ロールのID
user_id (str) – ロールを付与する対象のユーザーID
expires_at (int | None, optional) – いつまでロールを付与するか, by default None
- Returns:
成功したか否か
- Return type:
bool
AdminUserActions#
- asyncdelete_account
- asyncshow_user
- asyncsuspend
- asyncunsuspend
- class mipac.actions.admins.user.AdminUserActions(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)#
- async delete_account(user_id: str | None = None) bool #
Deletes the user with the specified user ID.
- Parameters:
user_id (str | None, default=None) – ID of the user to be deleted
- Returns:
Success or failure
- Return type:
bool
- async show_user(user_id: str | None = None) UserDetailedNotMe | MeDetailed #
Shows the user with the specified user ID.
- Parameters:
user_id (str | None, default=None) – ID of the user to be shown
- Return type:
- async suspend(user_id: str | None = None) bool #
Suspends the user with the specified user ID.
- Parameters:
user_id (str | None, default=None) – ID of the user to be suspended
- Returns:
Success or failure
- Return type:
bool
- async unsuspend(user_id: str | None = None) bool #
Unsuspends the user with the specified user ID.
- Parameters:
user_id (str | None, default=None) – ID of the user to be unsuspended
- Returns:
Success or failure
- Return type:
bool
ClientFileActionsInFolder#
- asynccreate
- asyncfind
- asyncupdate
- asyncupload_from_url
- class mipac.actions.drive.folders.ClientFileActionsInFolder(folder_id: str, *, session: HTTPClient, client: ClientManager)#
File actions in a folder
- async create(file: str, name: str | None = None, comment: str | None = None, is_sensitive: bool = False, force: bool = False) File #
Upload a file to the drive
Endpoint: /api/drive/files/create
- Parameters:
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
- Returns:
The uploaded file
- Return type:
- async find(name: str) list[File] #
Find a file by its name
Endpoint: /api/drive/files/find
- Parameters:
name (str) – The name of the file to find
- Returns:
The found files
- Return type:
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
- Parameters:
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
- Returns:
The updated file
- Return type:
- 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
- Parameters:
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
- Returns:
Whether the file was uploaded or not
- Return type:
bool
ClientFolderActions#
- 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
- Parameters:
name (str, optional) – The name of the folder, by default None
parent_id (str, optional) – The parent ID of the folder, by default None
- Returns:
The created folder
- Return type:
- async delete(*, folder_id: str | None = None) bool #
Delete a folder
Endpoint: /api/drive/folders/delete
- Parameters:
folder_id (str, optional) – The ID of the folder, by default None
- Returns:
Whether the folder was deleted or not
- Return type:
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
- Parameters:
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
- Returns:
The found folders
- Return type:
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
- Parameters:
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
- Returns:
The updated folder
- Return type:
FolderActions#
- class mipac.actions.drive.folders.FolderActions(*, session: HTTPClient, client: ClientManager)#
DriveActions#
- asyncget_status
- asyncstream
- class mipac.actions.drive.drive.DriveActions(*, session: HTTPClient, client: ClientManager)#
- async get_status() DriveStatus #
Get the status of the drive
Endpoint: /api/drive
- Returns:
The status of the drive
- Return type:
- 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
- Parameters:
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
- Returns:
A list of files
- Return type:
list[File]
ClientFileActions#
- asyncdelete
- asyncget_attached_notes
- asyncupdate
- 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
- Parameters:
file_id (str | None) – 対象のファイルID, default=None
- Returns:
削除に成功したかどうか
- Return type:
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
- Parameters:
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
- Returns:
The attached notes of the file
- Return type:
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
- Parameters:
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
- Returns:
更新後のファイル
- Return type:
FileActions#
- asynccheck_existence
- asynccreate
- asyncfind
- asyncfind_by_hash
- asyncget_files
- asyncshow
- asyncupload_from_url
- class mipac.actions.drive.files.FileActions(*, session: HTTPClient, client: ClientManager)#
- async check_existence(md5: str) bool #
指定したmd5のファイルが既に存在するか確認します
Endpoint: /api/drive/files/check-existence
- Parameters:
md5 (str) – 確認したいmd5
- Returns:
存在するかしないか
- Return type:
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
- Parameters:
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
- Returns:
アップロードしたファイル
- Return type:
- async find(name: str, folder_id: str | None = None) list[File] #
指定した名前のファイルを検索します
Endpoint: /api/drive/files/find
- Parameters:
name (str) – 検索したいファイルの名前
folder_id (str | None) – ファイルを検索するフォルダID, default=None
- Returns:
The found files
- Return type:
list[File]
- async find_by_hash(md5: str) list[File] #
指定したハッシュのファイルを検索します
Endpoint: /api/drive/files/find-by-hash
- Parameters:
md5 (str) – 検索したいファイルのハッシュ
- Returns:
見つかったファイル
- Return type:
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
- Parameters:
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
- Returns:
The files of the drive
- Return type:
list[File]
- async show(file_id: str, url: str | None = None) File #
指定したIDのファイル情報を取得します
Endpoint: /api/drive/files/show
- Parameters:
file_id (str) – 対象のファイルID
url (str | None) – 取得したいファイルのURL, default=None
- Returns:
取得したファイル
- Return type:
- 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
- Parameters:
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
- Returns:
アップロードのリクエストに成功したかどうか
- Return type:
bool
Type class#
IBlocking#
- class mipac.types.blocking.IBlocking#
IInviteCode#
- class mipac.types.invite.IInviteCode#
IInviteLimit#
- class mipac.types.invite.IInviteLimit#
IGalleryPost#
- class mipac.types.gallery.IGalleryPost#
IMutedUser#
- class mipac.types.mute.IMutedUser#
IFederationFollowCommon#
- class mipac.types.follow.IFederationFollowCommon#
IFederationFollower#
- class mipac.types.follow.IFederationFollower#
IFederationFollowing#
- class mipac.types.follow.IFederationFollowing#
IFollowRequest#
- class mipac.types.follow.IFollowRequest#
IAnnouncement#
- class mipac.types.announcement.IAnnouncement#
IAnnouncementDetailed#
- class mipac.types.announcement.IAnnouncementDetailed#
管理者から見たアナウンス
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#
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#
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#
IClip#
- class mipac.types.clip.IClip#
NoteReactionPayload#
- class mipac.types.reaction.NoteReactionPayload#
IChannel#
- class mipac.types.channel.IChannel#
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#
IUsernameAvailable#
- class mipac.types.username.IUsernameAvailable#
IActiveUsersChart#
- class mipac.types.chart.IActiveUsersChart#
IDriveChart#
- class mipac.types.chart.IDriveChart#
IDriveLocalChart#
- class mipac.types.chart.IDriveLocalChart#
IDriveRemoteChart#
- class mipac.types.chart.IDriveRemoteChart#
IDriveStatus#
- class mipac.types.drive.IDriveStatus#
IFile#
- class mipac.types.drive.IFile#
ファイル情報
IFileProperties#
- class mipac.types.drive.IFileProperties#
プロパティー情報
IFolder#
- class mipac.types.drive.IFolder#
フォルダーの情報
IAntenna#
- class mipac.types.antenna.IAntenna#
IFederationInstance#
- class mipac.types.instance.IFederationInstance#
IFederationInstanceRequired#
- class mipac.types.instance.IFederationInstanceRequired#
IFederationInstanceStat#
- class mipac.types.instance.IFederationInstanceStat#
IInstanceLite#
- class mipac.types.instance.IInstanceLite#
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#
ICreatePoll#
- class mipac.types.poll.ICreatePoll#
IPoll#
- class mipac.types.poll.IPoll#
Questionnaire object
IPollChoice#
- class mipac.types.poll.IPollChoice#
IAd#
- class mipac.types.ads.IAd#
IPartialAd#
- class mipac.types.ads.IPartialAd#
is_me_role#
IMeRole#
- class mipac.types.roles.IMeRole#
IPartialRole#
- class mipac.types.roles.IPartialRole#
IRole#
- class mipac.types.roles.IRole#
IRolePolicies#
- class mipac.types.roles.IRolePolicies#
IRoleUser#
- class mipac.types.roles.IRoleUser#
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#
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#
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#
Errors#
AccessDeniedError#
- class mipac.errors.errors.AccessDeniedError(data: dict | str, status: int)#
アクセス権限がありません。
AlreadyAddedError#
- class mipac.errors.errors.AlreadyAddedError(data: dict | str, status: int)#
AlreadyBlockingError#
- class mipac.errors.errors.AlreadyBlockingError(data: dict | str, status: int)#
すでにブロックしています。
AlreadyClippedError#
- class mipac.errors.errors.AlreadyClippedError(data: dict | str, status: int)#
AlreadyExpiredError#
- class mipac.errors.errors.AlreadyExpiredError(data: dict | str, status: int)#
AlreadyFavoritedError#
- class mipac.errors.errors.AlreadyFavoritedError(data: dict | str, status: int)#
既にお気に入り登録されています。
AlreadyFollowingError#
- class mipac.errors.errors.AlreadyFollowingError(data: dict | str, status: int)#
すでにフォローしています。
AlreadyInvitedError#
- class mipac.errors.errors.AlreadyInvitedError(data: dict | str, status: int)#
AlreadyLikedError#
- class mipac.errors.errors.AlreadyLikedError(data: dict | str, status: int)#
すでにいいねをつけています。
AlreadyMutingError#
- class mipac.errors.errors.AlreadyMutingError(data: dict | str, status: int)#
すでにそのユーザーをミュートしています。
AlreadyPinnedError#
- class mipac.errors.errors.AlreadyPinnedError(data: dict | str, status: int)#
指定されたノートは既にピン留めされています。
AlreadyPromotedError#
- class mipac.errors.errors.AlreadyPromotedError(data: dict | str, status: int)#
AlreadyReactedError#
- class mipac.errors.errors.AlreadyReactedError(data: dict | str, status: int)#
既にリアクションしています。
AlreadyVotedError#
- class mipac.errors.errors.AlreadyVotedError(data: dict | str, status: int)#
AvatarNotAnImageError#
- class mipac.errors.errors.AvatarNotAnImageError(data: dict | str, status: int)#
アバター画像に、画像ではないファイルが指定されました。
BlockedError#
- class mipac.errors.errors.BlockedError(data: dict | str, status: int)#
ユーザーにブロックされています。
BlockeeIsYourselfError#
- class mipac.errors.errors.BlockeeIsYourselfError(data: dict | str, status: int)#
自分のブロックを解除しようとしました。
BlockingError#
- class mipac.errors.errors.BlockingError(data: dict | str, status: int)#
ユーザーをブロックしています。
CannotCreateAlreadyExpiredPollError#
- class mipac.errors.errors.CannotCreateAlreadyExpiredPollError(data: dict | str, status: int)#
アンケートの期限の指定が誤っています。
CannotRenoteToAPureRenoteError#
- class mipac.errors.errors.CannotRenoteToAPureRenoteError(data: dict | str, status: int)#
単純なRenoteを再度Renoteすることはできません。
CannotReplyToAPureRenoteError#
- class mipac.errors.errors.CannotReplyToAPureRenoteError(data: dict | str, status: int)#
単純なRenoteに返信することはできません。
CannotReportTheAdminError#
- class mipac.errors.errors.CannotReportTheAdminError(data: dict | str, status: int)#
管理者を通報しようとしました。
CannotReportYourselfError#
- class mipac.errors.errors.CannotReportYourselfError(data: dict | str, status: int)#
自身を通報しようとしました。
ContentRequiredError#
- class mipac.errors.errors.ContentRequiredError(data: dict | str, status: int)#
CredentialRequiredError#
- class mipac.errors.errors.CredentialRequiredError(data: dict | str, status: int)#
クレデンシャル必須のエンドポイントにクレデンシャル無しでリクエストされました。
FailedToResolveRemoteUserError#
- class mipac.errors.errors.FailedToResolveRemoteUserError(data: dict | str, status: int)#
リモートユーザーの検索に失敗しました。
FollowRequestNotFoundError#
- class mipac.errors.errors.FollowRequestNotFoundError(data: dict | str, status: int)#
フォローリクエストがありません。
FolloweeIsYourselfError#
- class mipac.errors.errors.FolloweeIsYourselfError(data: dict | str, status: int)#
自分のフォローを解除しようとしました。
FollowerIsYourselfError#
- class mipac.errors.errors.FollowerIsYourselfError(data: dict | str, status: int)#
自分をフォロワー解除しようとしました。
ForbiddenError#
- class mipac.errors.errors.ForbiddenError(data: dict | str, status: int)#
GroupAccessDeniedError#
- class mipac.errors.errors.GroupAccessDeniedError(data: dict | str, status: int)#
GtlDisabledError#
- class mipac.errors.errors.GtlDisabledError(data: dict | str, status: int)#
グローバルタイムラインが無効になっています。
HasChildFilesOrFoldersError#
- class mipac.errors.errors.HasChildFilesOrFoldersError(data: dict | str, status: int)#
フォルダーが空ではありません。
InappropriateError#
- class mipac.errors.errors.InappropriateError(data: dict | str, status: int)#
不適切なコンテンツを含んでいる可能性があると判定されました。
InternalErrorError#
- class mipac.errors.errors.InternalErrorError(data: dict | str, status: int)#
サーバー内部で問題が発生しました。引き続き問題が発生する場合は管理者にお問い合わせください。
InvalidChoiceError#
- class mipac.errors.errors.InvalidChoiceError(data: dict | str, status: int)#
InvalidFileNameError#
- class mipac.errors.errors.InvalidFileNameError(data: dict | str, status: int)#
ファイル名が不正です。
InvalidParamError#
- class mipac.errors.errors.InvalidParamError(data: dict | str, status: int)#
リクエストパラメータに誤りがあります。
InvalidRegexpError#
- class mipac.errors.errors.InvalidRegexpError(data: dict | str, status: int)#
正規表現が不正です。
InvalidUrlError#
- class mipac.errors.errors.InvalidUrlError(data: dict | str, status: int)#
IsOwnerError#
- class mipac.errors.errors.IsOwnerError(data: dict | str, status: int)#
LtlDisabledError#
- class mipac.errors.errors.LtlDisabledError(data: dict | str, status: int)#
ローカルタイムラインが無効になっています。
MoSuchFileError#
- class mipac.errors.errors.MoSuchFileError(data: dict | str, status: int)#
MuteeIsYourselfError#
- class mipac.errors.errors.MuteeIsYourselfError(data: dict | str, status: int)#
自分に対してミュートを解除しようとしました。
NameAlreadyExistsError#
- class mipac.errors.errors.NameAlreadyExistsError(data: dict | str, status: int)#
同じURLにページがすでに存在します。
NoFollowRequestError#
- class mipac.errors.errors.NoFollowRequestError(data: dict | str, status: int)#
ユーザーからのフォローリクエストがありません。
NoFreeSpaceError#
- class mipac.errors.errors.NoFreeSpaceError(data: dict | str, status: int)#
ドライブに空き容量がありません。
NoPollError#
- class mipac.errors.errors.NoPollError(data: dict | str, status: int)#
NoSuchAdError#
- class mipac.errors.errors.NoSuchAdError(data: dict | str, status: int)#
NoSuchAnnouncementError#
- class mipac.errors.errors.NoSuchAnnouncementError(data: dict | str, status: int)#
お知らせが存在しません。
NoSuchAntennaError#
- class mipac.errors.errors.NoSuchAntennaError(data: dict | str, status: int)#
NoSuchAppError#
- class mipac.errors.errors.NoSuchAppError(data: dict | str, status: int)#
アプリが存在しません。
NoSuchAvatarError#
- class mipac.errors.errors.NoSuchAvatarError(data: dict | str, status: int)#
アバター画像のファイルが存在しません。
NoSuchChannelError#
- class mipac.errors.errors.NoSuchChannelError(data: dict | str, status: int)#
指定されたチャンネルが存在しないか、アクセスが許可されていません。
NoSuchClipError#
- class mipac.errors.errors.NoSuchClipError(data: dict | str, status: int)#
NoSuchEmojiError#
- class mipac.errors.errors.NoSuchEmojiError(data: dict | str, status: int)#
NoSuchFileError#
- class mipac.errors.errors.NoSuchFileError(data: dict | str, status: int)#
ファイルが存在しません。
NoSuchFolderError#
- class mipac.errors.errors.NoSuchFolderError(data: dict | str, status: int)#
フォルダーが存在しません。
NoSuchGroupError#
- class mipac.errors.errors.NoSuchGroupError(data: dict | str, status: int)#
NoSuchGroupMemberError#
- class mipac.errors.errors.NoSuchGroupMemberError(data: dict | str, status: int)#
NoSuchHashtagError#
- class mipac.errors.errors.NoSuchHashtagError(data: dict | str, status: int)#
ハッシュタグが存在しません。
NoSuchInvitationError#
- class mipac.errors.errors.NoSuchInvitationError(data: dict | str, status: int)#
NoSuchListError#
- class mipac.errors.errors.NoSuchListError(data: dict | str, status: int)#
NoSuchMessageError#
- class mipac.errors.errors.NoSuchMessageError(data: dict | str, status: int)#
NoSuchNoteError#
- class mipac.errors.errors.NoSuchNoteError(data: dict | str, status: int)#
指定されたノートが存在しないか、アクセスが許可されていません。
NoSuchNotificationError#
- class mipac.errors.errors.NoSuchNotificationError(data: dict | str, status: int)#
通知が存在しません。
NoSuchObjectError#
- class mipac.errors.errors.NoSuchObjectError(data: dict | str, status: int)#
NoSuchPageError#
- class mipac.errors.errors.NoSuchPageError(data: dict | str, status: int)#
ページが存在しません。
NoSuchParentFolderError#
- class mipac.errors.errors.NoSuchParentFolderError(data: dict | str, status: int)#
親フォルダーが存在しません。
NoSuchPostError#
- class mipac.errors.errors.NoSuchPostError(data: dict | str, status: int)#
NoSuchRenoteTargetError#
- class mipac.errors.errors.NoSuchRenoteTargetError(data: dict | str, status: int)#
Renoteに指定されたノートが存在しないか、アクセスが許可されていません。
NoSuchReplyTargetError#
- class mipac.errors.errors.NoSuchReplyTargetError(data: dict | str, status: int)#
返信先に指定されたノートが存在しないか、アクセスが許可されていません。
NoSuchSessionError#
- class mipac.errors.errors.NoSuchSessionError(data: dict | str, status: int)#
セッションが存在しません。
NoSuchUserError#
- class mipac.errors.errors.NoSuchUserError(data: dict | str, status: int)#
ユーザーが存在しません。
NoSuchUserGroupError#
- class mipac.errors.errors.NoSuchUserGroupError(data: dict | str, status: int)#
NoSuchUserListError#
- class mipac.errors.errors.NoSuchUserListError(data: dict | str, status: int)#
NoSuchWebhookError#
- class mipac.errors.errors.NoSuchWebhookError(data: dict | str, status: int)#
Webhookが存在しません。
NotBlockingError#
- class mipac.errors.errors.NotBlockingError(data: dict | str, status: int)#
ブロックしていないユーザーです。
NotFavoritedError#
- class mipac.errors.errors.NotFavoritedError(data: dict | str, status: int)#
お気に入り登録されていません。
NotFollowingError#
- class mipac.errors.errors.NotFollowingError(data: dict | str, status: int)#
ユーザーにフォローされていません。
NotLikedError#
- class mipac.errors.errors.NotLikedError(data: dict | str, status: int)#
いいねをつけていないページです。
NotMutingError#
- class mipac.errors.errors.NotMutingError(data: dict | str, status: int)#
対象となるユーザーをそもそもミュートしていません。
NotReactedError#
- class mipac.errors.errors.NotReactedError(data: dict | str, status: int)#
リアクションしていません。
PendingSessionError#
- class mipac.errors.errors.PendingSessionError(data: dict | str, status: int)#
PermissionDeniedError#
- class mipac.errors.errors.PermissionDeniedError(data: dict | str, status: int)#
与えられたクレデンシャルには必要なパーミッションがありません。
PinLimitExceededError#
- class mipac.errors.errors.PinLimitExceededError(data: dict | str, status: int)#
これ以上ピン留めできません。
RateLimitExceededError#
- class mipac.errors.errors.RateLimitExceededError(data: dict | str, status: int)#
レートリミットによる制限のため一時的に利用できません。
ReactionsNotPublicError#
- class mipac.errors.errors.ReactionsNotPublicError(data: dict | str, status: int)#
リアクションが公開されていません。
RecipientIsYourselfError#
- class mipac.errors.errors.RecipientIsYourselfError(data: dict | str, status: int)#
StlDisabledError#
- class mipac.errors.errors.StlDisabledError(data: dict | str, status: int)#
ソーシャルタイムラインが無効になっています。
YouAreOwnerError#
- class mipac.errors.errors.YouAreOwnerError(data: dict | str, status: int)#
YouHaveBeenBlockedError#
- class mipac.errors.errors.YouHaveBeenBlockedError(data: dict | str, status: int)#
ブロックされているユーザーのノートにリアクションは行えません。
YourAccountSuspendedError#
- class mipac.errors.errors.YourAccountSuspendedError(data: dict | str, status: int)#
アカウントが凍結されているため利用できません。
YourPageError#
- class mipac.errors.errors.YourPageError(data: dict | str, status: int)#
自身のページにいいねをつけようとしました。
YourPostError#
- class mipac.errors.errors.YourPostError(data: dict | str, status: int)#
APIError#
- class mipac.errors.base.APIError(data: dict | str, status: int)#
APIのエラー
CredentialsError#
- class mipac.errors.base.CredentialsError#
認証情報に関するエラー
NotExistRequiredData#
- class mipac.errors.base.NotExistRequiredData#
クラスの中に必要なデータが不足している
ParameterError#
- class mipac.errors.base.ParameterError#
引数に関するエラー
__OTHER#
json_or_text#
- async mipac.http.json_or_text(response: ClientResponse)#
HTTPClient#
- class mipac.http.HTTPClient(url: str, token: str | None = None)#
MisskeyClientWebSocketResponse#
- class mipac.http.MisskeyClientWebSocketResponse(reader: FlowControlDataQueue[WSMessage], writer: WebSocketWriter, protocol: str | None, response: ClientResponse, timeout: float, autoclose: bool, autoping: bool, loop: AbstractEventLoop, *, receive_timeout: float | None = None, heartbeat: float | None = None, compress: int = 0, client_notakeover: bool = False)#
Route#
- class mipac.http.Route(method: Literal['GET', 'POST'], path: Literal['/api/admin/meta', '/api/admin/abuse-user-reports', '/api/admin/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'])#
CacheConfig#
- class mipac.config.CacheConfig(options: CacheConfigData)#
CacheConfigData#
- class mipac.config.CacheConfigData(maxsize: int = 1024, ttl: int = 360)#
Config#
- class mipac.config.Config(*, host: str = '', is_ssl: bool = True, cache: CacheConfigData | None = None, features: IFeatures | None = None, limits: ILimits | None = None)#
Features#
IFeatures#
- class mipac.config.IFeatures#
ILimits#
- class mipac.config.ILimits#
Limits#
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')#
AbstractAction#
- class mipac.abstract.action.AbstractAction(*, session: HTTPClient, client: ClientManager)#
AbstractManager#
- class mipac.abstract.manager.AbstractManager(*, session: HTTPClient, client: ClientManager)#
cache#
- mipac.utils.cache.cache(group: str = 'default', override: bool = False)#
get_cache_key#
- mipac.utils.cache.get_cache_key(func)#
set_cache#
- mipac.utils.cache.set_cache(group: str, key: str, value: Any)#
check_multi_arg#
- mipac.utils.util.check_multi_arg(*args: Any) bool #
複数の値を受け取り値が存在するかをboolで返します
- Parameters:
args (list) – 確認したい変数のリスト
- Returns:
存在する場合はTrue, 存在しない場合はFalse
- Return type:
bool
credentials_required#
- mipac.utils.util.credentials_required(func)#
deprecated#
- mipac.utils.util.deprecated(func)#
This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emitted when the function is used.
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#
IMiAuthPayload#
- class mipac.utils.auth.IMiAuthPayload#
MiAuth#
- class mipac.utils.auth.MiAuth(host: str, protocol: Literal['http', 'https'])#
Misskey v12以降のインスタンスで使用可能な認証方式です
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 #
Pagination#
- class mipac.utils.pagination.Pagination(http_client: HTTPClient, route: Route, json: dict[str, Any], auth: bool = True, remove_none: bool = True, lower: bool = True, pagination_type: Literal['until', 'count'] = 'until', limit: int = 100)#
bool_to_string#
- mipac.utils.format.bool_to_string(boolean: bool) str #
boolを小文字にして文字列として返します
- Parameters:
boolean (bool) – 変更したいbool値
- Returns:
true or false – 小文字になったbool文字列
- Return type:
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] #
remove_dict_empty#
- mipac.utils.format.remove_dict_empty(data: dict[str, Any], ignore_keys: list[str] | None = None) dict[str, Any] #
- Parameters:
data (dict) – 空のkeyを削除したいdict
ignore_keys (list) – 削除したくないkeyのリスト
- Returns:
_data – 空のkeyがなくなったdict
- Return type:
dict
remove_dict_missing#
- mipac.utils.format.remove_dict_missing(data: dict[str, Any]) dict[str, Any] #
- Parameters:
data (dict) – 空のkeyを削除したいdict
- Returns:
_data – MISSINGのkeyがなくなったdict
- Return type:
dict
remove_list_empty#
- mipac.utils.format.remove_list_empty(data: list[Any]) list[Any] #
- Parameters:
data (dict) – 空のkeyを削除したいdict
- Returns:
空のkeyがなくなったdict
- Return type:
dict[str, Any]
snake_to_camel#
- mipac.utils.format.snake_to_camel(snake_str: str, replace_list: dict[str, str]) str #
str_lower#
- mipac.utils.format.str_lower(text: str)#
str_to_datetime#
- mipac.utils.format.str_to_datetime(data: str, format: str = '%Y-%m-%dT%H:%M:%S.%fZ') datetime #
- Parameters:
data (str) – datetimeに変更したい文字列
format (str) – dataのフォーマット
- Returns:
変換後のデータ
- Return type:
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] #
- Parameters:
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名を特定の物に置き換える
- Returns:
field – 小文字になった, key名が変更されたdict
- Return type:
dict[str, Any]