docs
This commit is contained in:
parent
72a49285c1
commit
921b6f5d95
1 changed files with 18 additions and 4 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue