No project description provided
Project description
candfans-client
unofficial API Client for candfans
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))
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-0.2.2.tar.gz
(4.9 kB
view hashes)
Built Distribution
Close
Hashes for candfans_client-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2b9cf8181ac21b8c868fc886f1a896c8e3af2c2879c6d25998e10caa105b057 |
|
MD5 | c02d2e83571d9a760c1a8a62d359513c |
|
BLAKE2b-256 | d45b1e1a5b9a62214557ee2978164f27e517d8ca262c8528d1ad0339d68d4dbc |