You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
yupix cfe0b9f930
feat: admin/metaのサポートの為により良いmeta型に
2 years ago
.github ci: ruffを使ったlintを追加 2 years ago
compiler/errors 🎨 format: code 2 years ago
docs 🎨 format: code 2 years ago
mipac feat: admin/metaのサポートの為により良いmeta型に 2 years ago
.editorconfig feat: .editorconfigを追加 2 years ago
.flake8 feat: ディレクトリ名をabcからabstractに 2 years ago
.gitattributes feat: python-versioneerを追加 2 years ago
.gitignore feat: ドキュメントを作成する close #13 2 years ago
.onedev-buildspec.yml ci: mypyだと一部の構文が理解できないのでciで使わないように 2 years ago
.pre-commit-config.yaml feat: pre-commitの設定を追加 2 years ago
.readthedocs.yaml feat: change python version 2 years ago
CHANGELOG.md 🐛 fix: `ChatMessage` model 2 years ago
LICENSE chore: add LICENSE 2 years ago
MANIFEST.in feat: python-versioneerを追加 2 years ago
README.md Merge remote-tracking branch 'origin/master' into feat/support-v13 2 years ago
pyproject.toml feat: ディレクトリ名をabcからabstractに 2 years ago
requirements.txt feat: python-versioneerを追加 2 years ago
setup.cfg feat: python-versioneerを追加 2 years ago
setup.py ci: ruffを使ったlintを追加 2 years ago
versioneer.py feat: python-versioneerを追加 2 years ago

README.md

MiPAC

Discord server invite Code style: black

概要

MiPAのCoreとなるライブラリです。issueはこちらで管理しています

MiPACはMisskey v11, 12, 13をサポートしているApi Wrapperです。 本来気にしないといけないバージョンごとのAPIの違い等を吸収してくれます。

サポートしているMisskey

name version supported
Misskey Official v13, v12, v11
Ayuskey latest

使い方

import asyncio

from mipac.client import Client

async def main():
    client = Client(url, token)
    await client.http.login()
    api = client.api
    note = await api.note.action.send('Hello World')
    print(note.author.name, note.content)

if __name__ == '__main__':
    asyncio.run(main())

Migration from v0.3.0 to v0.4.0

configの属性が変更されました

  • is_official が削除されました
use_version が追加されました

is_official ではv12とv13を区別するには不十分であったため、このように変更されました。v13がリリースされたばかりというのもあり、現状のデフォルト値はv12となっています。v13をご利用の方はuse_version=13と指定するなどして、バージョンを変更してください。

Client のオプションから configが削除されました

今後configを参照する際は Client.config を使用してください。 また、値を更新する場合はClient.config.from_dict()を用いることをお勧めします。 通常の変更方法との違いは以下の通りです。

Client.config.is_ayuskey = True
Client.config.use_version = 13
Client.config.from_dict(is_ayuskey=True, use_version=13)

上記のように複数の値を同時に更新する場合特にfrom_dictは有効な方法になります。

開発者向け情報

このプロジェクトでは blackのforkである、axblackを利用しています。主な違いはダブルクォートがデフォルトではなく、シングルクォートになっている点です

LICENSE

準備中

FOSSA Status

Documentation * Discord Server