No project description provided
Project description
candfans-client
非公式のCandfansのAPI Clientです。なんの保証もありません。
install
https://pypi.org/project/candfans-client/
pip
pip install candfans-client
poetry
poetry add candfans-client
example
init and login
初期化時にログインを行います。
from candfans_client.client import CandFansClient
client = CandFansClient(
email='YOUR_EMAIL',
password='YOUR_PASSWORD',
)
get_sales
指定月の売上のサマリーを取得します。
sales = client.get_sales('2023-11')
print(sales[0].subscribe_sum)
get_sales_history
指定月の売上の履歴を取得します。
histories = client.get_sales_history('2023-11')
print(len(histories))
print(histories[0])
get_sales_purchase_post
指定月の単体販売の詳細を取得します。
purchase = client.get_sales_purchase_post('2023-11')
print(purchase.total_price, len(purchase.sales))
get_sales_subscribe
指定月のサブスクの詳細を取得します。
subscribe = client.get_sales_subscribe('2023-11')
print(subscribe.total_price, len(subscribe.sales))
get_sales_chip
指定月のチップの詳細を取得します。
chip = client.get_sales_chip('2023-11')
print(chip.total_price, len(chip.sales))
get_sales_backnumber
指定月のバックナンバーの売上の詳細を取得します。
backnumber = client.get_sales_backnumber('2023-11')
print(backnumber.total_price, len(backnumber.sales))
contribution
test
poetry run python -m unittest discover -s tests/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
candfans_client-3.7.0.tar.gz
(9.2 kB
view details)
Built Distribution
File details
Details for the file candfans_client-3.7.0.tar.gz
.
File metadata
- Download URL: candfans_client-3.7.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8109a7919d1d8341262965c889a222c16374fd1bb1f57b1454f2991f9fe88c8d |
|
MD5 | 5b4b73f895573da4a7967bfdc2286910 |
|
BLAKE2b-256 | 6c76a85c55563731252495279836ab7482b057e41a78d10a20f14788d6889da9 |
File details
Details for the file candfans_client-3.7.0-py3-none-any.whl
.
File metadata
- Download URL: candfans_client-3.7.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6044b9349fb84e5658218ba53ac002acdf4f02a28f1cfa790089c57ba336773b |
|
MD5 | bd68f75c176de1244232bb377f39c643 |
|
BLAKE2b-256 | fd38157907456656a0b59de5672d68ade07cca24b04fbac14e7f087577a611ed |