cocapi


Namecocapi JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/tonybenoy/cocapi
SummaryA python wrapper around clash of clans api
upload_time2023-07-08 12:45:54
maintainer
docs_urlNone
authorTony Benoy
requires_python
license
keywords clash of clans supercell api coc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p>
    <a href="https://github.com/tonybenoy/cocapi/actions">
        <img src="https://github.com/tonybenoy/cocapi/workflows/mypy/badge.svg" alt="Test Status" height="20">
    </a>
    <a href="https://pypi.org/project/cocapi/"><img src="https://img.shields.io/pypi/v/cocapi" alt="Pypi version" height="21"></a>
</p>
<p>
    <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.6+-blue.svg" alt="Python version" height="17"></a>
    <a href="https://github.com/tonybenoy/cocapi/blob/master/LICENSE"><img src="https://img.shields.io/github/license/tonybenoy/cocapi" alt="License" height="17"></a>
    <a href="https://github.com/psf/black">
        <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Codestyle Black" height="17">
    </a>
</p>

# ClashOfClansAPI

Python Wrapper for SuperCells Clash Of Clans API

Get Token from https://developer.clashofclans.com/

# Install

> pip install cocapi


# Features and usage examples

### Initialize

Required to set up the class. Versions post 6.1.0 also support getting the status code of the API call. This is useful for debugging. To use it pass `status_code=True` to the `CocApi`.

```python
from cocapi import CocApi

token = 'YOUR_API_TOKEN'
timeout=60 #requests timeout

api=CocApi(token,timeout)
```




## Clans

### Information about a Clan
```python
api.clan_tag(tag) #example tag "#9UOVJJ9J"
```
<details>
 <summary>Click to view output</summary>

```text
{
  "warLeague": {
    "name": {},
    "id": 0
  },
  "memberList": [
    {
      "league": {
        "name": {},
        "id": 0,
        "iconUrls": {}
      },
      "tag": "string",
      "name": "string",
      "role": "string",
      "expLevel": 0,
      "clanRank": 0,
      "previousClanRank": 0,
      "donations": 0,
      "donationsReceived": 0,
      "trophies": 0,
      "versusTrophies": 0
    }
  ],
  "isWarLogPublic": true,
  "tag": "string",
  "warFrequency": "string",
  "clanLevel": 0,
  "warWinStreak": 0,
  "warWins": 0,
  "warTies": 0,
  "warLosses": 0,
  "clanPoints": 0,
  "clanVersusPoints": 0,
  "requiredTrophies": 0,
  "name": "string",
  "location": {
    "localizedName": "string",
    "id": 0,
    "name": "string",
    "isCountry": true,
    "countryCode": "string"
  },
  "type": "string",
  "members": 0,
  "labels": [
    {
      "name": {},
      "id": 0,
      "iconUrls": {}
    }
  ],
  "description": "string",
  "badgeUrls": {}
}
```
</details>

#### Members Only
```python
api.clan_members(tag)
```
returns membersList information from api.clan_tag(tag) under "items" in dict

### War Log Information
```python
api.clan_war_log(tag)
```
<details>
 <summary>Click to view output</summary>

```text
{items:
[
  {
    "clan": {
      "destructionPercentage": {},
      "tag": "string",
      "name": "string",
      "badgeUrls": {},
      "clanLevel": 0,
      "attacks": 0,
      "stars": 0,
      "expEarned": 0,
      "members": [
        {
          "tag": "string",
          "name": "string",
          "mapPosition": 0,
          "townhallLevel": 0,
          "opponentAttacks": 0,
          "bestOpponentAttack": {
            "order": 0,
            "attackerTag": "string",
            "defenderTag": "string",
            "stars": 0,
            "destructionPercentage": 0
          },
          "attacks": [
            {
              "order": 0,
              "attackerTag": "string",
              "defenderTag": "string",
              "stars": 0,
              "destructionPercentage": 0
            }
          ]
        }
      ]
    },
    "teamSize": 0,
    "opponent": {
      "destructionPercentage": {},
      "tag": "string",
      "name": "string",
      "badgeUrls": {},
      "clanLevel": 0,
      "attacks": 0,
      "stars": 0,
      "expEarned": 0,
      "members": [
        {
          "tag": "string",
          "name": "string",
          "mapPosition": 0,
          "townhallLevel": 0,
          "opponentAttacks": 0,
          "bestOpponentAttack": {
            "order": 0,
            "attackerTag": "string",
            "defenderTag": "string",
            "stars": 0,
            "destructionPercentage": 0
          },
          "attacks": [
            {
              "order": 0,
              "attackerTag": "string",
              "defenderTag": "string",
              "stars": 0,
              "destructionPercentage": 0
            }
          ]
        }
      ]
    },
    "endTime": "string",
    "result": "string"
  }
],
"paging": {'cursors': {}}
}
```
</details>

### Current War Information
```python
api.clan_current_war(tag)
```
<details>
 <summary>Click to view output</summary>

```text
{
  "clan": {
    "destructionPercentage": {},
    "tag": "string",
    "name": "string",
    "badgeUrls": {},
    "clanLevel": 0,
    "attacks": 0,
    "stars": 0,
    "expEarned": 0,
    "members": [
      {
        "tag": "string",
        "name": "string",
        "mapPosition": 0,
        "townhallLevel": 0,
        "opponentAttacks": 0,
        "bestOpponentAttack": {
          "order": 0,
          "attackerTag": "string",
          "defenderTag": "string",
          "stars": 0,
          "destructionPercentage": 0
        },
        "attacks": [
          {
            "order": 0,
            "attackerTag": "string",
            "defenderTag": "string",
            "stars": 0,
            "destructionPercentage": 0
          }
        ]
      }
    ]
  },
  "teamSize": 0,
  "opponent": {
    "destructionPercentage": {},
    "tag": "string",
    "name": "string",
    "badgeUrls": {},
    "clanLevel": 0,
    "attacks": 0,
    "stars": 0,
    "expEarned": 0,
    "members": [
      {
        "tag": "string",
        "name": "string",
        "mapPosition": 0,
        "townhallLevel": 0,
        "opponentAttacks": 0,
        "bestOpponentAttack": {
          "order": 0,
          "attackerTag": "string",
          "defenderTag": "string",
          "stars": 0,
          "destructionPercentage": 0
        },
        "attacks": [
          {
            "order": 0,
            "attackerTag": "string",
            "defenderTag": "string",
            "stars": 0,
            "destructionPercentage": 0
          }
        ]
      }
    ]
  },
  "startTime": "string",
  "state": "string",
  "endTime": "string",
  "preparationStartTime": "string"
}
```
</details>

### Clan League Group Information
```python
api.clan_leaguegroup(tag)
```
<details>
 <summary>Click to view output</summary>

```text
{
  "tag": "string",
  "state": "string",
  "season": "string",
  "clans": [
    {
      "tag": "string",
      "clanLevel": 0,
      "name": "string",
      "members": [
        {
          "tag": "string",
          "townHallLevel": 0,
          "name": "string"
        }
      ],
      "badgeUrls": {}
    }
  ],
  "rounds": [
    {
      "warTags": [
        "string"
      ]
    }
  ]
}
```
</details>

### Warleague Information
```python
api.warleague(war_tag)
```
<details>
 <summary>Click to view output</summary>

```text
{
  "tag": "string",
  "state": "string",
  "season": "string",
  "clans": [
    {
      "tag": "string",
      "clanLevel": 0,
      "name": "string",
      "members": [
        {
          "tag": "string",
          "townHallLevel": 0,
          "name": "string"
        }
      ],
      "badgeUrls": {}
    }
  ],
  "rounds": [
    {
      "warTags": [
        "string"
      ]
    }
  ]
}
```
</details>




## Player

### Player information
```python
api.players(player_tag) #for example "#900PUCPV"
```
<details>
 <summary>Click to view output</summary>

```text
{
  "clan": {
    "tag": "string",
    "clanLevel": 0,
    "name": "string",
    "badgeUrls": {}
  },
  "league": {
    "name": {},
    "id": 0,
    "iconUrls": {}
  },
  "townHallWeaponLevel": 0,
  "versusBattleWins": 0,
  "legendStatistics": {
    "previousSeason": {
      "trophies": 0,
      "id": "string",
      "rank": 0
    },
    "previousVersusSeason": {
      "trophies": 0,
      "id": "string",
      "rank": 0
    },
    "bestVersusSeason": {
      "trophies": 0,
      "id": "string",
      "rank": 0
    },
    "legendTrophies": 0,
    "currentSeason": {
      "trophies": 0,
      "id": "string",
      "rank": 0
    },
    "bestSeason": {
      "trophies": 0,
      "id": "string",
      "rank": 0
    }
  },
  "troops": [
    {
      "level": 0,
      "name": {},
      "maxLevel": 0,
      "village": "string"
    }
  ],
  "heroes": [
    {
      "level": 0,
      "name": {},
      "maxLevel": 0,
      "village": "string"
    }
  ],
  "spells": [
    {
      "level": 0,
      "name": {},
      "maxLevel": 0,
      "village": "string"
    }
  ],
  "role": "string",
  "attackWins": 0,
  "defenseWins": 0,
  "townHallLevel": 0,
  "labels": [
    {
      "name": {},
      "id": 0,
      "iconUrls": {}
    }
  ],
  "tag": "string",
  "name": "string",
  "expLevel": 0,
  "trophies": 0,
  "bestTrophies": 0,
  "donations": 0,
  "donationsReceived": 0,
  "builderHallLevel": 0,
  "versusTrophies": 0,
  "bestVersusTrophies": 0,
  "warStars": 0,
  "achievements": [
    {
      "stars": 0,
      "value": 0,
      "name": {},
      "target": 0,
      "info": {},
      "completionInfo": {},
      "village": "string"
    }
  ],
  "versusBattleWinCount": 0
}
```
</details>




## Locations

### All Locations Information
```python
api.location()
```
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "localizedName": "string",
    "id": 0,
    "name": "string",
    "isCountry": true,
    "countryCode": "string"
  }
],
"paging": {'cursors': {}}
}
```
</details>

### Information for a Single Location
```python
api.location_id(location_tag) #for example "32000047"
```

returns the above information for a single location

### Top Clans in a Location
```python
api.location_id_clan_rank(location_tag)
```
Top 200 clans in a given location
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "clanLevel": 0,
    "clanPoints": 0,
    "location": {
      "localizedName": "string",
      "id": 0,
      "name": "string",
      "isCountry": true,
      "countryCode": "string"
    },
    "members": 0,
    "tag": "string",
    "name": "string",
    "rank": 0,
    "previousRank": 0,
    "badgeUrls": {}
  }
],
"paging": {'cursors': {}}
}
```
</details>

### Top Players in a Location
```python
api.clan_leaguegroup(location_tag)
```
Top 200 players in a given location
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "clan": {
      "tag": "string",
      "name": "string",
      "badgeUrls": {}
    },
    "league": {
      "name": {},
      "id": 0,
      "iconUrls": {}
    },
    "attackWins": 0,
    "defenseWins": 0,
    "tag": "string",
    "name": "string",
    "expLevel": 0,
    "rank": 0,
    "previousRank": 0,
    "trophies": 0
  }
],
"paging": {'cursors': {}}
}
```
</details>


### Top Versus Clans in a Location
```python
api.location_clan_versus(location_tag)
```
Top 200 versus clans in a given location
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "clanPoints": 0,
    "clanVersusPoints": 0
  }
],
"paging": {'cursors': {}}
}
```
</details>


### Top Versus Players in a Location
```python
api.location_player_versus(location_tag)
```
Top 200 versus players in a given location
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "clan": {
      "tag": "string",
      "name": "string",
      "badgeUrls": {}
    },
    "versusBattleWins": 0,
    "tag": "string",
    "name": "string",
    "expLevel": 0,
    "rank": 0,
    "previousRank": 0,
    "versusTrophies": 0
  }
],
"paging": {'cursors': {}}
}
```
</details>




## Leagues

### List leagues
```python
api.league()
```
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "name": {},
    "id": 0,
    "iconUrls": {}
  }
],
"paging": {'cursors': {}}
}
```
</details>


### League Information
```python
api.league_id(league_tag)
```
<details>
 <summary>Click to view output</summary>

```text
{
  "name": {},
  "id": 0,
  "iconUrls": {}
}
```
</details>


### List Season Leagues
```python
api.league_season(league_tag)
```
Information is available only for Legend League
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "id": "string"
  }
],
"paging": {'cursors': {}}
}
```
</details>


### League Season Ranking
```python
api.league_season_id(league_tag, season_tag)
```
Information is available only for Legend League
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "clan": {
      "tag": "string",
      "name": "string",
      "badgeUrls": {}
    },
    "league": {
      "name": {},
      "id": 0,
      "iconUrls": {}
    },
    "attackWins": 0,
    "defenseWins": 0,
    "tag": "string",
    "name": "string",
    "expLevel": 0,
    "rank": 0,
    "previousRank": 0,
    "trophies": 0
  }
],
"paging": {'cursors': {}}
}
```
</details>




## Labels

### List Clan Labels
```python
api.clan_leaguegroup(tag)
```
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "name": {},
    "id": 0,
    "iconUrls": {}
  }
],
"paging": {'cursors': {}}
}
```
</details>


### List Player Labels
```python
api.labels_players()
```
<details>
 <summary>Click to view output</summary>

```text
{"items":
[
  {
    "name": {},
    "id": 0,
    "iconUrls": {}
  }
],
"paging": {'cursors': {}}
}
```
</details>


## Credits
- [All Contributors](../../contributors)

*Note versions below 2.0.0 are not supported anymore*

*DISCLAIMER: cocapi is not affiliated with SuperCell©.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tonybenoy/cocapi",
    "name": "cocapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Clash of Clans SuperCell API COC",
    "author": "Tony Benoy",
    "author_email": "me@tonybenoy.com",
    "download_url": "https://files.pythonhosted.org/packages/c8/5f/029a1a530b4b1fed7787ac7a938bc42f46f4f045b4d94ea238b47578b577/cocapi-2.1.0.tar.gz",
    "platform": null,
    "description": "<p>\n    <a href=\"https://github.com/tonybenoy/cocapi/actions\">\n        <img src=\"https://github.com/tonybenoy/cocapi/workflows/mypy/badge.svg\" alt=\"Test Status\" height=\"20\">\n    </a>\n    <a href=\"https://pypi.org/project/cocapi/\"><img src=\"https://img.shields.io/pypi/v/cocapi\" alt=\"Pypi version\" height=\"21\"></a>\n</p>\n<p>\n    <a href=\"https://www.python.org/downloads/\"><img src=\"https://img.shields.io/badge/python-3.6+-blue.svg\" alt=\"Python version\" height=\"17\"></a>\n    <a href=\"https://github.com/tonybenoy/cocapi/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/tonybenoy/cocapi\" alt=\"License\" height=\"17\"></a>\n    <a href=\"https://github.com/psf/black\">\n        <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Codestyle Black\" height=\"17\">\n    </a>\n</p>\n\n# ClashOfClansAPI\n\nPython Wrapper for SuperCells Clash Of Clans API\n\nGet Token from https://developer.clashofclans.com/\n\n# Install\n\n> pip install cocapi\n\n\n# Features and usage examples\n\n### Initialize\n\nRequired to set up the class. Versions post 6.1.0 also support getting the status code of the API call. This is useful for debugging. To use it pass `status_code=True` to the `CocApi`.\n\n```python\nfrom cocapi import CocApi\n\ntoken = 'YOUR_API_TOKEN'\ntimeout=60 #requests timeout\n\napi=CocApi(token,timeout)\n```\n\n\n\n\n## Clans\n\n### Information about a Clan\n```python\napi.clan_tag(tag) #example tag \"#9UOVJJ9J\"\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\n  \"warLeague\": {\n    \"name\": {},\n    \"id\": 0\n  },\n  \"memberList\": [\n    {\n      \"league\": {\n        \"name\": {},\n        \"id\": 0,\n        \"iconUrls\": {}\n      },\n      \"tag\": \"string\",\n      \"name\": \"string\",\n      \"role\": \"string\",\n      \"expLevel\": 0,\n      \"clanRank\": 0,\n      \"previousClanRank\": 0,\n      \"donations\": 0,\n      \"donationsReceived\": 0,\n      \"trophies\": 0,\n      \"versusTrophies\": 0\n    }\n  ],\n  \"isWarLogPublic\": true,\n  \"tag\": \"string\",\n  \"warFrequency\": \"string\",\n  \"clanLevel\": 0,\n  \"warWinStreak\": 0,\n  \"warWins\": 0,\n  \"warTies\": 0,\n  \"warLosses\": 0,\n  \"clanPoints\": 0,\n  \"clanVersusPoints\": 0,\n  \"requiredTrophies\": 0,\n  \"name\": \"string\",\n  \"location\": {\n    \"localizedName\": \"string\",\n    \"id\": 0,\n    \"name\": \"string\",\n    \"isCountry\": true,\n    \"countryCode\": \"string\"\n  },\n  \"type\": \"string\",\n  \"members\": 0,\n  \"labels\": [\n    {\n      \"name\": {},\n      \"id\": 0,\n      \"iconUrls\": {}\n    }\n  ],\n  \"description\": \"string\",\n  \"badgeUrls\": {}\n}\n```\n</details>\n\n#### Members Only\n```python\napi.clan_members(tag)\n```\nreturns membersList information from api.clan_tag(tag) under \"items\" in dict\n\n### War Log Information\n```python\napi.clan_war_log(tag)\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{items:\n[\n  {\n    \"clan\": {\n      \"destructionPercentage\": {},\n      \"tag\": \"string\",\n      \"name\": \"string\",\n      \"badgeUrls\": {},\n      \"clanLevel\": 0,\n      \"attacks\": 0,\n      \"stars\": 0,\n      \"expEarned\": 0,\n      \"members\": [\n        {\n          \"tag\": \"string\",\n          \"name\": \"string\",\n          \"mapPosition\": 0,\n          \"townhallLevel\": 0,\n          \"opponentAttacks\": 0,\n          \"bestOpponentAttack\": {\n            \"order\": 0,\n            \"attackerTag\": \"string\",\n            \"defenderTag\": \"string\",\n            \"stars\": 0,\n            \"destructionPercentage\": 0\n          },\n          \"attacks\": [\n            {\n              \"order\": 0,\n              \"attackerTag\": \"string\",\n              \"defenderTag\": \"string\",\n              \"stars\": 0,\n              \"destructionPercentage\": 0\n            }\n          ]\n        }\n      ]\n    },\n    \"teamSize\": 0,\n    \"opponent\": {\n      \"destructionPercentage\": {},\n      \"tag\": \"string\",\n      \"name\": \"string\",\n      \"badgeUrls\": {},\n      \"clanLevel\": 0,\n      \"attacks\": 0,\n      \"stars\": 0,\n      \"expEarned\": 0,\n      \"members\": [\n        {\n          \"tag\": \"string\",\n          \"name\": \"string\",\n          \"mapPosition\": 0,\n          \"townhallLevel\": 0,\n          \"opponentAttacks\": 0,\n          \"bestOpponentAttack\": {\n            \"order\": 0,\n            \"attackerTag\": \"string\",\n            \"defenderTag\": \"string\",\n            \"stars\": 0,\n            \"destructionPercentage\": 0\n          },\n          \"attacks\": [\n            {\n              \"order\": 0,\n              \"attackerTag\": \"string\",\n              \"defenderTag\": \"string\",\n              \"stars\": 0,\n              \"destructionPercentage\": 0\n            }\n          ]\n        }\n      ]\n    },\n    \"endTime\": \"string\",\n    \"result\": \"string\"\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n### Current War Information\n```python\napi.clan_current_war(tag)\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\n  \"clan\": {\n    \"destructionPercentage\": {},\n    \"tag\": \"string\",\n    \"name\": \"string\",\n    \"badgeUrls\": {},\n    \"clanLevel\": 0,\n    \"attacks\": 0,\n    \"stars\": 0,\n    \"expEarned\": 0,\n    \"members\": [\n      {\n        \"tag\": \"string\",\n        \"name\": \"string\",\n        \"mapPosition\": 0,\n        \"townhallLevel\": 0,\n        \"opponentAttacks\": 0,\n        \"bestOpponentAttack\": {\n          \"order\": 0,\n          \"attackerTag\": \"string\",\n          \"defenderTag\": \"string\",\n          \"stars\": 0,\n          \"destructionPercentage\": 0\n        },\n        \"attacks\": [\n          {\n            \"order\": 0,\n            \"attackerTag\": \"string\",\n            \"defenderTag\": \"string\",\n            \"stars\": 0,\n            \"destructionPercentage\": 0\n          }\n        ]\n      }\n    ]\n  },\n  \"teamSize\": 0,\n  \"opponent\": {\n    \"destructionPercentage\": {},\n    \"tag\": \"string\",\n    \"name\": \"string\",\n    \"badgeUrls\": {},\n    \"clanLevel\": 0,\n    \"attacks\": 0,\n    \"stars\": 0,\n    \"expEarned\": 0,\n    \"members\": [\n      {\n        \"tag\": \"string\",\n        \"name\": \"string\",\n        \"mapPosition\": 0,\n        \"townhallLevel\": 0,\n        \"opponentAttacks\": 0,\n        \"bestOpponentAttack\": {\n          \"order\": 0,\n          \"attackerTag\": \"string\",\n          \"defenderTag\": \"string\",\n          \"stars\": 0,\n          \"destructionPercentage\": 0\n        },\n        \"attacks\": [\n          {\n            \"order\": 0,\n            \"attackerTag\": \"string\",\n            \"defenderTag\": \"string\",\n            \"stars\": 0,\n            \"destructionPercentage\": 0\n          }\n        ]\n      }\n    ]\n  },\n  \"startTime\": \"string\",\n  \"state\": \"string\",\n  \"endTime\": \"string\",\n  \"preparationStartTime\": \"string\"\n}\n```\n</details>\n\n### Clan League Group Information\n```python\napi.clan_leaguegroup(tag)\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\n  \"tag\": \"string\",\n  \"state\": \"string\",\n  \"season\": \"string\",\n  \"clans\": [\n    {\n      \"tag\": \"string\",\n      \"clanLevel\": 0,\n      \"name\": \"string\",\n      \"members\": [\n        {\n          \"tag\": \"string\",\n          \"townHallLevel\": 0,\n          \"name\": \"string\"\n        }\n      ],\n      \"badgeUrls\": {}\n    }\n  ],\n  \"rounds\": [\n    {\n      \"warTags\": [\n        \"string\"\n      ]\n    }\n  ]\n}\n```\n</details>\n\n### Warleague Information\n```python\napi.warleague(war_tag)\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\n  \"tag\": \"string\",\n  \"state\": \"string\",\n  \"season\": \"string\",\n  \"clans\": [\n    {\n      \"tag\": \"string\",\n      \"clanLevel\": 0,\n      \"name\": \"string\",\n      \"members\": [\n        {\n          \"tag\": \"string\",\n          \"townHallLevel\": 0,\n          \"name\": \"string\"\n        }\n      ],\n      \"badgeUrls\": {}\n    }\n  ],\n  \"rounds\": [\n    {\n      \"warTags\": [\n        \"string\"\n      ]\n    }\n  ]\n}\n```\n</details>\n\n\n\n\n## Player\n\n### Player information\n```python\napi.players(player_tag) #for example \"#900PUCPV\"\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\n  \"clan\": {\n    \"tag\": \"string\",\n    \"clanLevel\": 0,\n    \"name\": \"string\",\n    \"badgeUrls\": {}\n  },\n  \"league\": {\n    \"name\": {},\n    \"id\": 0,\n    \"iconUrls\": {}\n  },\n  \"townHallWeaponLevel\": 0,\n  \"versusBattleWins\": 0,\n  \"legendStatistics\": {\n    \"previousSeason\": {\n      \"trophies\": 0,\n      \"id\": \"string\",\n      \"rank\": 0\n    },\n    \"previousVersusSeason\": {\n      \"trophies\": 0,\n      \"id\": \"string\",\n      \"rank\": 0\n    },\n    \"bestVersusSeason\": {\n      \"trophies\": 0,\n      \"id\": \"string\",\n      \"rank\": 0\n    },\n    \"legendTrophies\": 0,\n    \"currentSeason\": {\n      \"trophies\": 0,\n      \"id\": \"string\",\n      \"rank\": 0\n    },\n    \"bestSeason\": {\n      \"trophies\": 0,\n      \"id\": \"string\",\n      \"rank\": 0\n    }\n  },\n  \"troops\": [\n    {\n      \"level\": 0,\n      \"name\": {},\n      \"maxLevel\": 0,\n      \"village\": \"string\"\n    }\n  ],\n  \"heroes\": [\n    {\n      \"level\": 0,\n      \"name\": {},\n      \"maxLevel\": 0,\n      \"village\": \"string\"\n    }\n  ],\n  \"spells\": [\n    {\n      \"level\": 0,\n      \"name\": {},\n      \"maxLevel\": 0,\n      \"village\": \"string\"\n    }\n  ],\n  \"role\": \"string\",\n  \"attackWins\": 0,\n  \"defenseWins\": 0,\n  \"townHallLevel\": 0,\n  \"labels\": [\n    {\n      \"name\": {},\n      \"id\": 0,\n      \"iconUrls\": {}\n    }\n  ],\n  \"tag\": \"string\",\n  \"name\": \"string\",\n  \"expLevel\": 0,\n  \"trophies\": 0,\n  \"bestTrophies\": 0,\n  \"donations\": 0,\n  \"donationsReceived\": 0,\n  \"builderHallLevel\": 0,\n  \"versusTrophies\": 0,\n  \"bestVersusTrophies\": 0,\n  \"warStars\": 0,\n  \"achievements\": [\n    {\n      \"stars\": 0,\n      \"value\": 0,\n      \"name\": {},\n      \"target\": 0,\n      \"info\": {},\n      \"completionInfo\": {},\n      \"village\": \"string\"\n    }\n  ],\n  \"versusBattleWinCount\": 0\n}\n```\n</details>\n\n\n\n\n## Locations\n\n### All Locations Information\n```python\napi.location()\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"localizedName\": \"string\",\n    \"id\": 0,\n    \"name\": \"string\",\n    \"isCountry\": true,\n    \"countryCode\": \"string\"\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n### Information for a Single Location\n```python\napi.location_id(location_tag) #for example \"32000047\"\n```\n\nreturns the above information for a single location\n\n### Top Clans in a Location\n```python\napi.location_id_clan_rank(location_tag)\n```\nTop 200 clans in a given location\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"clanLevel\": 0,\n    \"clanPoints\": 0,\n    \"location\": {\n      \"localizedName\": \"string\",\n      \"id\": 0,\n      \"name\": \"string\",\n      \"isCountry\": true,\n      \"countryCode\": \"string\"\n    },\n    \"members\": 0,\n    \"tag\": \"string\",\n    \"name\": \"string\",\n    \"rank\": 0,\n    \"previousRank\": 0,\n    \"badgeUrls\": {}\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n### Top Players in a Location\n```python\napi.clan_leaguegroup(location_tag)\n```\nTop 200 players in a given location\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"clan\": {\n      \"tag\": \"string\",\n      \"name\": \"string\",\n      \"badgeUrls\": {}\n    },\n    \"league\": {\n      \"name\": {},\n      \"id\": 0,\n      \"iconUrls\": {}\n    },\n    \"attackWins\": 0,\n    \"defenseWins\": 0,\n    \"tag\": \"string\",\n    \"name\": \"string\",\n    \"expLevel\": 0,\n    \"rank\": 0,\n    \"previousRank\": 0,\n    \"trophies\": 0\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n### Top Versus Clans in a Location\n```python\napi.location_clan_versus(location_tag)\n```\nTop 200 versus clans in a given location\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"clanPoints\": 0,\n    \"clanVersusPoints\": 0\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n### Top Versus Players in a Location\n```python\napi.location_player_versus(location_tag)\n```\nTop 200 versus players in a given location\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"clan\": {\n      \"tag\": \"string\",\n      \"name\": \"string\",\n      \"badgeUrls\": {}\n    },\n    \"versusBattleWins\": 0,\n    \"tag\": \"string\",\n    \"name\": \"string\",\n    \"expLevel\": 0,\n    \"rank\": 0,\n    \"previousRank\": 0,\n    \"versusTrophies\": 0\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n\n\n## Leagues\n\n### List leagues\n```python\napi.league()\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"name\": {},\n    \"id\": 0,\n    \"iconUrls\": {}\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n### League Information\n```python\napi.league_id(league_tag)\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\n  \"name\": {},\n  \"id\": 0,\n  \"iconUrls\": {}\n}\n```\n</details>\n\n\n### List Season Leagues\n```python\napi.league_season(league_tag)\n```\nInformation is available only for Legend League\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"id\": \"string\"\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n### League Season Ranking\n```python\napi.league_season_id(league_tag, season_tag)\n```\nInformation is available only for Legend League\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"clan\": {\n      \"tag\": \"string\",\n      \"name\": \"string\",\n      \"badgeUrls\": {}\n    },\n    \"league\": {\n      \"name\": {},\n      \"id\": 0,\n      \"iconUrls\": {}\n    },\n    \"attackWins\": 0,\n    \"defenseWins\": 0,\n    \"tag\": \"string\",\n    \"name\": \"string\",\n    \"expLevel\": 0,\n    \"rank\": 0,\n    \"previousRank\": 0,\n    \"trophies\": 0\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n\n\n## Labels\n\n### List Clan Labels\n```python\napi.clan_leaguegroup(tag)\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"name\": {},\n    \"id\": 0,\n    \"iconUrls\": {}\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n### List Player Labels\n```python\napi.labels_players()\n```\n<details>\n <summary>Click to view output</summary>\n\n```text\n{\"items\":\n[\n  {\n    \"name\": {},\n    \"id\": 0,\n    \"iconUrls\": {}\n  }\n],\n\"paging\": {'cursors': {}}\n}\n```\n</details>\n\n\n## Credits\n- [All Contributors](../../contributors)\n\n*Note versions below 2.0.0 are not supported anymore*\n\n*DISCLAIMER: cocapi is not affiliated with SuperCell\u00a9.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A python wrapper around clash of clans api",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/tonybenoy/cocapi"
    },
    "split_keywords": [
        "clash",
        "of",
        "clans",
        "supercell",
        "api",
        "coc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0597a5fca9631d1e999e6306493bd4426f14b190117ed8d8aba3e9fbafd64f20",
                "md5": "afafd963e6df2efa35211cb2c90356b4",
                "sha256": "84d9a464d330e079ab8b10bd34e1048553d4d90656b617d24243ca5a67088d31"
            },
            "downloads": -1,
            "filename": "cocapi-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "afafd963e6df2efa35211cb2c90356b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18800,
            "upload_time": "2023-07-08T12:45:52",
            "upload_time_iso_8601": "2023-07-08T12:45:52.600659Z",
            "url": "https://files.pythonhosted.org/packages/05/97/a5fca9631d1e999e6306493bd4426f14b190117ed8d8aba3e9fbafd64f20/cocapi-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c85f029a1a530b4b1fed7787ac7a938bc42f46f4f045b4d94ea238b47578b577",
                "md5": "167c6492198d2bf0338bc97a6ddce9ad",
                "sha256": "22fa802838cf22f97fd667adbae8dda008515e4a1ab9f96709d6b2e713de1100"
            },
            "downloads": -1,
            "filename": "cocapi-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "167c6492198d2bf0338bc97a6ddce9ad",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21357,
            "upload_time": "2023-07-08T12:45:54",
            "upload_time_iso_8601": "2023-07-08T12:45:54.147632Z",
            "url": "https://files.pythonhosted.org/packages/c8/5f/029a1a530b4b1fed7787ac7a938bc42f46f4f045b4d94ea238b47578b577/cocapi-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-08 12:45:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tonybenoy",
    "github_project": "cocapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "cocapi"
}
        
Elapsed time: 0.10378s