Metadata-Version: 2.1
Name: clashapi
Version: 1.1
Summary: Update IP address of Clash of Clans and/or Clash Royale API keys with token fetching
Home-page: https://github.com/roshan1337d/clashapi
Author: Roshan Dash
Author-email: roshan1337d@gmail.com
License: MIT
Keywords: coc,cr,clash of clans,clash royale,clash,royale,clan,api
Platform: UNKNOWN
Description-Content-Type: text/markdown

# ClashAPI

Using your developer account's login email and password, update the IP address of all your existing Clash of Clans and/or Clash Royale API keys to the current one, and obtain their tokens.

## Getting Started

### Installing

```bash
pip install clashapi
```

### Usage

```python
import clashapi

# Clash of Clans
tokens = clashapi.coc("email", "password")

# Clash Royale
tokens = clashapi.cr("email", "password")

# tokens is a list of api key token strings that you can now use to access the COC/CR APIs
```

### Quick Example

```python
import requests
import clashapi
tokens = clashapi.coc("email", "password")

response = requests.get(url="https://api.clashofclans.com/v1/clans/%23208GJG2J", headers={"Accept": "application/json", "authorization": f"Bearer {tokens[0]}"})
print(response.json())
```


