API Reference

Misskey Models

App

class mipac.models.app.App(raw_app: IApp)
property callback_url: str | None

The callback url of the app

property id: str

The id of the app

property is_authorized: bool

If the app is authorized or not

property name: str

The name of the app

property permission: list[str]

The permissions the app has

property secret: str

The secret of the app

Muting

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

PartialReaction

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

Role

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

RolePolicies

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

Announcement

class mipac.models.announcement.Announcement(announcement: IAnnouncement, *, client: ClientManager)
property created_at: datetime

アナウンスが作成された日時

戻り値:

アナウンスが作成された日時

戻り値の型:

datetime

property id: str

アナウンスのID

戻り値:

アナウンスのID

戻り値の型:

str

property text: str

アナウンスの内容

戻り値:

アナウンスの内容

戻り値の型:

str

property title: str

アナウンスのタイトル

戻り値:

アナウンスのタイトル

戻り値の型:

str

property updated_at: datetime | None

アナウンスが更新された日時

Noneの場合は、アナウンスが更新されていないことを示します。

戻り値:

アナウンスが更新された日時

戻り値の型:

datetime | None

AnnouncementDetailed

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

Returns the number of reads of the announcement.

packed_user

mipac.models.user.packed_user(user: IUser, client: ClientManager) UserDetailedNotMe | MeDetailed

Achievement

class mipac.models.user.Achievement(detail: IAchievement)

CreatedUser

class mipac.models.user.CreatedUser(raw_user: T, *, client: ClientManager)

FollowCommon

class mipac.models.user.FollowCommon(raw_follow: FFC, *, client: ClientManager)

Follower

class mipac.models.user.Follower(raw_follow: IFederationFollower, *, client: ClientManager)

Following

class mipac.models.user.Following(raw_following: IFederationFollowing, *, client: ClientManager)

FrequentlyRepliedUser

class mipac.models.user.FrequentlyRepliedUser(raw_frequently_replied_user: GetFrequentlyRepliedUsersResponse, *, client: ClientManager)

MeDetailed

class mipac.models.user.MeDetailed(raw_user: T, *, client: ClientManager)

MeDetailedOnly

class mipac.models.user.MeDetailedOnly(raw_user: IMeDetailedOnlySchema, *, client: ClientManager)

RoleUser

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

UserDetailedNotMe

class mipac.models.user.UserDetailedNotMe(raw_user: T, *, client: ClientManager)

UserDetailedNotMeOnly

class mipac.models.user.UserDetailedNotMeOnly(raw_user: IUserDetailedNotMeOnlySchema, *, client: ClientManager)

UserField

class mipac.models.user.UserField(raw_user_field: IUserField, *, client: ClientManager)

UserList

class mipac.models.user.UserList(raw_user_list: IUserList, *, client: ClientManager)

UserListMembership

class mipac.models.user.UserListMembership(raw_user_list_membership: IUserListMembership, *, client: ClientManager)

UsernameAvailable

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

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

戻り値:

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

戻り値の型:

bool

ActiveUsersChart

class mipac.models.chart.ActiveUsersChart(data: IActiveUsersChart)

DriveChart

class mipac.models.chart.DriveChart(data: IDriveChart)

DriveLocalChart

class mipac.models.chart.DriveLocalChart(data: IDriveLocalChart)

DriveRemoteChart

class mipac.models.chart.DriveRemoteChart(data: IDriveRemoteChart)

FollowRequest

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

Channel

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

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

戻り値の型:

bool

property api: ClientChannelManager

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

戻り値の型:

ClientChannelManager

property banner_url: str | None

チャンネルのバナー画像URL

戻り値の型:

str | None

property color: str

チャンネルの色

戻り値の型:

str

property created_at: datetime

チャンネルが作成された日時

戻り値の型:

datetime

property description: str | None

チャンネルの説明

戻り値の型:

str | None

property id: str

チャンネルID

戻り値の型:

str

property is_archived: bool

チャンネルがアーカイブされているかどうか

戻り値の型:

bool

property is_favorited: bool | None

自身がお気に入り登録しているかどうか

戻り値の型:

bool

property is_following: bool | None

自身がフォローしているかどうか

戻り値の型:

bool

property is_sensitive: bool

チャンネルがセンシティブかどうか

戻り値の型:

bool

property last_noted_at: datetime | None

チャンネルに最後にノートが投稿された日時

戻り値の型:

datetime | None

property name: str

チャンネル名

戻り値の型:

str

property notes_count: int

チャンネル内のノート数

戻り値の型:

int

property pinned_note_ids: list[str]

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

戻り値の型:

list[str]

property pinned_notes: list[Note]

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

戻り値の型:

list[Note]

property user_id: str | None

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

戻り値の型:

str | None

property users_count: int

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

戻り値の型:

int

ID

Attributes
class mipac.models.common.ID(*, raw_id: IID)
property id: str

The id of the object

AdminMeta

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

Features

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

Meta

class mipac.models.meta.Meta(instance_metadata: IMetaDetailed, *, client: ClientManager)

MetaDetailedOnly

class mipac.models.meta.MetaDetailedOnly(raw_meta: IMetaDetailedOnly, *, client: ClientManager)

SystemWebhook

class mipac.models.system_webhook.SystemWebhook(raw_system_webhook: ISystemWebhook, *, client: ClientManager)

IndexStat

class mipac.models.admin.IndexStat(index_stat: IIndexStat)

ModerationLog

class mipac.models.admin.ModerationLog(moderation_log: IModerationLog, *, client: ClientManager)

ServerInfo

class mipac.models.admin.ServerInfo(server_info: IServerInfo)

ServerInfoCpu

class mipac.models.admin.ServerInfoCpu(server_info_cpu: IServerInfoCpu)

ServerInfoFs

class mipac.models.admin.ServerInfoFs(server_info_fs: IServerInfoFs)

ServerInfoMem

class mipac.models.admin.ServerInfoMem(server_info_mem: IServerInfoMem)

ServerInfoNet

class mipac.models.admin.ServerInfoNet(server_info_net: IServerInfoNet)

UserIP

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

MiPoll

class mipac.models.poll.MiPoll(poll: ICreatePoll)

Poll

class mipac.models.poll.Poll(poll: IPoll, *, client: ClientManager)

PollChoice

class mipac.models.poll.PollChoice(choice: IPollChoice, *, client: ClientManager)

InviteCode

class mipac.models.invite.InviteCode(raw_invite_code: IInviteCode, *, client: ClientManager)

InviteLimit

class mipac.models.invite.InviteLimit(raw_invite_limit: IInviteLimit, *, client: ClientManager)

Hashtag

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

TrendHashtag

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

チャート

戻り値:

チャート

戻り値の型:

list[int]

property tag

ハッシュタグ

戻り値:

ハッシュタグ

戻り値の型:

str

property users_count

ユーザー数

戻り値:

ユーザー数

戻り値の型:

int

CustomEmoji

class mipac.models.emoji.CustomEmoji(emoji: ICustomEmoji, *, client: ClientManager)

EmojiDetailed

class mipac.models.emoji.EmojiDetailed(raw_emoji_detailed: IEmojiDetailed, *, client: ClientManager)

EmojiSimple

class mipac.models.emoji.EmojiSimple(raw_emoji_simple: IEmojiSimple, *, client: ClientManager)

Misskeyの EmojiSimple を表すクラス

GalleryPost

class mipac.models.gallery.GalleryPost(raw_gallery: IGalleryPost, *, client: ClientManager)

Note

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

Noteモデル

パラメータ:
property api: ClientNoteManager

Note api

戻り値:

note api

戻り値の型:

ClientNoteManager

property author: PartialUser

Note author

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

戻り値:

note author

戻り値の型:

PartialUser

property channel: NoteChannel | None

Note channel

戻り値:

note channel

戻り値の型:

NoteChannel | None

property channel_id: str | None

Note channelId

戻り値:

note channelId

戻り値の型:

str | None

property clipped_count: int | None

Note clippedCount

戻り値:

note clippedCount

戻り値の型:

int | None

property content: str | None

Note content

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

戻り値:

note content

戻り値の型:

str | None

property created_at: datetime

Note createdAt

戻り値:

note createdAt

戻り値の型:

datetime

property cw: str | None

Note cw

戻り値:

note cw

戻り値の型:

str | None

property deleted_at: datetime | None

Note deletedAt

戻り値:

note deletedAt

戻り値の型:

datetime | None

property emojis: dict[str, str]

Note emojis

戻り値:

note emojis

戻り値の型:

dict[str, str]

property file_ids: list[str]

Note fileIds

戻り値:

note fileIds

戻り値の型:

list[str]

property files: list[File]

Note files

戻り値:

note files

戻り値の型:

list[IFile]

property id: str

note id

戻り値:

note id

戻り値の型:

str

property is_hidden: bool | None

Note isHidden

戻り値:

note isHidden

戻り値の型:

bool | None

property local_only: bool

Note localOnly

戻り値:

note localOnly

戻り値の型:

bool

property mentions: list[str]

Note mentions

戻り値:

note mentions

戻り値の型:

list[str]

property my_reaction: str | None

Note myReaction

戻り値:

note myReaction

戻り値の型:

str | None

property poll: Poll | None

Note poll

戻り値:

note poll

戻り値の型:

IPoll | None

property reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote']

Note reactionAcceptance

戻り値:

note reactionAcceptance

戻り値の型:

IReactionAcceptance

property reaction_and_user_pair_cache: dict[str, list[PartialUser]]

Note reactionAndUserPairCache

戻り値:

note reactionAndUserPairCache

戻り値の型:

dict[str, list[PartialUser]]

property reaction_count: int

Note reactionCount

戻り値:

note reactionCount

戻り値の型:

int

property reactions: dict[str, int]

Note reactions

戻り値:

note reactions

戻り値の型:

dict[str, int]

property renote: Note | None

Note renote

戻り値:

note renote

戻り値の型:

Note | None

property renote_count: int

Note renoteCount

戻り値:

note renoteCount

戻り値の型:

int

property renote_id: str | None

Note renoteId

戻り値:

note renoteId

戻り値の型:

str | None

property replies_count: int

Note repliesCount

戻り値:

note repliesCount

戻り値の型:

int

property reply: Note | None

Note reply

戻り値:

note reply

戻り値の型:

Note | None

property reply_id: str | None

Note replyId

戻り値:

note replyId

戻り値の型:

str | None

property tags: list[str]

Note tags

戻り値:

note tags

戻り値の型:

list[str] | None

property text: str | None

Note text

戻り値:

note text

戻り値の型:

str | None

property uri: str | None

Note uri

戻り値:

note uri

戻り値の型:

str

property url: str | None

Note url

戻り値:

note url

戻り値の型:

str

property user: PartialUser

Note author

戻り値:

note user

戻り値の型:

PartialUser

property user_id: str

Note userId

戻り値:

note userId

戻り値の型:

str

property visibility: Literal['public', 'home', 'followers', 'specified']

Note visibility

戻り値:

note visibility

戻り値の型:

INoteVisibility

property visible_user_ids: list[str]

Note visibleUserIds

戻り値:

note visibleUserIds

戻り値の型:

list[str] | None

NoteChannel

class mipac.models.note.NoteChannel(raw_note_channel: INoteChannel, *, client: ClientManager)
property allow_renote_to_external: bool

Note channelAllowRenoteToExternal

戻り値:

note channelAllowRenoteToExternal

戻り値の型:

bool

property color: str

Note channelColor

戻り値:

note channelColor

戻り値の型:

str

property id: str

Note channelId

戻り値:

note channelId

戻り値の型:

str

property is_sensitive: bool

Note channelIsSensitive

戻り値:

note channelIsSensitive

戻り値の型:

bool

property name: str

Note channelName

戻り値:

note channelName

戻り値の型:

str

property user_id: str | None

Note channelUserId

戻り値:

note channelUserId

戻り値の型:

str | None

NoteDeleted

class mipac.models.note.NoteDeleted(data: INoteUpdated[INoteUpdatedDelete])

NoteReaction

Attributes
class mipac.models.note.NoteReaction(raw_reaction: INoteReaction, *, client: ClientManager)
property created_at: datetime | None

Note createdAt

戻り値:

note createdAt

戻り値の型:

datetime | None

property id: str | None

Note reactionId

戻り値:

note reactionId

戻り値の型:

str | None

property type: str | None

Reaction type

戻り値:

reaction type

戻り値の型:

str | None

property user: PartialUser

Note user

戻り値:

note user

戻り値の型:

PartialUser

NoteState

class mipac.models.note.NoteState(data: INoteState)

NoteTranslateResult

class mipac.models.note.NoteTranslateResult(translate_result: INoteTranslateResult)
パラメータ:

translate_result (INoteTranslateResult) -- The raw data of the note translate result

DriveStatus

Attributes
class mipac.models.drive.DriveStatus(raw_drive_status: IDriveStatus, *, client: ClientManager)
property capacity: int

Total capacity of the drive in bytes

戻り値:

Total capacity of the drive in bytes

戻り値の型:

int

property usage: int

Total usage of the drive in bytes

戻り値:

Total usage of the drive in bytes

戻り値の型:

int

File

class mipac.models.drive.File(raw_file: IFile, *, client: ClientManager)
property api: ClientFileManager

このファイルに対する操作を行うためのAPIクライアント

戻り値:

このファイルに対する操作を行うためのAPIクライアント

戻り値の型:

ClientFileManager

property blurhash: str | None

ファイルのBlurHash

戻り値:

ファイルのBlurHash

戻り値の型:

str | None

property comment: str | None

ファイルのコメント

戻り値:

ファイルのコメント

戻り値の型:

str | None

property created_at: datetime

ファイルの作成日時

戻り値:

ファイルの作成日時

戻り値の型:

datetime

property folder: Folder | None

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

戻り値:

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

戻り値の型:

Folder | None

property folder_id: str | None

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

戻り値:

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

戻り値の型:

str | None

property id: str

ファイルのID

戻り値:

ファイルのID

戻り値の型:

str

property is_sensitive: bool

ファイルが閲覧注意(NSFW)であるか

戻り値:

ファイルが閲覧注意であるか

戻り値の型:

bool

property md5: str

ファイルのMD5ハッシュ

戻り値:

ファイルのMD5ハッシュ

戻り値の型:

str

property name: str

拡張子付きのファイル名

戻り値:

拡張子付きのファイル名

戻り値の型:

str

property properties: FileProperties

ファイルのプロパティ

戻り値:

ファイルのプロパティ

戻り値の型:

FileProperties

property size: int

ファイルのサイズ

戻り値:

ファイルのサイズ

戻り値の型:

int

property thumbnail_url: str | None

ファイルのサムネイルURL

戻り値:

ファイルのサムネイルURL

戻り値の型:

str | None

property type: str

ファイルの種類 (MIME タイプ)

戻り値:

ファイルの種類 (MIME タイプ)

戻り値の型:

str

property url: str

ファイルのURL

戻り値:

ファイルのURL

戻り値の型:

str

property user: PartialUser | None

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

戻り値:

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

戻り値の型:

PartialUser | None

property user_id: str | None

ファイルをアップロードしたユーザーのID

戻り値:

ファイルをアップロードしたユーザーのID

戻り値の型:

str | None

FileProperties

Attributes
class mipac.models.drive.FileProperties(raw_properties: IFileProperties)
property height: int | None

ファイルの高さ

戻り値:

ファイルの高さ

戻り値の型:

int | None

property width: int | None

ファイルの幅

戻り値:

ファイルの幅

戻り値の型:

int | None

Folder

class mipac.models.drive.Folder(raw_folder: IFolder, client: ClientManager)
property created_at: datetime

フォルダーが作成された日時

戻り値:

フォルダーが作成された日時

戻り値の型:

datetime

property files_count: int | None

フォルダー内のファイルの数

戻り値:

フォルダー内のファイルの数

戻り値の型:

int | None

property folders_count: int | None

フォルダー内のフォルダーの数

戻り値:

フォルダー内のフォルダーの数

戻り値の型:

int | None

property id: str

フォルダーのID

戻り値:

フォルダーのID

戻り値の型:

str

property name: str

フォルダー名

戻り値:

フォルダー名

戻り値の型:

str

property parent: Folder | None

親フォルダー

戻り値:

親フォルダー

戻り値の型:

Folder | None

property parent_id: str | None

親フォルダーのID

戻り値:

親フォルダーのID

戻り値の型:

str | None

Clip

class mipac.models.clip.Clip(raw_clip: IClip, *, client: ClientManager)
property created_at: str

The time the clip was created

property description: str | None

The clip description

property favorited_count: int

The number of times the clip has been favorited

property id: str

The clip id

property is_favorited: bool

Whether the clip is favorited

property is_public: bool

Whether the clip is public

property last_clipped_at: str

The last time the clip was clipped

property name: str

The clip name

property user: PartialUser

The user who created the clip

property user_id: str

The user id who created the clip

Blocking

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

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

戻り値:

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

戻り値の型:

ClientBlockingManager

property blockee: UserDetailedNotMe

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

戻り値:

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

戻り値の型:

UserDetailedNotMe

property blockee_id: str

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

戻り値:

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

戻り値の型:

str

property created_at: datetime

ブロックした日時

戻り値:

ブロックした日時

戻り値の型:

datetime

property id: str

ブロックID

戻り値:

ブロックID

戻り値の型:

str

Antenna

class mipac.models.antenna.Antenna(antenna: IAntenna, *, client: ClientManager)
property created_at: datetime

アンテナの作成日時

戻り値:

アンテナの作成日時

戻り値の型:

datetime

property exclude_keywords: list[str]

除外キーワード

戻り値:

除外キーワード

戻り値の型:

list[str]

property id: str

アンテナのID

戻り値:

アンテナのID

戻り値の型:

str

property keywords: list[str]

キーワード

戻り値:

キーワード

戻り値の型:

list[str]

property name: str

アンテナ名

戻り値:

アンテナ名

戻り値の型:

str

FederationInstance

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

Notification

class mipac.models.notification.Notification(notification: INotification, *, client: ClientManager)

NotificationAchievement

class mipac.models.notification.NotificationAchievement(notification: IAchievementNf, *, client: ClientManager)

NotificationFollow

class mipac.models.notification.NotificationFollow(notification: IUserNf, *, client: ClientManager)

NotificationFollowRequest

class mipac.models.notification.NotificationFollowRequest(notification: IUserNf, *, client: ClientManager)

NotificationNote

class mipac.models.notification.NotificationNote(notification: INoteNf, *, client: ClientManager)

NotificationPollEnd

class mipac.models.notification.NotificationPollEnd(notification: IPollEndNf, *, client: ClientManager)

NotificationReaction

class mipac.models.notification.NotificationReaction(reaction: IReactionNf, *, client: ClientManager)

AvatarDecoration

class mipac.models.avatar_decoration.AvatarDecoration(raw_avatar_decoration: IAvatarDecoration, *, client: ClientManager)

PartialAd

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

広告のID

戻り値:

広告のID

戻り値の型:

str

property url: str

広告のURL

戻り値:

広告のURL

戻り値の型:

str

AvatarDecoration

class mipac.models.lite.user.AvatarDecoration(raw_avatar_decoration: IAvatarDecoration, *, client: ClientManager)
property angle: int | None

Returns the angle of the avatar decoration.

戻り値:

The angle of the avatar decoration.

戻り値の型:

int | None

property flip_h: bool | None

Returns whether the avatar decoration is flipped horizontally.

戻り値:

Whether the avatar decoration is flipped horizontally.

戻り値の型:

bool | None

property id: str

Returns the id of the avatar decoration.

戻り値:

The id of the avatar decoration.

戻り値の型:

str

property offset_x: int | None

Returns the x offset of the avatar decoration.

戻り値:

The x offset of the avatar decoration.

戻り値の型:

int | None

property offset_y: int | None

Returns the y offset of the avatar decoration.

戻り値:

The y offset of the avatar decoration.

戻り値の型:

int | None

property url: str

Returns the url of the avatar decoration.

戻り値:

The url of the avatar decoration.

戻り値の型:

str

BadgeRole

class mipac.models.lite.user.BadgeRole(data: T, *, client: ClientManager)
property display_order: int

Returns the display order of the badge role.

戻り値:

The display order of the badge role.

戻り値の型:

int

property icon_url: str | None

Returns the icon url of the badge role.

戻り値:

The icon url of the badge role.

戻り値の型:

str | None

property name: str

Returns the name of the badge role.

戻り値:

The name of the badge role.

戻り値の型:

str

PartialUser

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

Returns the user manager instance.

戻り値:

The user manager instance

戻り値の型:

ClientUserManager

property avatar_blurhash: str | None

Returns the avatar blurhash of the user.

戻り値:

The avatar blurhash of the user.

戻り値の型:

str | None

property avatar_decoration: list[AvatarDecoration]

Returns the avatar decoration of the user.

戻り値:

The avatar decoration of the user.

戻り値の型:

list[AvatarDecoration]

property avatar_url: str | None

Returns the avatar url of the user.

戻り値:

The avatar url of the user.

戻り値の型:

str | None

property badge_roles: list[BadgeRole] | None

Returns the badge roles of the user.

戻り値:

The badge roles of the user.

戻り値の型:

list[BadgeRole] | None

property emojis: dict[str, str]

Returns the emojis of the user.

戻り値:

The emojis of the user.

戻り値の型:

dict[str, str]

property host: str | None

Returns the host of the user.

戻り値:

The host of the user.

戻り値の型:

str | None

property id: str

Returns the id of the user.

property instance: LiteInstance | None

Returns the instance of the user.

戻り値:

The instance of the user.

戻り値の型:

LiteInstance | None

property is_bot: bool | None

Returns whether the user is a bot.

戻り値:

Whether the user is a bot.

戻り値の型:

bool | None

property is_cat: bool | None

Returns whether the user is a cat.

戻り値:

Whether the user is a cat.

戻り値の型:

bool | None

property name: str | None

Returns the nickname of the user.

戻り値:

The nickname of the user.

戻り値の型:

str | None

nickname

Returns the nickname of the user.

バージョン 0.6.0 で非推奨: Use mipac.models.lite.user.PartialUser.name() instead.

戻り値:

The nickname of the user.

戻り値の型:

str | None

property online_status: Literal['online', 'active', 'offline', 'unknown']

Returns the online status of the user.

戻り値:

The online status of the user.

戻り値の型:

IUserOnlineStatus

property username: str

Returns the username of the user.

戻り値:

The username of the user.

戻り値の型:

str

PartialMeta

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

PartialCustomEmoji

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

PartialRole

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

LiteInstance

class mipac.models.lite.instance.LiteInstance(instance: IInstanceLite)
property favicon_url: str | None

ファビコンのURL

戻り値:

ファビコンのURL

戻り値の型:

str | None

property icon_url: str | None

アイコンのURL

戻り値:

アイコンのURL

戻り値の型:

str | None

property name: str | None

サーバー名

戻り値:

サーバー名

戻り値の型:

str | None

property software_name: str | None

使用しているソフトウェアの名前

戻り値:

使用しているソフトウェアの名前

戻り値の型:

str | None

property software_version: str | None

使用しているソフトウェアのバージョン

戻り値:

使用しているソフトウェアのバージョン

戻り値の型:

str | None

property theme_color: str | None

テーマカラー

戻り値:

テーマカラー

戻り値の型:

str | None

Managers

AppManager

class mipac.manager.app.AppManager(*, session: HTTPClient, client: ClientManager)

ClientReactionManager

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

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

戻り値:

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

戻り値の型:

ClientReactionActions

ReactionManager

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

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

戻り値:

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

戻り値の型:

ReactionActions

ClientUserManager

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

UserManager

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

UsernameManager

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

PagesManager

class mipac.manager.page.PagesManager(*, session: HTTPClient, client: ClientManager)

FederationManager

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

ClientFavoriteManager

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

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

戻り値:

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

戻り値の型:

ClientFavoriteActions

FavoriteManager

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

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

戻り値:

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

戻り値の型:

ReactionActions

ClientManager

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

ChartManager

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

ClientFollowManager

class mipac.manager.follow.ClientFollowManager(user_id: str, *, session: HTTPClient, client: ClientManager)

FollowManager

class mipac.manager.follow.FollowManager(*, session: HTTPClient, client: ClientManager)

FollowRequestManager

class mipac.manager.follow.FollowRequestManager(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)

ChannelManager

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

ClientChannelManager

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

ClientPollManager

class mipac.manager.poll.ClientPollManager(note_id: str, *, session: HTTPClient, client: ClientManager)

PollManager

class mipac.manager.poll.PollManager(*, session: HTTPClient, client: ClientManager)

ClientInviteManager

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

InviteManager

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

HashtagManager

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

EmojiManager

class mipac.manager.emoji.EmojiManager(*, session: HTTPClient, client: ClientManager)

MyManager

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

ClientNoteManager

class mipac.manager.note.ClientNoteManager(note_id: str, *, session: HTTPClient, client: ClientManager)

NoteManager

class mipac.manager.note.NoteManager(*, session: HTTPClient, client: ClientManager)

User behavior for notes

ClientClipManager

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

ClipManager

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

BlockingManager

class mipac.manager.blocking.BlockingManager(*, session: HTTPClient, client: ClientManager)

ClientBlockingManager

class mipac.manager.blocking.ClientBlockingManager(user_id: str, *, session: HTTPClient, client: ClientManager)

AntennaManager

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

ClientAntennaManager

class mipac.manager.antenna.ClientAntennaManager(*, antenna_id: str, session: HTTPClient, client: ClientManager)

RoleManager

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

ClientMuteManager

class mipac.manager.users.mute.ClientMuteManager(user_id: str, *, session: HTTPClient, client: ClientManager)

MuteManager

class mipac.manager.users.mute.MuteManager(*, session: HTTPClient, client: ClientManager)

ClientPartialUserListManager

class mipac.manager.users.list.ClientPartialUserListManager(user_id: str, *, session: HTTPClient, client: ClientManager)

ClientUserListManager

class mipac.manager.users.list.ClientUserListManager(list_id: str, *, session: HTTPClient, client: ClientManager)

UserListManager

class mipac.manager.users.list.UserListManager(*, session: HTTPClient, client: ClientManager)

AdminAdManager

class mipac.manager.admins.ad.AdminAdManager(*, session: HTTPClient, client: ClientManager)

ClientAdminAdManager

class mipac.manager.admins.ad.ClientAdminAdManager(ad_id: str, *, session: HTTPClient, client: ClientManager)

AdminRoleManager

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

ClientAdminRoleManager

class mipac.manager.admins.roles.ClientAdminRoleManager(role_id: str, *, session: HTTPClient, client: ClientManager)

AdminAnnouncementManager

class mipac.manager.admins.announcement.AdminAnnouncementManager(*, session: HTTPClient, client: ClientManager)

ClientAdminAnnouncementManager

class mipac.manager.admins.announcement.ClientAdminAnnouncementManager(announce_id: str, *, session: HTTPClient, client: ClientManager)

AdminUserManager

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

ClientAdminUserManager

class mipac.manager.admins.user.ClientAdminUserManager(user_id: str, *, session: HTTPClient, client: ClientManager)

AdminAvatarDecorationManager

class mipac.manager.admins.avatar_decorations.AdminAvatarDecorationManager(*, session: HTTPClient, client: ClientManager)

ClientAdminAvatarDecorationManager

class mipac.manager.admins.avatar_decorations.ClientAdminAvatarDecorationManager(avatar_decoration_id: str, *, session: HTTPClient, client: ClientManager)

ClientSystemWebhookManager

class mipac.manager.admins.system_webhook.ClientSystemWebhookManager(webhook_id: str, *, session: HTTPClient, client: ClientManager)

SystemWebhookManager

class mipac.manager.admins.system_webhook.SystemWebhookManager(*, session: HTTPClient, client: ClientManager)

AdminManager

class mipac.manager.admins.admin.AdminManager(session: HTTPClient, client: ClientManager)

AdminInviteManager

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

AdminEmojiManager

class mipac.manager.admins.emoji.AdminEmojiManager(session: HTTPClient, client: ClientManager)

ClientAdminEmojiManager

class mipac.manager.admins.emoji.ClientAdminEmojiManager(*, emoji_id: str, session: HTTPClient, client: ClientManager)

AdminDriveManager

class mipac.manager.admins.drive.AdminDriveManager(*, session: HTTPClient, client: ClientManager)

AdminAccountManager

class mipac.manager.admins.accounts.AdminAccountManager(*, session: HTTPClient, client: ClientManager)

DriveManager

class mipac.manager.drive.drive.DriveManager(*, session: HTTPClient, client: ClientManager)

ClientFolderManager

class mipac.manager.drive.folders.ClientFolderManager(folder_id: str, *, session: HTTPClient, client: ClientManager)

FolderManager

class mipac.manager.drive.folders.FolderManager(*, session: HTTPClient, client: ClientManager)

ClientFileManager

class mipac.manager.drive.files.ClientFileManager(file_id: str, *, session: HTTPClient, client: ClientManager)

DriveFileManager

class mipac.manager.drive.files.DriveFileManager(*, session: HTTPClient, client: ClientManager)

Actions

AppActions

Methods
class mipac.actions.app.AppActions(*, session: HTTPClient, client: ClientManager)
async create(name: str, description: str, permission: list[str], callback_url: str | None = None) App

Create a new app

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

  • description (str) -- The description of the app

  • permission (list[str]) -- The permissions the app has

  • callback_url (str, optional) -- The callback url of the app, by default None

戻り値:

The created app

戻り値の型:

App

async show(app_id: str) App

Show an app

パラメータ:

app_id (str) -- The id of the app

戻り値:

The app

戻り値の型:

App

ClientReactionActions

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

Add reaction to note

Endpoint: /api/notes/reactions/create

パラメータ:

reaction (str) -- reaction

戻り値:

success or not

戻り値の型:

bool

async remove() bool

Remove reaction from note

Endpoint: /api/notes/reactions/delete

戻り値:

success or not

戻り値の型:

bool

ReactionActions

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

SharedReactionActions

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

Add reaction to note

Endpoint: /api/notes/reactions/create

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

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

戻り値:

success or not

戻り値の型:

bool

async remove(*, note_id: str) bool

Remove reaction from note

Endpoint: /api/notes/reactions/delete

パラメータ:

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

戻り値:

success or not

戻り値の型:

bool

ClientUserActions

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

Get achievements of user.

Get all featured notes of user.

Endpoint: /api/users/featured-notes

パラメータ:
  • limit (int, default=10) -- The maximum number of featured notes to return.

  • until_id (str, default=None) -- Get featured notes before this id.

戻り値:

A list of featured notes.

戻り値の型:

list[Note]

Get featured notes of user.

Endpoint: /api/users/featured-notes

パラメータ:
  • limit (int, default=10) -- The maximum number of featured notes to return.

  • until_id (str, default=None) -- Get featured notes before this id.

戻り値:

A list of featured notes.

戻り値の型:

list[Note]

async get_followers(since_id: str | None = None, until_id: str | None = None, limit: int = 10, username: str | None = None, host: str | None = None) list[Follower]

Get followers of user.

Endpoint: /api/users/followers

パラメータ:
  • since_id (str, default=None) -- Get followers after this id.

  • until_id (str, default=None) -- Get followers before this id.

  • limit (int, default=10) -- The maximum number of followers to return.

  • username (str, default=None) -- Get followers with this username.

  • host (str, default=None) -- Get followers with this host.

戻り値:

A list of followers.

戻り値の型:

list[Follower]

async get_following(since_id: str | None = None, until_id: str | None = None, limit: int = 10, username: str | None = None, host: str | None = None, birthday: str | None = None) list[Following]

Get following of user.

Endpoint: /api/users/following

パラメータ:
  • since_id (str, default=None) -- Get following after this id.

  • until_id (str, default=None) -- Get following before this id.

  • limit (int, default=10) -- The maximum number of following to return.

  • username (str, default=None) -- Get following with this username.

  • host (str, default=None) -- Get following with this host.

戻り値:

A list of following.

戻り値の型:

list[Following]

async get_frequently_replied_users(limit: int = 10) list[FrequentlyRepliedUser]

Get frequently replied users of user.

Endpoint: /api/users/get-frequently-replied-users

パラメータ:
  • limit (int, default=10) -- The maximum number of frequently replied users to return.

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

戻り値:

A list of frequently replied users.

戻り値の型:

list[FrequentlyRepliedUser]

Get gallery posts of user.

Endpoint: /api/users/gallery/posts

パラメータ:
  • limit (int, default=10) -- The maximum number of gallery posts to return.

  • since_id (str, default=None) -- Get gallery posts after this id.

  • until_id (str, default=None) -- Get gallery posts before this id.

戻り値:

A list of gallery posts.

戻り値の型:

list[GalleryPost]

SharedUserActions

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

Get achievements of user.

Get all featured notes of user.

Endpoint: /api/users/featured-notes

パラメータ:
  • limit (int, default=10) -- The maximum number of featured notes to return.

  • until_id (str, default=None) -- Get featured notes before this id.

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

戻り値:

A list of featured notes.

戻り値の型:

list[Note]

Get featured notes of user.

Endpoint: /api/users/featured-notes

パラメータ:
  • limit (int, default=10) -- The maximum number of featured notes to return.

  • until_id (str, default=None) -- Get featured notes before this id.

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

戻り値:

A list of featured notes.

戻り値の型:

list[Note]

async get_followers(since_id: str | None = None, until_id: str | None = None, limit: int = 10, username: str | None = None, host: str | None = None, *, user_id: str) list[Follower]

Get followers of user.

Endpoint: /api/users/followers

パラメータ:
  • since_id (str, default=None) -- Get followers after this id.

  • until_id (str, default=None) -- Get followers before this id.

  • limit (int, default=10) -- The maximum number of followers to return.

  • username (str, default=None) -- Get followers with this username.

  • host (str, default=None) -- Get followers with this host.

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

戻り値:

A list of followers.

戻り値の型:

list[Follower]

async get_following(since_id: str | None = None, until_id: str | None = None, limit: int = 10, username: str | None = None, host: str | None = None, birthday: str | None = None, *, user_id: str) list[Following]

Get following of user.

Endpoint: /api/users/following

パラメータ:
  • since_id (str, default=None) -- Get following after this id.

  • until_id (str, default=None) -- Get following before this id.

  • limit (int, default=10) -- The maximum number of following to return.

  • username (str, default=None) -- Get following with this username.

  • host (str, default=None) -- Get following with this host.

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

戻り値:

A list of following.

戻り値の型:

list[Following]

async get_frequently_replied_users(limit: int = 10, *, user_id: str) list[FrequentlyRepliedUser]

Get frequently replied users of user.

Endpoint: /api/users/get-frequently-replied-users

パラメータ:
  • limit (int, default=10) -- The maximum number of frequently replied users to return.

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

戻り値:

A list of frequently replied users.

戻り値の型:

list[FrequentlyRepliedUser]

Get gallery posts of user.

Endpoint: /api/users/gallery/posts

パラメータ:
  • limit (int, default=10) -- The maximum number of gallery posts to return.

  • since_id (str, default=None) -- Get gallery posts after this id.

  • until_id (str, default=None) -- Get gallery posts before this id.

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

戻り値:

A list of gallery posts.

戻り値の型:

list[GalleryPost]

UserActions

Methods
class mipac.actions.user.UserActions(session: HTTPClient, client: ClientManager)
async fetch(user_id: str | None = None, user_ids: list[str] | None = None, username: str | None = None, host: str | None = None) UserDetailedNotMe | MeDetailed

Retrieve the latest user information using the target user ID or username. If you do not need the latest information, you should basically use the get method. This method accesses the server each time, which may increase the number of server accesses.

パラメータ:
  • user_id (str) -- target user id

  • username (str) -- target username

  • username -- target username

  • host (str, default=None) -- Hosts with target users

async get(user_id: str | None = None, user_ids: list[str] | None = None, username: str | None = None, host: str | None = None) UserDetailedNotMe | MeDetailed

Retrieve user information from the user ID using the cache. If there is no cache, fetch is automatically used. The fetch method is recommended if you want up-to-date user information.

パラメータ:
  • user_id (str) -- target user id

  • user_ids (list[str]) -- target user ids

  • username (str) -- target username

  • host (str, default=None) -- Hosts with target users

async get_me() MeDetailed

ログインしているユーザーの情報を取得します

get_mention(user: PartialUser) str

対象のユーザーのメンションを取得します

バージョン 0.6.3 で非推奨: mipac.models.user.PartialUser._get_mention() を使用することを推奨します。

パラメータ:

user (PartialUser) -- 対象のユーザー

戻り値:

メンション

戻り値の型:

str

async search(query: str, limit: int = 100, offset: int = 0, origin: Literal['local', 'remote', 'combined'] = 'combined', detail: Literal[False] = True, *, get_all: bool = False) AsyncGenerator[PartialUser, None]
async search(query: str, limit: int = 100, offset: int = 0, origin: Literal['local', 'remote', 'combined'] = 'combined', detail: Literal[True] = True, *, get_all: bool = False) AsyncGenerator[UserDetailedNotMe | MeDetailed, None]

Search users by keyword.

パラメータ:
  • query (str) -- Keyword to search.

  • limit (int, default=100) -- The maximum number of users to return.

  • offset (int, default=0) -- The number of users to skip.

  • origin (Literal['local', 'remote', 'combined'], default='combined') -- The origin of users to search.

  • detail (Literal[True, False], default=True) -- Whether to return detailed user information.

  • get_all (bool, default=False) -- Whether to return all users.

async search_by_username_and_host(username: str, host: str, limit: int = 100, detail: bool = True) list[UserDetailedNotMe | MeDetailed | PartialUser]

Search users by username and host.

パラメータ:
  • username (str) -- Username of user.

  • host (str) -- Host of user.

  • limit (int, default=100) -- The maximum number of users to return.

  • detail (bool, default=True) -- Weather to get detailed user information.

戻り値:

A list of users.

戻り値の型:

list[UserDetailedNotMe | MeDetailed | PartialUser]

UsernameActions

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

FederationActions

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

ClientFavoriteActions

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

FavoriteActions

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

SharedFavoriteActions

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

ClientActions

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

ChartActions

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

ClientFollowActions

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

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

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

戻り値:

The user that you followed

戻り値の型:

UserLite

async invalidate() PartialUser

Make the user unfollows you

戻り値:

The user that followed you

戻り値の型:

PartialUser

async remove() PartialUser

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

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

戻り値:

The user that you unfollowed

戻り値の型:

PartialUser

FollowActions

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

FollowRequestActions

Methods
class mipac.actions.follow.FollowRequestActions(user_id: str | None = None, *, session: HTTPClient, client: ClientManager)
async accept(user_id: str | None = None) bool

Accept a follow request

パラメータ:

user_id (str) -- The user ID to accept

戻り値:

Whether the request was accepted

戻り値の型:

bool

async cancel(user_id: str | None = None) PartialUser

Cancel a follow request

パラメータ:

user_id (str) -- The user ID to cancel

戻り値:

The user that you canceled to follow

戻り値の型:

PartialUser

async get_all() list[FollowRequest]

Get all follow requests

戻り値:

List of follow requests

戻り値の型:

list[FollowRequest]

async reject(user_id: str | None = None) bool

Reject a follow request

パラメータ:

user_id (str) -- The user ID to reject

戻り値:

Whether the request was rejected

戻り値の型:

bool

SharedFollowActions

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

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

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

戻り値:

The user that you followed

戻り値の型:

UserLite

async invalidate(*, user_id: str) PartialUser

Make the user unfollows you

戻り値:

The user that followed you

戻り値の型:

PartialUser

remove(*, user_id: str) PartialUser

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

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

戻り値:

The user that you unfollowed

戻り値の型:

PartialUser

ChannelActions

Methods
class mipac.actions.channel.ChannelActions(*, session: HTTPClient, client: ClientManager)
async create(name: str, color: str = MISSING, description: str = MISSING, banner_id: str = MISSING, is_sensitive: bool = MISSING, allow_renote_to_external: bool = MISSING) Channel

チャンネルを作成します

Endpoint: /api/channels/create

パラメータ:
  • name (str) -- チャンネル名

  • color (str) -- チャンネルの色, default=MISSING

  • description (str) -- チャンネルの説明, default=MISSING

  • banner_id (str) -- チャンネルのバナーに使用するファイルのID, default=MISSING

  • is_sensitive (bool) -- チャンネルがセンシティブかどうか, default=MISSING

  • allow_renote_to_external (bool, optional) -- 外部へのリノートを許可するかどうか, default=MISSING

戻り値:

作成したチャンネル

戻り値の型:

Channel

async featured() list[Channel]

トレンドのチャンネルを取得します

Endpoint: /api/channels/featured

戻り値:

取得したチャンネルのリスト

戻り値の型:

list[Channel]

async get_all_followed(since_id: str | None = None, until_id: str | None = None, limit: int = 5) AsyncGenerator[Channel, None]

フォロー中のすべてのチャンネルを取得します

Endpoint: /api/channels/followed

パラメータ:
  • since_id (str | None) -- 指定したチャンネルIDよりも後のチャンネルを取得します, default=None

  • until_id (str | None) -- 指定したチャンネルIDよりも前のチャンネルを取得します, default=None

  • limit (int, optional) -- 一度に取得するチャンネルの数, default=5

戻り値:

取得したフォロー中のチャンネル

戻り値の型:

AsyncGenerator[Channel, None]

async get_all_owned(since_id: str | None = None, until_id: str | None = None, limit: int = 5) AsyncGenerator[Channel, None]

自分が所有しているすべてのチャンネルを取得します

Endpoint: /api/channels/owned

パラメータ:
  • since_id (str, optional) -- 指定したチャンネルIDよりも後のチャンネルを取得します, default=None

  • until_id (str, optional) -- 指定したチャンネルIDよりも前のチャンネルを取得します, default=None

  • limit (int, optional) -- 一度に取得するチャンネルの数, default=5

戻り値:

取得した自分が所有しているチャンネル

戻り値の型:

AsyncGenerator[Channel, None]

async my_favorites() list[Channel]

自分がお気に入りにしているチャンネルを取得します

Endpoint: /api/channels/myFavorites

戻り値:

取得したチャンネルのリスト

戻り値の型:

list[Channel]

async owned(since_id: str | None = None, until_id: str | None = None, limit: int = 5) list[Channel]

自分が所有しているチャンネル一覧を取得します

Endpoint: /api/channels/owned

パラメータ:
  • since_id (str, optional) -- 指定したチャンネルIDよりも後のチャンネルを取得します, default=None

  • until_id (str, optional) -- 指定したチャンネルIDよりも前のチャンネルを取得します, default=None

  • limit (int, optional) -- 一度に取得するチャンネルの数, default=5

戻り値:

取得した自分が所有しているチャンネルのリスト

戻り値の型:

list[Channel]

async search(query: str, type: Literal['nameAndDescription', 'nameOnly'] = 'nameAndDescription', since_id: str | None = None, until_id: str | None = None, limit: int = 5) list[Channel]

チャンネルを検索します

Endpoint: /api/channels/search

パラメータ:
  • query (str) -- 検索するキーワード

  • type (Literal["nameAndDescription","nameOnly"]) -- 検索に用いる形式, default="nameAndDescription"

  • since_id (str | None) -- 指定したIDのチャンネルより後のチャンネルを取得します, default=None

  • until_id (str, optional) -- 指定したIDのチャンネルより前のチャンネルを取得します, default=None

  • limit (int, optional) -- 一度に取得するチャンネルの数, default=5

戻り値:

見つかったチャンネルのリスト

戻り値の型:

list[Channel]

async show(channel_id: str) Channel

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

Endpoint: /api/channels/show

パラメータ:

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

戻り値:

取得したチャンネル

戻り値の型:

Channel

ClientChannelActions

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

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

Endpoint: /api/channels/favorite

戻り値:

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

戻り値の型:

bool

async follow() bool

チャンネルをフォローします

Endpoint: /api/channels/follow

戻り値:

チャンネルをフォローしているかどうか

戻り値の型:

bool

async get_all_timeline(since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None) AsyncGenerator[Note, None]

チャンネルのタイムラインを全て取得します

Endpoint: /api/channels/timeline

パラメータ:
  • limit (int) -- 一度に取得する件数, default=10

  • since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (int | None) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (int | None) -- 指定した日付のノートより前のノートを取得します, default=None

戻り値:

取得したノートのリスト

戻り値の型:

AsyncGenerator[Note, None]

async send(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None) Note

ノートを投稿します

Endpoint: /api/notes/create

パラメータ:
  • text (str, optional) -- ノートのテキスト, default=None

  • visibility (INoteVisibility, optional) -- ノートの公開範囲, default="public"

  • visible_user_ids (list[str], optional) -- 公開するユーザーのIDを持つリスト, default=None

  • cw (str, optional) -- ノートが閲覧注意(NSFW)であるか, default=None

  • local_only (bool, optional) -- ノートをローカルのみにするか否か, default=False

  • reaction_acceptance (IReactionAcceptance, optional) -- ノートにリアクションを受け入れるか否か, default=None

  • extract_mentions (bool, optional) -- メンションを抽出するかであるか, default=True

  • extract_hashtags (bool, optional) -- ハッシュタグを抽出するかであるか, default=True

  • extract_emojis (bool, optional) -- 絵文字を抽出するかであるか, default=True

  • reply_id (str, optional) -- 返信元のノートID, default=None

  • renote_id (str, optional) -- リノート元のID, default=None

  • files (list[MiFile | File | str], optional) -- 添付するファイル, default=None

  • poll (MiPoll, optional) -- アンケート, default=None

戻り値:

Created note

戻り値の型:

Note

async timeline(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None) list[Note]

チャンネルのタイムラインを取得します

Endpoint: /api/channels/timeline

パラメータ:
  • limit (int) -- 一度に取得する件数, default=10

  • since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (int | None) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (int | None) -- 指定した日付のノートより前のノートを取得します, default=None

戻り値:

取得したノートのリスト

戻り値の型:

list[Note]

async unfavorite() bool

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

Endpoint: /api/channels/unfavorite

戻り値:

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

戻り値の型:

bool

async unfollow() bool

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

Endpoint: /api/channels/unfollow

戻り値:

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

戻り値の型:

bool

async update(name: str | None = MISSING, description: str | None = MISSING, banner_id: str | None = MISSING, is_archived: bool | None = MISSING, pinned_note_ids: list[str] | None = MISSING, color: str | None = MISSING, is_sensitive: bool | None = MISSING, allow_renote_to_external: bool | None = MISSING) Channel

チャンネルの情報を更新します

Endpoint: /api/channels/update

パラメータ:
  • name (str | None) -- チャンネル名, default=MISSING

  • description (str | None) -- チャンネルの説明, default=MISSING

  • banner_id (str | None) -- バナー画像のID, default=MISSING

  • is_archived (bool | None) -- チャンネルがアーカイブされているかどうか, default=MISSING

  • pinned_note_ids (list[str] | None) -- ピン留めするノートのIDリスト, default=MISSING

  • color (str | None) -- チャンネルの色, default=MISSING

  • is_sensitive (bool | None) -- チャンネルがセンシティブかどうか, default=MISSING

  • allow_renote_to_external (bool | None) -- 外部へのリノートを許可するかどうか, default=MISSING

戻り値:

更新後のチャンネル

戻り値の型:

Channel

SharedChannelActions

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

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

Endpoint: /api/channels/favorite

パラメータ:

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

戻り値:

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

戻り値の型:

bool

async follow(*, channel_id: str) bool

チャンネルをフォローします

Endpoint: /api/channels/follow

パラメータ:

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

戻り値:

チャンネルをフォローしたかどうか

戻り値の型:

bool

async get_all_timeline(since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None, *, channel_id: str) AsyncGenerator[Note, None]

チャンネルのタイムラインを全て取得します

Endpoint: /api/channels/timeline

パラメータ:
  • limit (int) -- 一度に取得する件数, default=10

  • since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (int | None) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (int | None) -- 指定した日付のノートより前のノートを取得します, default=None

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

戻り値:

取得したノートのリスト

戻り値の型:

AsyncGenerator[Note, None]

async send(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None, *, channel_id: str) Note

ノートを投稿します

Endpoint: /api/notes/create

パラメータ:
  • text (str, optional) -- ノートのテキスト, default=None

  • visibility (INoteVisibility, optional) -- ノートの公開範囲, default="public"

  • visible_user_ids (list[str], optional) -- 公開するユーザーのIDs, default=None

  • cw (str, optional) -- ノートのCW, default=None

  • local_only (bool, optional) -- ノートをローカルのみにするかどうか, default=False

  • reaction_acceptance (IReactionAcceptance, optional) -- ノートにリアクションを受け入れるか, default=None

  • extract_mentions (bool, optional) -- メンションを抽出するかどうか, default=True

  • extract_hashtags (bool, optional) -- ハッシュタグを抽出するかどうか, default=True

  • extract_emojis (bool, optional) -- 絵文字を抽出するかどうか, default=True

  • reply_id (str, optional) -- リプライのID, default=None

  • renote_id (str, optional) -- リノートのID, default=None

  • files (list[MiFile | File | str], optional) -- 添付するファイル, default=None

  • poll (MiPoll, optional) -- アンケート, default=None

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

戻り値:

Created note

戻り値の型:

Note

async timeline(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None, *, channel_id: str) list[Note]

チャンネルのタイムラインを取得します

Endpoint: /api/channels/timeline

パラメータ:
  • limit (int) -- 一度に取得する件数, default=10

  • since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (int | None) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (int | None) -- 指定した日付のノートより前のノートを取得します, default=None

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

戻り値:

取得したノートのリスト

戻り値の型:

list[Note]

async unfavorite(*, channel_id: str) bool

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

Endpoint: /api/channels/unfavorite

パラメータ:

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

戻り値:

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

戻り値の型:

bool

async unfollow(*, channel_id: str) bool

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

Endpoint: /api/channels/unfollow

パラメータ:

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

戻り値:

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

戻り値の型:

bool

async update(name: str | None = MISSING, description: str | None = MISSING, banner_id: str | None = MISSING, is_archived: bool | None = MISSING, pinned_note_ids: list[str] | None = MISSING, color: str | None = MISSING, is_sensitive: bool | None = MISSING, allow_renote_to_external: bool | None = MISSING, *, channel_id: str) Channel

チャンネルの情報を更新します

Endpoint: /api/channels/update

パラメータ:
  • name (str | None) -- チャンネル名, default=MISSING

  • description (str | None) -- チャンネルの説明, default=MISSING

  • banner_id (str | None) -- バナー画像のID, default=MISSING

  • is_archived (bool | None) -- チャンネルがアーカイブされているかどうか, default=MISSING

  • pinned_note_ids (list[str] | None) -- ピン留めするノートのIDリスト, default=MISSING

  • color (str | None) -- チャンネルの色, default=MISSING

  • is_sensitive (bool | None) -- チャンネルがセンシティブかどうか, default=MISSING

  • allow_renote_to_external (bool | None) -- 外部へのリノートを許可するかどうか, default=MISSING

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

戻り値:

更新後のチャンネル

戻り値の型:

Channel

ClientPollActions

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

PollActions

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

SharedPollActions

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

ClientInviteActions

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

Delete an invite code.

戻り値:

Whether the invite code was deleted.

戻り値の型:

bool

InviteActions

Methods
class mipac.actions.invite.InviteActions(*, session: HTTPClient, client: ClientManager)
async create() InviteCode

Create a new invite code.

Endpoint: /api/invite/create

戻り値:

The invite code created.

戻り値の型:

PartialInviteCode

async get_all_list(since_id: str | None = None, until_id: str | None = None) AsyncGenerator[InviteCode, None]

Get all invite codes created by you.

Endpoint: /api/invite/list

パラメータ:
  • since_id (str | None, optional) -- The id of the invite code to get since, by default None

  • until_id (str | None, optional) -- The id of the invite code to get until, by default None

戻り値:

The list of invite codes.

戻り値の型:

list[PartialInviteCode]

async get_limit() InviteLimit

Get the number of invite codes you can create.

Endpoint: /api/invite/limit

戻り値:

The number of invite codes you can create.

戻り値の型:

int

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

Get a list of invitation codes created by you.

Endpoint: /api/invite/list

パラメータ:
  • limit (int, optional) -- The number of invite codes to get, by default 30

  • since_id (str | None, optional) -- The id of the invite code to get since, by default None

  • until_id (str | None, optional) -- The id of the invite code to get until, by default None

戻り値:

The list of invite codes.

戻り値の型:

list[PartialInviteCode]

SharedInviteActions

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

Delete an invite code.

パラメータ:

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

戻り値:

Whether the invite code was deleted.

戻り値の型:

bool

HashtagActions

Methods
class mipac.actions.hashtag.HashtagActions(*, session: HTTPClient, client: ClientManager)
async get_list(sort: Literal['+mentionedUsers', '-mentionedUsers', '+mentionedLocalUsers', '-mentionedLocalUsers', '+mentionedRemoteUsers', '-mentionedRemoteUsers', '+attachedUsers', '-attachedUsers', '+attachedLocalUsers', '-attachedLocalUsers', '+attachedRemoteUsers', '-attachedRemoteUsers'], limit: int = 10, attached_to_user_only: bool = False, attached_to_local_user_only: bool = False, attached_to_remote_user_only: bool = False) list[Hashtag]

ハッシュタグのリストを取得します。

パラメータ:
  • sort (Literal[) -- "+mentionedUsers", "-mentionedUsers", "+mentionedLocalUsers", "-mentionedLocalUsers", "+mentionedRemoteUsers", "-mentionedRemoteUsers", "+attachedUsers", "-attachedUsers", "+attachedLocalUsers", "-attachedLocalUsers", "+attachedRemoteUsers", "-attachedRemoteUsers",

  • ] -- ソートの方法を指定します。

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

  • attached_to_user_only (bool, optional) -- ユーザーに添付されたハッシュタグのみを取得するかどうかを指定します, default=False

  • attached_to_local_user_only (bool, optional) -- ローカルユーザーに添付されたハッシュタグのみを取得するかどうかを指定します, default=False

  • attached_to_remote_user_only (bool, optional) -- リモートユーザーに添付されたハッシュタグのみを取得するかどうかを指定します, default=False

戻り値:

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

戻り値の型:

list[Hashtag]

async get_trend()

トレンドのハッシュタグを取得します。

戻り値:

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

戻り値の型:

list[TrendHashtag]

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

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

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

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

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

戻り値:

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

戻り値の型:

list[Hashtag]

async show(tag: str)

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

パラメータ:

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

戻り値:

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

戻り値の型:

Hashtag

EmojiActions

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

MyActions

Methods
class mipac.actions.my.MyActions(session: HTTPClient, client: ClientManager)
async get_claim_achievement(name: Literal['notes1', 'notes10', 'notes100', 'notes500', 'notes1000', 'notes5000', 'notes10000', 'notes20000', 'notes30000', 'notes40000', 'notes50000', 'notes60000', 'notes70000', 'notes80000', 'notes90000', 'notes100000', 'login3', 'login7', 'login15', 'login30', 'login60', 'login100', 'login200', 'login300', 'login400', 'login500', 'login600', 'login700', 'login800', 'login900', 'login1000', 'passedSinceAccountCreated1', 'passedSinceAccountCreated2', 'passedSinceAccountCreated3', 'loggedInOnBirthday', 'loggedInOnNewYearsDay', 'noteClipped1', 'noteFavorited1', 'myNoteFavorited1', 'profileFilled', 'markedAsCat', 'following1', 'following10', 'following50', 'following100', 'following300', 'followers1', 'followers10', 'followers50', 'followers100', 'followers300', 'followers500', 'followers1000', 'collectAchievements30', 'viewAchievements3min', 'iLoveMisskey', 'foundTreasure', 'client30min', 'client60min', 'noteDeletedWithin1min', 'postedAtLateNight', 'postedAt0min0sec', 'selfQuote', 'htl20npm', 'viewInstanceChart', 'outputHelloWorldOnScratchpad', 'open3windows', 'driveFolderCircularReference', 'reactWithoutRead', 'clickedClickHere', 'justPlainLucky', 'setNameToSyuilo', 'cookieClicked', 'brainDiver']) bool

指定した名前の実績を解除します

パラメータ:

name (実績名) -- 解除したい実績の名前

戻り値:

成功したか否か

戻り値の型:

bool

例外:

NotSupportVersion -- 実績機能が存在しないサーバーを使用している

create_note_body

mipac.actions.note.create_note_body(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, media_ids: list[str] | None = None, poll: MiPoll | None = None)

ClientNoteActions

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

Add a note to the clip

Endpoint: /api/clips/add-note

パラメータ:

clip_id (str) -- clip id

戻り値:

success or not

戻り値の型:

bool

async create_quote(content: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None) Note

Create a note quote.

Endpoint: /api/notes/create

パラメータ:
  • content (str | None, default=None) -- text

  • visibility (INoteVisibility, default='public') -- Disclosure range

  • visible_user_ids (list[str] | None, default=None) -- List of users to be published

  • cw (str | None, default=None) -- Text to be displayed when warning is given

  • local_only (bool, default=False) -- Whether to show only locally or not

  • extract_mentions (bool, default=True) -- Whether to expand the mention

  • extract_hashtags (bool, default=True) -- Whether to expand the hashtag

  • extract_emojis (bool, default=True) -- Whether to expand the emojis

  • files (list[MiFile | File | str] | None, default=None) -- The ID list of files to be attached

  • poll (MiPoll | None, default=None) -- Questionnaire to be created

async create_renote() Note

Renote a note

Endpoint: /api/notes/create

戻り値:

Renoted note

戻り値の型:

Note

async delete() bool

Delete a note

Endpoint: /api/notes/delete

パラメータ:

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

戻り値:

success or not

戻り値の型:

bool

async fetch_children(limit: int = 100, since_id: str | None = None, untilId: str | None = None) list[Note]

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

Endpoint: /api/notes/children

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

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

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

戻り値:

Children of the note

戻り値の型:

list[Note]

async fetch_state() NoteState

Get the state of the note.

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

Endpoint: /api/notes/state

戻り値:

Note state

戻り値の型:

NoteState

async get_all_children(limit: int = 10, since_id: str | None = None, untilId: str | None = None) AsyncGenerator[Note, None]

Get all children of the note

Endpoint: /api/notes/children

パラメータ:
  • since_id (str | None, default=None) -- Since ID

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

戻り値:

Children of the note

戻り値の型:

AsyncGenerator[Note, None]

async get_all_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10) AsyncGenerator[Note, None]

Get replies to the note

Endpoint: /api/notes/replies

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

  • until_id (str | None, default=None) -- until id

戻り値:

replies

戻り値の型:

AsyncGenerator[Note, None]

async get_clips() list[Clip]

Get the clips of the note

Endpoint: /api/notes/clips

戻り値:

Clips of the note

戻り値の型:

list[Clip]

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

Get the conversation of the note

Endpoint: /api/notes/conversation

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

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

戻り値:

Notes of the conversation

戻り値の型:

list[Note]

async get_renotes(limit: int = 10, since_id: str | None = None, until_id: str | None = None) list[Note]

Get renote of the note

Endpoint: /api/notes/renotes

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

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

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

戻り値:

Renotes of the note

戻り値の型:

list[Note]

async get_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10) list[Note]

Get replies to the note

Endpoint: /api/notes/replies

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

  • until_id (str | None, default=None) -- until id

  • limit (int, default=10) -- limit

戻り値:

replies

戻り値の型:

list[Note]

async get_state() NoteState

Get the state of the note

Endpoint: /api/notes/state

戻り値:

Note state

戻り値の型:

NoteState

async renote(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None)

Renote a note

Endpoint: /api/notes/create

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

  • visibility (INoteVisibility, default='public') -- Disclosure range

  • visible_user_ids (list[str] | None, default=None) -- List of users to be published

  • cw (str | None, default=None) -- Text to be displayed when warning is given

  • local_only (bool, default=False) -- Whether to show only locally or not

  • reaction_acceptance (IReactionAcceptance, default=None) -- Reaction acceptance setting

  • extract_mentions (bool, default=True) -- Whether to expand the mention

  • extract_hashtags (bool, default=True) -- Whether to expand the hashtag

  • extract_emojis (bool, default=True) -- Whether to expand the emojis

  • channel_id (str | None, default=None) -- Channel ID

  • files (list[MiFile | File | str] | None, default=None) -- The ID list of files to be attached

  • poll (MiPoll | None, default=None)

async translate(target_lang: str = 'en-US') NoteTranslateResult

Translate a note

Endpoint: /api/notes/translate

パラメータ:

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

戻り値:

Translated result

戻り値の型:

NoteTranslateResult

async un_renote() bool

Releases the note renote for the specified Id

戻り値:

Whether the release was successful

戻り値の型:

bool

NoteActions

class mipac.actions.note.NoteActions(*, session: HTTPClient, client: ClientManager)
async fetch(note_id: str) Note

Get a note.

update the cache of the mipac.actions.note.NoteActions.get() method

Endpoint: /api/notes/show

パラメータ:

note_id (str) -- note id

戻り値:

note

戻り値の型:

Note

async get(note_id: str) Note

Get a note

Endpoint: /api/notes/show

パラメータ:

note_id (str) -- ノートのID

戻り値:

取得したノートID

戻り値の型:

Note

ノートを検索します

Endpoint: /api/notes/search

パラメータ:
  • query (str) -- 検索クエリ

  • since_id (str | None, default=None) -- このIDより後のノートを取得します

  • until_id (str | None, default=None) -- このIDより前のノートを取得します

  • limit (int, default=10) -- 取得するノートの数

  • offset (int, default=0) -- オフセット

  • host (str | None, default=None) -- 対象のサーバー localhostは . で表現します

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

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

戻り値:

検索結果

戻り値の型:

AsyncGenerator[Note, None]

async get_all_search_by_tag(tag: str, reply: bool | None = None, renote: bool | None = None, with_files: bool | None = None, poll: bool | None = None, since_id: str | None = None, until_id: str | None = None, limit: int = 10, query: list[list[str]] | None = None) AsyncGenerator[Note, None]

一致するタグのノートを取得します

Endpoint: /api/notes/search-by-tag

戻り値:

見つかったノート

戻り値の型:

AsyncGenerator[Note, None]

Get featured notes

Endpoint: /api/notes/featured

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

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

  • channel_id (str | None, default=None) -- channel id

戻り値:

featured notes

戻り値の型:

list[Note]

async get_global_time_line(with_files: bool = False, with_renotes: bool = True, limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None)

Get global timeline

Endpoint: /api/notes/global-timeline

パラメータ:
  • with_files (bool, default=False) -- Whether to include files

  • with_renotes (bool, default=True) -- Whether to include renote

  • limit (int, default=10) -- limit

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

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

  • since_date (int | None, default=None) -- Since date

  • until_date (int | None, default=None) -- Until date

戻り値:

global timeline

戻り値の型:

list[Note]

async get_mentions(following: bool = False, limit: int = 10, since_id: str | None = None, until_id: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public')

Get notes with mentions addressed to you

Endpoint: /api/notes/mentions

パラメータ:
  • following (bool, default=False) -- Whether to include only users you follow

  • limit (int, default=10) -- limit

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

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

  • visibility (INoteVisibility, default='public') -- Disclosure range

async get_time_line(list_id: str, limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: int | None = None, until_date: int | None = None, include_renote_my_notes: bool = True, include_local_renotes: bool = True, with_renotes: bool = True, with_files: bool = True) list[Note]

Get the timeline of the specified list

Endpoint: /api/notes/user-list-timeline

パラメータ:
  • list_id (str) -- List ID

  • limit (int, default=10) -- limit

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

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

  • since_date (int | None, default=None) -- Since date

  • until_date (int | None, default=None) -- Until date

  • include_renote_my_notes (bool, default=True) -- Whether to include your own renote

  • include_local_renotes (bool, default=True) -- Whether to include local renote

  • with_renotes (bool, default=True) -- Whether to include renote

  • with_files (bool, default=True) -- Whether to include files

戻り値の型:

list[Note]

メモ

async search(query: str, since_id: str | None = None, until_id: str | None = None, limit: int = 10, offset: int = 0, host: str | None = None, user_id: str | None = None, channel_id: str | None = None)

ノートを検索します

Endpoint: /api/notes/search

パラメータ:
  • query (str) -- 検索クエリ

  • since_id (str | None, default=None) -- このIDより後のノートを取得します

  • until_id (str | None, default=None) -- このIDより前のノートを取得します

  • limit (int, default=10) -- 取得するノートの数

  • offset (int, default=0) -- オフセット

  • host (str | None, default=None) -- 対象のサーバー localhostは . で表現します

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

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

戻り値:

検索結果

戻り値の型:

list[Note]

async search_by_tag(tag: str, reply: bool | None = None, renote: bool | None = None, with_files: bool | None = None, poll: bool | None = None, since_id: str | None = None, until_id: str | None = None, limit: int = 10, query: list[list[str]] | None = None)

一致するタグのノートを取得します

Endpoint: /api/notes/search-by-tag

戻り値:

見つかったノート

戻り値の型:

list[Note]

send(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, reply_id: str | None = None, renote_id: str | None = None, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None) Note

Send a note

Endpoint: /api/notes/create

パラメータ:
  • text (str | None, default=None) -- 投稿する内容

  • visibility (INoteVisibility, optional) -- 公開範囲, by default "public" Enum: "public" "home" "followers" "specified"

  • visible_user_ids (list[str] | None, optional) -- 公開するユーザー, by default None

  • cw (str | None, optional) -- 閲覧注意の文字, by default None

  • local_only (bool, optional) -- ローカルにのみ表示するか, by default False

  • reaction_acceptance (IReactionAcceptance, optional) -- リアクションの受け入れ設定, by default None

  • extract_mentions (bool, optional) -- メンションを展開するか, by default True

  • extract_hashtags (bool, optional) -- ハッシュタグを展開するか, by default True

  • extract_emojis (bool, optional) -- 絵文字を展開するか, by default True

  • reply_id (str | None, optional) -- リプライ先のid, by default None

  • renote_id (str | None, optional) -- リノート先のid, by default None

  • channel_id (str | None, optional) -- チャンネルid, by default None

  • files (list[MiFile | File | str], optional) -- 添付するファイルのリスト, by default None

  • poll (MiPoll | None, optional) -- アンケート, by default None

戻り値:

投稿したノート

戻り値の型:

Note

例外:

ContentRequired -- [description]

SharedNoteActions

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

Add a note to the clip

Endpoint: /api/clips/add-note

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

  • clip_id (str) -- clip id

戻り値:

success or not

戻り値の型:

bool

async create_quote(content: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None, *, note_id: str) Note

Create a note quote.

Endpoint: /api/notes/create

パラメータ:
  • content (str | None, default=None) -- text

  • visibility (INoteVisibility, default='public') -- Disclosure range

  • visible_user_ids (list[str] | None, default=None) -- List of users to be published

  • cw (str | None, default=None) -- Text to be displayed when warning is given

  • local_only (bool, default=False) -- Whether to show only locally or not

  • extract_mentions (bool, default=True) -- Whether to expand the mention

  • extract_hashtags (bool, default=True) -- Whether to expand the hashtag

  • extract_emojis (bool, default=True) -- Whether to expand the emojis

  • files (list[MiFile | File | str] | None, default=None) -- The ID list of files to be attached

  • poll (MiPoll | None, default=None) -- Questionnaire to be created

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

async create_renote(*, note_id: str) Note

Renote a note

Endpoint: /api/notes/create

パラメータ:

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

戻り値:

Renoted note

戻り値の型:

Note

async delete(*, note_id: str) bool

Delete a note

Endpoint: /api/notes/delete

パラメータ:

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

戻り値:

success or not

戻り値の型:

bool

async fetch_children(limit: int = 100, since_id: str | None = None, untilId: str | None = None, *, note_id: str) list[Note]

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

Endpoint: /api/notes/children

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

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

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

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

戻り値:

Children of the note

戻り値の型:

list[Note]

async fetch_state(*, note_id: str) NoteState

Get the state of the note.

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

Endpoint: /api/notes/state

パラメータ:

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

戻り値:

Note state

戻り値の型:

NoteState

async get_all_children(limit: int = 10, since_id: str | None = None, untilId: str | None = None, *, note_id: str) AsyncGenerator[Note, None]

Get all children of the note

Endpoint: /api/notes/children

パラメータ:
  • since_id (str | None, default=None) -- Since ID

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

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

戻り値:

Children of the note

戻り値の型:

AsyncGenerator[Note, None]

async get_all_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, note_id: str) AsyncGenerator[Note, None]

Get replies to the note

Endpoint: /api/notes/replies

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

  • until_id (str | None, default=None) -- until id

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

戻り値:

replies

戻り値の型:

AsyncGenerator[Note, None]

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

Get the clips of the note

Endpoint: /api/notes/clips

パラメータ:

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

戻り値:

Clips of the note

戻り値の型:

list[Clip]

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

Get the conversation of the note

Endpoint: /api/notes/conversation

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

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

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

戻り値:

Notes of the conversation

戻り値の型:

list[Note]

async get_renotes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, *, note_id: str) list[Note]

Get renote of the note

Endpoint: /api/notes/renotes

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

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

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

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

戻り値:

Renotes of the note

戻り値の型:

list[Note]

async get_replies(since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, note_id: str) list[Note]

Get replies to the note

Endpoint: /api/notes/replies

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

  • until_id (str | None, default=None) -- until id

  • limit (int, default=10) -- limit

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

戻り値:

replies

戻り値の型:

list[Note]

async get_state(*, note_id: str) NoteState

Get the state of the note

Endpoint: /api/notes/state

パラメータ:

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

戻り値:

Note state

戻り値の型:

NoteState

async renote(text: str | None = None, visibility: Literal['public', 'home', 'followers', 'specified'] = 'public', visible_user_ids: list[str] | None = None, cw: str | None = None, local_only: bool = False, reaction_acceptance: Literal[None, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'] = None, extract_mentions: bool = True, extract_hashtags: bool = True, extract_emojis: bool = True, channel_id: str | None = None, files: list[MiFile | File | str] | None = None, poll: MiPoll | None = None, *, renote_id: str)

Renote a note

Endpoint: /api/notes/create

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

  • visibility (INoteVisibility, default='public') -- Disclosure range

  • visible_user_ids (list[str] | None, default=None) -- List of users to be published

  • cw (str | None, default=None) -- Text to be displayed when warning is given

  • local_only (bool, default=False) -- Whether to show only locally or not

  • reaction_acceptance (IReactionAcceptance, default=None) -- Reaction acceptance setting

  • extract_mentions (bool, default=True) -- Whether to expand the mention

  • extract_hashtags (bool, default=True) -- Whether to expand the hashtag

  • extract_emojis (bool, default=True) -- Whether to expand the emojis

  • channel_id (str | None, default=None) -- Channel ID

  • files (list[MiFile | File | str] | None, default=None) -- The ID list of files to be attached

  • poll (MiPoll | None, default=None)

async translate(target_lang: str = 'en-US', *, note_id: str) NoteTranslateResult

Translate a note

Endpoint: /api/notes/translate

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

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

戻り値:

Translated result

戻り値の型:

NoteTranslateResult

async un_renote(*, note_id: str) bool

Releases the note renote for the specified Id

パラメータ:

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

戻り値:

Whether the release was successful

戻り値の型:

bool

ClientClipActions

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

Add a note to a clip

パラメータ:

note_id (str) -- The note id

戻り値:

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

戻り値の型:

bool

async delete() bool

Delete a clip

戻り値:

True if the clip was deleted, False otherwise

戻り値の型:

bool

async get_all_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None) AsyncGenerator[Note, None]

Get notes from a clip

パラメータ:
  • limit (int, optional, default=10) -- The number of notes to get

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

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

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

列挙:

AsyncGenerator[Note, None] -- The notes

async remove_note(note_id: str) bool

Remove a note from a clip

パラメータ:

note_id (str) -- The note id

戻り値:

True if the note was removed from the clip, False otherwise

戻り値の型:

bool

async update(name: str, is_public: bool | None = None, description: str | None = None) Clip

Update a clip

パラメータ:
  • name (str) -- The clip name

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

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

戻り値:

True if the clip was updated, False otherwise

戻り値の型:

bool

ClipActions

Methods
class mipac.actions.clip.ClipActions(*, session: HTTPClient, client: ClientManager)
async create(name: str, is_public: bool = False, description: str | None = None) Clip

Create a clip

パラメータ:
  • name (str) -- The clip name

  • is_public (bool, optional) -- Whether the clip is public, default=False

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

戻り値:

The created clip

戻り値の型:

Clip

async get(clip_id: str) Clip

Get a clip

パラメータ:

clip_id (str) -- The clip id

戻り値:

The clip

戻り値の型:

Clip

async get_list() list[Clip]

Get my clips

戻り値:

The clips

戻り値の型:

list[Clip]

async get_my_favorites()

Get my favorite clips

戻り値:

The favorite clips

戻り値の型:

list[Clip]

SharedClipActions

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

Add a note to a clip

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

  • note_id (str) -- The note id

戻り値:

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

戻り値の型:

bool

async delete(*, clip_id: str) bool

Delete a clip

パラメータ:

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

戻り値:

True if the clip was deleted, False otherwise

戻り値の型:

bool

async get_all_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, *, clip_id: str) AsyncGenerator[Note, None]

Get notes from a clip

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

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

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

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

列挙:

AsyncGenerator[Note, None] -- The notes

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

Remove a note from a clip

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

  • note_id (str) -- The note id

戻り値:

True if the note was removed from the clip, False otherwise

戻り値の型:

bool

async update(name: str, is_public: bool | None = None, description: str | None = None, *, clip_id: str) Clip

Update a clip

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

  • name (str) -- The clip name

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

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

戻り値:

True if the clip was updated, False otherwise

戻り値の型:

bool

BlockingActions

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

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

async get_all_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None) AsyncGenerator[Blocking, None]

すべてのブロックしているユーザーの一覧を取得します

Endpoint: /api/blocking/list

パラメータ:
  • limit (int, optional) -- 一度に取得する件数, default=30

  • since_id (str | None, optional) -- 指定したIDのユーザーより前のユーザーを取得します, default=None

  • until_id (str | None, optional) -- 指定したIDのユーザーより前のユーザーを取得します, default=None

列挙:

AsyncGenerator[Blocking, None] -- ブロックしているユーザーの一覧

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

ブロックしているユーザーの一覧を取得します

Endpoint: /api/blocking/list

パラメータ:
  • since_id (str | None, optional) -- 指定したIDのユーザーより後のユーザーを取得します, default=None

  • until_id (str | None, optional) -- 指定したIDのユーザーより前のユーザーを取得します, default=None

  • limit (int, optional) -- 一度に取得する件数, default=100

戻り値:

ブロックしているユーザーの一覧

戻り値の型:

list[Blocking]

ClientBlockingActions

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

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

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

async add() UserDetailedNotMe | MeDetailed

ユーザーをブロックします

Endpoint: /api/blocking/create

戻り値:

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

戻り値の型:

UserDetailedNotMe | MeDetailed

async remove() UserDetailedNotMe | MeDetailed

ユーザーのブロックを解除します

Endpoint: /api/blocking/delete

戻り値:

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

戻り値の型:

UserDetailedNotMe | MeDetailed

SharedBlockingActions

Methods
class mipac.actions.blocking.SharedBlockingActions(*, session: HTTPClient, client: ClientManager)
async add(*, user_id: str) UserDetailedNotMe | MeDetailed

ユーザーをブロックします

Endpoint: /api/blocking/create

パラメータ:

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

戻り値:

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

戻り値の型:

UserDetailedNotMe | MeDetailed

async remove(*, user_id: str) UserDetailedNotMe | MeDetailed

ユーザーのブロックを解除します

Endpoint: /api/blocking/delete

パラメータ:

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

戻り値:

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

戻り値の型:

UserDetailedNotMe | MeDetailed

AntennaActions

Methods
class mipac.actions.antenna.AntennaActions(*, session: HTTPClient, client: ClientManager)
async create(name: str, src: Literal['home', 'all', 'users', 'list', 'users_blacklist'], keywords: list[list[str]], exclude_keywords: list[list[str]] | None = None, users: list[str] | None = None, case_sensitive: bool = False, local_only: bool = MISSING, with_replies: bool = False, with_file: bool = False, notify: bool = False, user_list_id: str | None = None) Antenna

Create an antenna.

Endpoint: /api/antennas/create

パラメータ:
  • name (str) -- Name of the antenna.

  • src (IAntennaReceiveSource) -- Receive source of the antenna.

  • keywords (list[list[str]]) -- Receive keywords.

  • exclude_keywords (list[list[str]] | None, default None) -- Excluded keywords.

  • local_only (bool, default MISSING) -- Whether to limit to local notes.

  • users (list[str] | None, default None) -- List of target user ID. Required when selecting 'users' as the receive source.

  • case_sensitive (bool, default False) -- Whether to differentiate between uppercase and lowercase letters.

  • with_replies (bool, default False) -- Whether to include replies.

  • with_file (bool, default False) -- Whether to limit to notes with attached files.

  • notify (bool, default False) -- Whether to notify for new notes.

  • user_list_id (str | None, default None) -- List of user IDs when selecting 'users' as the receive source for the antenna.

戻り値:

The created antenna.

戻り値の型:

Antenna

async get_list() list[Antenna]

アンテナの一覧を取得します

Endpoint: /api/antennas/list

戻り値:

アンテナのリスト

戻り値の型:

list[Antenna]

ClientAntennaActions

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

Delete antenna from identifier

Endpoint: /api/antennas/delete

戻り値:

success or failure

戻り値の型:

bool

async get_all_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: str | None = None, until_date: str | None = None) AsyncGenerator[Note, None]

すべてのノートを取得します

Endpoint: /api/antennas/notes

パラメータ:
  • limit (int, optional) -- 一度に取得する件数, default=10

  • since_id (str | None, optional) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None, optional) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (str | None, optional) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (str | None, optional) -- 指定した日付のノートより前のノートを取得します, default=None

列挙:

AsyncGenerator[Note, None] -- 取得したノートのリスト

async get_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: str | None = None, until_date: str | None = None) list[Note]

ノートを取得します

Endpoint: /api/antennas/notes

パラメータ:
  • limit (int, optional) -- 一度に取得する件数, default=10

  • since_id (str | None, optional) -- 指定したIDのノートより後のノートを取得します, by default None

  • until_id (str | None, optional) -- 指定したIDのノートより前のノートを取得します, by default None

  • since_date (str | None, optional) -- 指定した日付のノートより後のノートを取得します, by default None

  • until_date (str | None, optional) -- 指定した日付のノートより前のノートを取得します, by default None

戻り値:

取得したノートのリスト

戻り値の型:

list[Note]

async show() Antenna

Show antenna from identifier

Endpoint: /api/antennas/show

戻り値:

antenna object

戻り値の型:

Antenna

async update(name: str, src: Literal['home', 'all', 'users', 'list', 'users_blacklist'], keywords: list[list[str]], exclude_keywords: list[list[str]], users: list[str], case_sensitive: bool, with_replies: bool, with_file: bool, notify: bool, user_list_id: str | None = None) Antenna

Update an antenna.

Endpoint: /api/antennas/update

パラメータ:
  • name (str) -- Name of the antenna.

  • src (IAntennaReceiveSource) -- Receive source of the antenna.

  • keywords (list[list[str]]) -- Receive keywords.

  • exclude_keywords (list[list[str]]) -- Excluded keywords.

  • users (list[str]) -- List of target user ID. Required when selecting 'users' as the receive source.

  • case_sensitive (bool) -- Whether to differentiate between uppercase and lowercase letters.

  • with_replies (bool) -- Whether to include replies.

  • with_file (bool) -- Whether to limit to notes with attached files.

  • notify (bool) -- Whether to notify for new notes.

  • user_list_id (str | None, default None) -- List of user IDs when selecting 'users' as the receive source for the antenna.

戻り値:

The created antenna.

戻り値の型:

Antenna

SharedAntennaActions

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

Delete antenna from identifier

Endpoint: /api/antennas/delete

パラメータ:

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

戻り値:

success or failure

戻り値の型:

bool

async get_all_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: str | None = None, until_date: str | None = None, *, antenna_id: str) AsyncGenerator[Note, None]

すべてのノートを取得します

Endpoint: /api/antennas/notes

パラメータ:
  • antenna_id (str) -- アンテナのID

  • limit (int, optional) -- 一度に取得する件数, default=10

  • since_id (str | None, optional) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None, optional) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (str | None, optional) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (str | None, optional) -- 指定した日付のノートより前のノートを取得します, default=None

列挙:

Iterator[AsyncGenerator[Note, None]] -- 取得したノートのリスト

async get_notes(limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_date: str | None = None, until_date: str | None = None, *, antenna_id: str) list[Note]

ノートを取得します

Endpoint: /api/antennas/notes

パラメータ:
  • antenna_id (str) -- アンテナのID

  • limit (int, optional) -- 一度に取得する件数, default=10

  • since_id (str | None) -- 指定したIDのノートより後のノートを取得します, default=None

  • until_id (str | None) -- 指定したIDのノートより前のノートを取得します, default=None

  • since_date (str | None) -- 指定した日付のノートより後のノートを取得します, default=None

  • until_date (str | None) -- 指定した日付のノートより前のノートを取得します, default=None

戻り値:

取得したノートのリスト

戻り値の型:

list[Note]

async show(*, antenna_id: str) Antenna

Show antenna from identifier

Endpoint: /api/antennas/show

パラメータ:

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

戻り値:

antenna object

戻り値の型:

Antenna

async update(name: str, src: Literal['home', 'all', 'users', 'list', 'users_blacklist'], keywords: list[list[str]], exclude_keywords: list[list[str]], users: list[str], case_sensitive: bool, with_replies: bool, with_file: bool, notify: bool, user_list_id: str | None = None, *, antenna_id: str) Antenna

Update an antenna.

Endpoint: /api/antennas/update

パラメータ:
  • name (str) -- Name of the antenna.

  • src (IAntennaReceiveSource) -- Receive source of the antenna.

  • keywords (list[list[str]]) -- Receive keywords.

  • exclude_keywords (list[list[str]]) -- Excluded keywords.

  • users (list[str]) -- List of target user ID. Required when selecting 'users' as the receive source.

  • case_sensitive (bool) -- Whether to differentiate between uppercase and lowercase letters.

  • with_replies (bool) -- Whether to include replies.

  • with_file (bool) -- Whether to limit to notes with attached files.

  • notify (bool) -- Whether to notify for new notes.

  • user_list_id (str | None, default None) -- List of user IDs when selecting 'users' as the receive source for the antenna.

戻り値:

The created antenna.

戻り値の型:

Antenna

RoleActions

Methods
class mipac.actions.role.RoleActions(*, session: HTTPClient, client: ClientManager)
async get(role_id: str) Role

Get a role from the API. Endpoint: /api/roles/show

パラメータ:

role_id (str) -- The ID of the role to get.

戻り値:

The role data.

戻り値の型:

Role

async get_list() list[Role]

Get a list of roles from the API. Endpoint: /api/roles/list

戻り値:

The role data.

戻り値の型:

list[Role]

async get_notes(role_id: str, limit: int = 10, since_id: str | None = None, until_id: str | None = None, since_data: int | None = None, until_data: int | None = None, *, get_all: bool = False)

Get notes in a role. Endpoint: /api/roles/notes

パラメータ:
  • role_id (str) -- The ID of the role to get notes.

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

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

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

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

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

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

列挙:

AsyncGenerator[Note, None] -- The note data.

async get_users(role_id: str, since_id: str | None = None, until_id: str | None = None, limit: int = 10, *, get_all: bool = False) AsyncGenerator[RoleUser, None]

Get users in a role. Endpoint: /api/roles/users

パラメータ:
  • role_id (str) -- The ID of the role to get users.

  • since_id (str, optional) -- The ID of the user to get users after, default=None

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

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

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

列挙:

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

ClientMuteActions

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

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

パラメータ:

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

戻り値:

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

戻り値の型:

bool

async delete() bool

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

戻り値:

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

戻り値の型:

bool

MuteActions

Methods
class mipac.actions.users.mute.MuteActions(*, session: HTTPClient, client: ClientManager)
async get_all_list(limit: int = 30, since_id: str | None = None, until_id: str | None = None)

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

パラメータ:
  • limit (int) -- 取得するユーザー数, by default 30

  • since_id (str | None) -- 指定したIDより後のミュート中のユーザーを取得します, default=None

  • until_id (str | None) -- 指定したIDより前のミュート中のユーザーを取得します, default=None

戻り値:

ミュートしているユーザー

戻り値の型:

AsyncGenerator[Muting]

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

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

戻り値:

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

戻り値の型:

list[Muting]

SharedMuteActions

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

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

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

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

戻り値:

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

戻り値の型:

bool

async delete(*, user_id: str) bool

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

パラメータ:

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

戻り値:

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

戻り値の型:

bool

ClientPartialUserListActions

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

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

async get_list() list[UserList]

Get the user lists of a user

Endpoint /api/users/lists/list

戻り値:

The user lists the user has

戻り値の型:

list[UserList]

async pull(*, list_id: str) bool

Pull a user from a user list

Endpoint /api/users/lists/pull

パラメータ:

list_id (str) -- The id of the user list to pull from

戻り値:

True if the user was pulled, False otherwise

戻り値の型:

bool

async push(*, list_id: str) bool

Push a user to a user list

Endpoint /api/users/lists/push

パラメータ:

list_id (str) -- The id of the user list to push to

戻り値:

True if the user was pushed, False otherwise

戻り値の型:

bool

ClientUserListActions

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

Delete a user list

Endpoint /api/users/lists/delete

戻り値:

True if the user list was deleted, False otherwise

戻り値の型:

bool

async favorite() bool

Favorite a user list

Endpoint /api/users/lists/favorite

戻り値:

True if the user list was favorited, False otherwise

戻り値の型:

bool

async show(for_public: bool = False) UserList

Show a user list

Endpoint /api/users/lists/show

パラメータ:

for_public (bool, optional) -- Whether to show the user list for the public, by default False

戻り値:

The user list

戻り値の型:

UserList

async unfavorite() bool

Unfavorite a user list

Endpoint /api/users/lists/unfavorite

戻り値:

True if the user list was unfavorited, False otherwise

戻り値の型:

bool

async update(name: str = MISSING, is_public: bool = MISSING) UserList

Update a user list

Endpoint /api/users/lists/update

パラメータ:
  • name (str, optional) -- The new name of the user list, by default MISSING

  • is_public (bool, optional) -- Whether the user list should be public, by default MISSING

戻り値:

The updated user list

戻り値の型:

UserList

SharedPartialUserListActions

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

Get the user lists of a user

Endpoint /api/users/lists/list

パラメータ:

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

戻り値:

The user lists the user has

戻り値の型:

list[UserList]

async pull(*, list_id: str, user_id: str) bool

Pull a user from a user list

Endpoint /api/users/lists/pull

パラメータ:
  • list_id (str) -- The id of the user list to pull from

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

戻り値:

True if the user was pulled, False otherwise

戻り値の型:

bool

async push(*, list_id: str, user_id: str) bool

Push a user to a user list

Endpoint /api/users/lists/push

パラメータ:
  • list_id (str) -- The id of the user list to push to

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

戻り値:

True if the user was pushed, False otherwise

戻り値の型:

bool

SharedUserListActions

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

Delete a user list

Endpoint /api/users/lists/delete

パラメータ:

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

戻り値:

True if the user list was deleted, False otherwise

戻り値の型:

bool

async favorite(*, list_id: str) bool

Favorite a user list

Endpoint /api/users/lists/favorite

パラメータ:

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

戻り値:

True if the user list was favorited, False otherwise

戻り値の型:

bool

async show(for_public: bool = False, *, list_id: str) UserList

Show a user list

Endpoint /api/users/lists/show

パラメータ:
  • for_public (bool, optional) -- Whether to show the user list for the public, by default False

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

戻り値:

The user list

戻り値の型:

UserList

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

Unfavorite a user list

Endpoint /api/users/lists/unfavorite

パラメータ:

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

戻り値:

True if the user list was unfavorited, False otherwise

戻り値の型:

bool

async update(name: str = MISSING, is_public: bool = MISSING, *, list_id: str) UserList

Update a user list

Endpoint /api/users/lists/update

パラメータ:
  • name (str, optional) -- The new name of the user list, by default MISSING

  • is_public (bool, optional) -- Whether the user list should be public, by default MISSING

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

戻り値:

The updated user list

戻り値の型:

UserList

UserListActions

Methods
class mipac.actions.users.list.UserListActions(*, session: