Skip to content

API (Cards)

The Holy Constituency of the Summer Triangle edited this page May 31, 2020 · 8 revisions

The Cards private1 API returns card data in a machine-friendly format.

List all card IDs:

GET /api/private/cards/id_list.json

{
    "result": [
        {
            "ordinal": 1,
            "id": 100011001
        },
        ...
    ]
}

You can retrieve information for one or more cards, named by ID or ordinal:

GET /api/private/cards/ordinal/[ids].json
GET /api/private/cards/id/[ids].json

{
    "result": [
        {
            "id": 202053001,
            "ordinal": 244,
            "rarity": 30,
            "max_level": 80,
            "attribute": 3,
            "role": 1,
            "training_tree_m_id": 202053001,
            "sp_point": 4,
            "exchange_item_id": 3,
            "max_passive_skill_slot": 4,
            "background_asset_path": "sR",
            "member": 205,
            "role_effect": {
                "change_effect_type": 1,
                "change_effect_value": 500,
                "positive_type": 1,
                "positive_value": 500,
                "negative_type": 3,
                "negative_value": 500
            },
            "normal_appearance": {
                "name": "二人きりの時間を過ごしたい",
                "image_asset_path": "'\\=",
                "thumbnail_asset_path": "A.T"
            },
            "idolized_appearance": {
                "name": "ハートビート★スクールガール",
                "image_asset_path": "9vC",
                "thumbnail_asset_path": "V!F"
            },
            "active_skill": {
                "id": 10023501,
                "name": "愛さんと遊ぶ準備、できてる?",
                "description": "5ノーツの間獲得ボルテージが6%増加\n対象:全員",
                "skill_type": 1,
                "sp_gauge_point": 200,
                "icon_asset_path": null,
                "thumbnail_asset_path": "~.",
                "rarity": 0,
                "trigger_type": 255,
                "trigger_probability": 3300,
                "target": {
                    "id": 1,
                    "self_only": 0,
                    "not_self": 0,
                    "apply_count": 9,
                    "owner_party": 0,
                    "owner_school": 0,
                    "owner_year": 0,
                    "owner_subunit": 0,
                    "owner_attribute": 0,
                    "owner_role": 0,
                    "fixed_attributes": [],
                    "fixed_members": [],
                    "fixed_subunits": [],
                    "fixed_schools": [],
                    "fixed_years": [],
                    "fixed_roles": []
                },
                "conditions": [],
                "levels": [
                    # see Skill.Effect def in libcard2.dataclasses
                    [2, 18, 600, 2, 2, 2, 2, 5],
                    ...
                ]
            },
            "passive_skills": [
                ... (same struct as active_skill above)
            ],
                               # level, appeal, stamina, technique
            "idolized_offset": [1, 259, 123, 206],
            "tt_offset": [
                # level, appeal, stamina, technique
                [0, 3888, 1848, 3096],
                ...
            ],
            "stats": [
                # level, appeal, stamina, technique
                [1, 1947, 929, 1548],
                ...
            ],
            "costume_info": [
                ")2/", 202053001, null, null
            ]
        },
        ...
    ]
}

[ids] is a comma separated list.

You can pass the query parameter ?with_accept_language=1 to localize titles according to the passed Accept-Language header. Strings from TLInject will not be used, only configured dictionaries.

You can retrieve all cards of a particular member, named by their ID:

GET /api/private/cards/member/[id].json

See response above.

You cannot pass a list of names, but other remarks above apply.


1: In this case, private means that functionality and shape of the API may change at any time.

Clone this wiki locally