Skip to main content

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


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.8.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

candfans_client-3.8.1-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file candfans_client-3.8.1.tar.gz.

File metadata

  • Download URL: candfans_client-3.8.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for candfans_client-3.8.1.tar.gz
Algorithm Hash digest
SHA256 0426ae7bce48ec3f9965131ea8c72f04625f49a2bc95a466c014bcb120689d63
MD5 be43bcfc626f8313d2e5bfc82849e782
BLAKE2b-256 fc6b466bdda1a7e6ac2e2cd5a84e44be4cd7c5e10f82faa8a03c7e52e56fe2db

See more details on using hashes here.

File details

Details for the file candfans_client-3.8.1-py3-none-any.whl.

File metadata

  • Download URL: candfans_client-3.8.1-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for candfans_client-3.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2630a490e6eab4d312a2edd164d395885925fce0f2bb53b5dcf6fa2d7538effd
MD5 b7a3028aeb961c641f50960a2a890acf
BLAKE2b-256 89920f7090735db6345b2f8cb07f57d8d5f5f823eb827aad862b6b21e5238a3a

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