21 KiB
Change Log
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[Unreleased]
Added
- None
[0.4.2] 2023-03-22
Added
config.features
が追加されました
MiPACはv13, v12, v11という大きな区切りでエンドポイントが利用可能かを確認しています。その都合上、v13でサポートされいた物、例えばチャットが13.7.0
で廃止されたような場合、MiPACは最新のMisskeyに追従しているため、デフォルトの挙動を変更します。これにより、13.7.0
に更新してなかったり、fork
を使用していてチャットが存在する場合でもチャットを使用すると例外であるNotSupportVersion
が発生してしまいます。その対策としてこの機能が追加されました。
このconfigの主な役割は以下の通りです。
- 最新のMisskeyでは使用できないが、自身が使用しているサーバーのバージョンでは使用できる場合に該当する物を有効にすることで例外を返さず、使用できるようにする
使い方は以下の通りです。また、現在サポートされているfeatureはchat
のみです。
async def main():
client = Client(auth.currentUser.url, auth.currentUser.token)
await client.http.login()
api = client.api
client.config.from_dict(features={'chat': True})
config.limits
が追加されました
MiPACでは文字数等にデフォルトで最新のMisskeyの値を入れています。しかし、一部のForkで文字数の制限が緩和されている・制限されている場合に正しくエラーを返せなくなる可能性があります。その対策としてこの機能が追加されました。
また、自分で作成・使用しているForkでこれ存在するからデフォルトでサポートしてくれない?という物がありましたら、Issueを作成してくだされば検討します。
- Note周りのメソッドで
visibility
の型を正確に - 以下のエンドポイントがサポートされます。
i/claim-achievement
blocking/create
blocking/delete
blocking/list
admin/ad/create
admin/ad/delete
admin/ad/list
admin/ad/update
- Added
IT_ACHIEVEMENT_NAME
fixed variable. - Added class the given below.
- Channel
IChannelLite
ChannelLite
ChannelActions
ChannelManager
- Blocking
BlockingUser
IBlockingUser
BlockingActions
BlockingManager
- Ad
AdminAdvertisingModelActions
AdminAdvertisingActions
Ad
IAd
AdminAdvertisingModelManager
AdminAdvertisingManager
- Channel
- Added
block
attribute toUserManager
. - Added
channel
attribute toClientManager
. - Added
reaction_emojis
property toNote
. - Added
reaction_acceptance
property toNote
.
Changed
- chatがv13で廃止された為v13を利用している際は例外を返すように変更しました。
- v13だが、forkやchatが廃止される前のバージョンを使用していてチャットが使用したい際は新しい機能である
config.features
をご利用ください
- v13だが、forkやchatが廃止される前のバージョンを使用していてチャットが使用したい際は新しい機能である
- aiohttpのバージョンを
3.8.4
に固定 - Tokenを使用しなくてもAPIが一部使用できるようになりました。当然ですが、認証が必要なAPIを使用した場合はエラーが出ます。
Config.from_dict
の引数が全てキーワード引数になりました。これは今後Configに引数が増えた際など、変更に強くするためです。
Removed
- サポートする気が無いため、sphinxを用いたドキュメントを削除
Fixed
Note.reply
のキーがrenote
になっていて取得不可になっていた
[0.4.1] 2023-03-14
Added
バージョンの自動検出機能が追加されました(β)
これはデフォルトで有効になっており、有効の間は自動的に /api/meta
からバージョンを推論します。機能としては以下の通りです
-
11, 12, 13にヒットした場合それらにバージョンを変更する
- ヒットしなかった場合は何もしない
Misskey公式のバージョンニングを元に判断している為、独自のバージョニングを行っているフォーク等では正常に動作しない可能性があります。その際は
client.config.use_version_autodetect = False
とすることで無効にすることが可能です。また、手動でバージョンを設定する場合もoffにしてください。 一部のAPIはバージョンとフォークの種類で判断しています。そのため公式のバージョン的には使用できないが、フォークの機能として存在するという場合は報告をくださればサポートします。
- ヒットしなかった場合は何もしない
Misskey公式のバージョンニングを元に判断している為、独自のバージョニングを行っているフォーク等では正常に動作しない可能性があります。その際は
-
Added
role
property toAdminManager
. -
Added
remove_none
argument to request method. -
Added method to
ClientActions
class the given below.get_announcements
-
Added class the given below.
AdminUserActions
AnnouncementCommon
Announcement
AnnouncementSystem
IMetaAnnouncement
IAnnouncementSystem
AdminAnnouncementClientActions
AdminAnnouncementActions
AdminAnnouncementManager
IModerationLog
ModerationLog
ServerInfoCpu
ServerInfoMem
ServerInfoFs
ServerInfoNet
ServerInfo
IServerInfoCpu
IServerInfoMem
IServerInfoFs
IServerInfoNet
IServerInfo
ITableStats
IIndexStat
IndexStat
IUserIP
UserIP
FederationActions
FederationManager
IFederationInstanceStat
IFederationFollowCommon
IFederationFollower
IFederationFollowing
-
Roles
IRolePolicieValue
IRolePolicies
IRole
RolePolicyValue
RolePolicies
Role
AdminRoleActions
AdminRolesManager
IRoleUser
RoleUser
-
Achievements
- added
IAchievementNf
class. - added
NotificationAchievement
class. - added
Achievement
class. - added
get_achievements
method atUserActions
class. - added
achievements
property atUserDetailed
class.
- added
-
Note
- content field auto convert empty string to None
Changed
- Maximum number of characters has been changed from 79 to 99
- The main reason for this change is to solve the problem that the MiPAC code is inevitably longer because of the method chain. We have kept it to the maximum of pep8.
- Changed a method that was returning an
AsyncIterator
to return anAsyncGenerator
.- Generator is more correct than Iterator because it is the correct usage.
- Changed class name the given below.
IAnnouncement
->IMetaAnnouncement
cache
decorator no longer usesdynamic_args
decorator
Removed
- Delete
dynamic_args
decorator. - Delete debug log.
[0.4.0] 2023-01-18
Added
- added DocString.
- added
get_state
method atClientNoteActions
class. - added
INoteState
class. - added
NoteState
class. - added
IBasePoll
class. - added
ICreatePoll
class. - added
MiPoll
class. - added
PollManager
class. - added
PollActions
class. - added
AdminEmojiActions
class. - added
AdminManager
class. - added
AdminModeratorManager
class. - added
ActiveUsersChart
class. - added
IDriveChart
class. - added
IDriveLocalChart
class. - added
IDriveRemoteChart
class. - added attribute
is_official
atConfig
class.- became
is_ayuskey
attribute is deprecated(I'll remove with v0.4.0)
- became
- added
get_exception_from_id
function. - Return an exception appropriate for the error encountered.
- @omg-xtao added
users_search_by_username_and_host
method atUserActions
class #24. - @omg-xtao added
note_translate
method atUserActions
class #24. - @omg-xtao added
users_search
method atUserActions
class #24. - added new
ClientActions
class. - added
avatar_color
property atLiteUser
class.- Note: Since avatar_color is deprecated in v13, only None is returned for v13 instances.
- added
un_renote
method atClientNoteActions
class. - added
get_children
method atClientNoteActions
class. - added
invalidate
method atFollowActions
class. - added
cancel
method atFollowRequestActions
class. - added
mute
attribute atUserManager
class. - added
MuteManager
class. - added
MuteActions
class. - added
MuteUser
class. - added
IMuteUser
class. - added
AdminActions
class. - added
ICustomEmojiLiteRequired
class. - The following methods are added to the
AdminEmojiActions
class.gets
gets_remote
- added some meta class.
ICPU
IPolicies
IAnnouncement
IV12Features
IV11Features
IFeatures
IV12AdminMeta
ISharedAdminMeta
ILiteV12Meta
ILiteV11Meta
IMetaCommonV12
ICommonV11
IMetaCommon
ILiteMeta
IV12Meta
IMeta
IAdminMeta
Policies
Features
Meta
AdminMeta
CPU
MetaCommon
LiteMeta
- added some federation class.
IFederationInstanceRequired
IFederationInstance
FederationInstance
- added some notification classes.
Notification
NotificationFollow
NotificationFollowRequest
NotificationNote
NotificationPollEnd
NotificationReaction
IUserNf
INoteNf
IPollEndNf
Changed
- rename
ActiveUsersChartPayload
class toIActiveUsersChart
class. - rename
DriveLocalChartPayload
class toIDriveLocalChart
class. - rename
DriveRemoteChartPayload
class toIDriveRemoteChart
.class. - rename
DriveChartPayload
class toIDriveChart
class. - The attribute
emojis
for Note and LiteUser is obsolete in misskey v13, so v13 will return an empty list. - config is now a global variable.
- If you want to change the config, please use
Client.config.from_dict
.
- If you want to change the config, please use
- CustomEmoji now inherits PartialCustomEmoji.
- PartialCustomEmoji url has been changed to return
str | None
to match v13. - AdminManager's
get_invite
method has been moved to `AdminActions. - BREAKING CHANGE
ClientActions
has been changed toClientManager
- BREAKING CHANGE Some paths will be changed as follows
manager.admin
->manager.admins
manager.admin.manager
->manager.admins.admin
actions.admin
->actions.admins
- BREAKING CHANGE
- The
action
property in the model has been changed toapi
.- Change
note.action.send
tonote.api.action.send
.
- Change
- Moved the reaction attribute of
ClientActions
toNoteManager
.- Change
api.reaction
toapi.note.reaction
.
- Change
- Moved methods from
AdminEmojiManager
toAdminEmojiActions
.- Change
api.admin.emoji.add
toapi.admin.emoji.action.add
.
- Change
- Moved methods from
AdminModeratorManager
toAdminModeratorActions
.- Change
api.admin.moderator.add
toapi.admin.moderator.action.add
.
- Change
- Moved methods from
ChartManager
toChartActions
.- Change
api.chart.get_active_user
toapi.chat.action.get_active_user
.
- Change
- Moved methods from
FollowManager
toFollowActions
.- Change
api.user.follow.add
toapi.user.follow.action.add
.
- Change
- Moved methods from
FollowRequestManager
toFollowRequestActions
.api.user.follow.action.get_all
.
- Moved some attributes of
NoteActions
toNoteManager
.- Change
api.note.action.reaction.add
toapi.note.reaction.action.add
.
- Change
- Moved the reaction attribute of
NoteActions
toClientNoteManager
.- Change
api.note.action.reaction
toapi.note.reaction.action
. - Change
api.note.action.favorite
toapi.note.favorite.action
.
- Change
- The
Fixed
- can't delete emoji with v12.
- fixed
ChatMessage
model.- For v13, the url is automatically generated. (Although it returns None by type, it never actually returns None.
- fixed
Chat
action. - fixed
Chat
action.
Removed
- The following attributes have been removed
api.user.action.note
- Delete
RawActiveUsersChart
class. - Delete
RawDriveLocalChart
class. - Delete
RawDriveRemoteChart
class. - Delete
RawDriveChart
class. - Delete
get_user
method atFollowRequestActions
class. - removed some meta classes.
LiteInstanceMeta
IInstanceMetaLite
IInstanceFeatures
IInstancePolicies
InstanceMeta
[0.3.1] 2022-12-24
Added
- added
NoteDeleted
class. - added
INoteUpdatedDeleteBody
class. - added
INoteUpdatedDelete
class. str_to_datetime
関数を追加
Fixed
PartialReaction
クラスでuser_id
が取得できないINoteUpdatedReaction
の型が間違っている
[0.3.0] 2022-12-24
Fixed
- fix
INoteUpdated
type
Changed
- BREAKING CHANGE Required Python version is 3.11
[0.2.8] 2022-12-23
Added
LiteUser
にaction
プロパティを追加しました。- これにより
UserDetailed
の方からaction
が削除されていますが、UserDetailed
はLiteUser
を継承しているため今まで通りご利用いただけます
- これにより
UserActions
クラスにget_profile_link
メソッドを追加しました
[0.2.7] 2022-12-23
Fixed
[0.2.6] - 2022-12-08
Added
INoteUpdated
クラスを追加しましたINoteUpdatedReactionBody
クラスを追加しましたINoteUpdatedReaction
クラスを追加しましたPartialCustomEmoji
クラスを追加しましたPartialReaction
クラスを追加しました
[0.2.5] - 2022-12-08
Added
ISignin
クラスを追加
Fixed
- Noteモデルの
content
が無い場合KeyErrorになる - Noteモデルの
cw
が無い場合KeyErrorになる
[0.2.4] - 2022-12-08
Added
ClientNoteManager
クラスを追加しましたClientNoteActions
クラスを追加しました
Changed
NoteActions
が持っているノートに対する操作をClientNoteActions
に移動しました- 継承しているため今まで通り使用できます
Fixed
- sendメソッドの引数
extract_hashtags
が正常に動作しない
[0.2.3] - 2022-11-27
Fixed
NoteAction.send
メソッドで作成したノートのモデルが生成できないrequest
メソッドで戻り値がlistではなくdistだった場合snake caseに置き換えできない
[0.2.2] - 2022-11-27
Added
LiteUser
に属性name
を互換性の為に再追加しましたが、非推奨です。v0.4.0で削除する予定ですusername
とname
の違いを区別しにくい可能性がある為、新たに使用する際はnickname
を使用することを推奨しています
Changed
- deprecatedに関する仕組みを変更しました。
- 該当するコードを表示するようになっています
Fixed
- 型の間違い等
- 使用しているインポートが
TYPE_CHECKING
の条件式の中に入っていた為使用できない get_mention
メソッドでusername
ではなくnickname
を使用していた為正しいmentionが作れないLiteUser
クラスの属性instance
でBotと同じインスタンスのユーザーの場合はNoneを返せずKeyErrorになる可能性があったLiteUser
クラスの属性host
を取得すると KeyErrorになる可能性があった
Removed
deprecated_property
decorator を削除しましたdeprecated_func
decorator を削除しました
[0.2.1] - 2022-11-27
Added
NoteActions
にgets
メソッドが追加されました #MP-20- Type Hintの追加
Changed
- WebSocketを使用した際のレスポンスクラスを
MisskeyClientWebSocketResponse
クラス に Reaction
クラスをNotificationReaction
に変更しましたIUserLite
をILiteUser
に変更しましたLiteUser
の属性name
をnickname
に変更しました。LiteUser
を継承しているクラスも同様に変更されていますのでご注意ください。
Removed
- printを使用したデバッグログを削除しました
[0.2.0] - 2022-11-02
Added
- added
Modeler
class - added
IReactionRequired
class - added
IAds
class - added
LiteInstance
class - added
IReactionNf
class - added
INote
class - added
ICustomEmoji
class - added
CustomEmoji
class - added
InstanceMeta
class - added
LiteInstanceMeta
- added
IInstanceMetaLiteRequired
class - added
IInstanceMetaLite
class - added
IInstanceMeta
class - added
IPage
class - added
IPageRequired
class - added
IUserDetailedField
class - added
IUserDetailedRequired
class - added
IUserDetailed
class - added
ChatGroup
class - added
ChatMessage
class - added
IChatGroup
class - NoteActionsクラスに
get
fetch
メソッドを追加 - データをキャッシュするためのツールをutils.pyに追加
- orjsonが使用者の環境にある場合はjsonではなくorjsonを使用するようになりました
Changed
Dict[Any, Any]
のような構文を typing モジュールを使わないdict[any, any]
に変更List[Any, Any]
のような構文を typing モジュールを使わないlist[any, any]
に変更Channel
クラスをRawChannel
を用いて作るようにPinnedNote
クラスをRawPinnedNote
を用いて作るように- change class name
PinnedNotePayload
->IPinnedNote
- change class name
ChannelPayload
->IChannel
- change class name
NotePayload
->INote
- BREAKING CHANGE renamed
Client.action
toClient.api
.
Removed
Renote
クラスを削除しました。今後はNote
クラスをご利用くださいIRenote
,RenotePayload
クラスを削除しました。今後はINote
クラスをご利用くださいRawEmoji
,Emoji
クラスを削除しました。 今後はCustomEmoji
クラスをご利用くださいEmojiPayload
クラスを削除しました。今後はICustomEmoji
クラスをご利用くださいIReactionRequired
,ReactionPayload
を削除しました。 今後はIReactionNf
クラスをご利用くださいRawUser
,User
クラスを削除しました。今後はUserDetailed
,LiteUser
クラスをご利用くださいRawInstance
クラスを削除しました。今後はLiteInstance
クラスをご利用くださいRawProperties
クラスを削除しました。今後はFileProperties
クラスをご利用くださいRawFolder
クラスを削除しました。今後はFolder
クラスをご利用くださいRawFile
クラスを削除しました。 今後はFile
クラスをご利用くださいRawChat
,Chat
クラスを削除しました。 今後はChatMessage
クラスをご利用くださいChatPayload
クラスを削除しました。 今後はIChatMessage
クラスをご利用くださいget_note
メソッドを削除しました。今後はget
もしくはfetch
メソッドをご利用くださいaiocache
を使用しないようになりました
Fixed
- 一部の型が正しくないのを修正しました
[0.1.0] - 2022-05-28
Added
__all__
の定義- utils.py に
AuthClient
クラスを追加しました Config
クラスを追加しましたClient
クラスの引数にconfig
を追加しましたFileActions
クラスを追加しましたFolderActions
クラスを追加しました- README.md に使い方を追加
Changed
Note
クラスのcreated_at
属性の type hint をOptional[str]
=>Optional[datetime]
に変更Note
クラスのcw
属性の取得方法が get ではなかったので修正- BREAKING CHANGE
FileManager
,FolderManager
,DriveManager
の役割が変わりました- 例だと
FolderManager.get_files()
だったコードがFolderManager.action.get_files()
と行ったふうに Actions クラスを経由するようになりました
- 例だと
- 開発者向け情報
Folder
クラスの引数にclient
を追加しました
Fixed
- config が無く動かなかった場所の修正
- 誤った型の修正
Removed
- 重複した属性を削除
- 不要な import の削除
- 終わっている TODO を削除しました