This commit is contained in:
simonwt 2026-04-09 00:41:48 +01:00
parent 72a49285c1
commit 921b6f5d95

View file

@ -1,16 +1,30 @@
# Basic usage (without an .env)
## Setup
Here's how to make a post to the homepage (aka Maintrunk)
Here's a very basic example of setting up:
```python
import trustcafeapiwrapper
# Setup the API Client
API = trustcafeapiwrapper.APIClient(
client_id="YOUR_CLIENT_ID"
client_secret="YOUR_CLIENT_SECRET"
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
env="alpha" # alpha | production.
debug=False
)
```
or with .env
```python
import trustcafeapiwrapper, os
from dotenv import load_dotenv
load_dotenv()
API = APIClient(
client_id=os.getenv("client_id"),
client_secret=os.getenv("client_secret"),
env="alpha", # alpha | production.
debug=False,
)
```
## Use a wrapper
Wrappers make it as simple as possible to perform an action.