Skip to main content

Unofficial wrapper for mildom api.

Project description

Downloads Downloads Downloads

これは何?

Python用Mildom APIの非公式ライブラリです。 開発途中です。
バグがあればGithubのissueをお願いします。
This is an unofficial api wrapper for Mildom. If you find any bugs, please report it on issues by English or Japanese.

対応状況

  • ProfileV2 API
  • PlayBack API (配信アーカイブ)

対応予定

  • async/await(非同期処理)
  • PlayBack APIでのアーカイブの範囲取得

注意

あくまでも非公式APIの非公式ラッパーです。開発が継続される保証はありません。 開発者は募集中です。

破壊的変更

バージョン2.0には破壊的変更を含みます。

from mildom import api_request

使い方

  • ユーザーオブジェクトを作成して詳細を取得
    情報を更新する時は、User.updateで情報を更新できます。

Userオブジェクト -ProfileV2 API-

import mildom
user_id = 12345678

# 8桁のIDを指定してユーザーオブジェクトを作成
user = mildom.User(user_id)

Examples:

# bool値でライブ中かどうかを取得
print(user.is_live)

# プロフィールの画像URLを取得
print(user.avatar_url)

# レベルを取得
print(user.level)
  • ライブ中かどうかだけを取得
import mildom
user_id = 12345678

if mildom.is_live(user_id):
    print('now on live')

PlayBack(アーカイブ)オブジェクト -PlayBack API-

  • 複数のアーカイブをリストで取得
import mildom
user_id = 12345678
user = mildom.User(user_id)

# "limit" argument is optional.
playback_list: list = user.fetch_playback(limit=10)
  • 特定のアーカイブを取得(fetch specific PlayBack)
import mildom
user_id = 12345678
user = mildom.User(user_id)

# index starts from 0.
playback = user.fetch_playback(index=10)

Examples:

# URLを取得
print(playback.url)
# タイトルを取得
print(playback.title)
# MP4のURLを取得
print(playback.source_url)

注意

「最新から2番目のアーカイブを取得したい」といった場合にはindexを指定してください。
使用しているAPIが異なるため、レスポンスを高速化できます。
以下は指定範囲のアーカイブをランダムに取得するテストにおけるレスポンス時間の平均値です。

0~425
index api time: 0.045539161014556885
----------------------------------------------
legacy api time: 0.06734103298187255


200~425
index api time: 0.049199145197868346
----------------------------------------------
legacy api time: 0.08169150960445404

300~425
index api time: 0.049523269319534304
----------------------------------------------
legacy api time: 0.10116533222198486

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mildom-1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mildom-1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file mildom-1.2.tar.gz.

File metadata

  • Download URL: mildom-1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.8

File hashes

Hashes for mildom-1.2.tar.gz
Algorithm Hash digest
SHA256 35cf47d302cd584c92aa4864381b24b57ad152ffd8f39a52e630f95be99e3318
MD5 dcbee5d081d7ba0f2854650817c0c013
BLAKE2b-256 e06483363a6d5d437b336ff5d1428d1dc49d4876bc0986a03cedc835af480398

See more details on using hashes here.

File details

Details for the file mildom-1.2-py3-none-any.whl.

File metadata

  • Download URL: mildom-1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.8

File hashes

Hashes for mildom-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e718c194ac037022498795196adb121166f23e7aea4983794c3f22d13198c941
MD5 8730967c8b08fd39d9b6412f101af62c
BLAKE2b-256 30829f06aa2ad071b55844ad351f28fca4689ed701fc3901adb626167c9cd855

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page