Changed API project name
This commit is contained in:
parent
18b5b998a8
commit
f661f86533
18
README.md
18
README.md
@ -5,7 +5,7 @@ A client library for accessing END PLAY Photos
|
||||
First, create a client:
|
||||
|
||||
```python
|
||||
from PhotosAPI_Client import Client
|
||||
from photosapi_client import Client
|
||||
|
||||
client = Client(base_url="https://api.example.com")
|
||||
```
|
||||
@ -13,7 +13,7 @@ client = Client(base_url="https://api.example.com")
|
||||
If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
|
||||
|
||||
```python
|
||||
from PhotosAPI_Client import AuthenticatedClient
|
||||
from photosapi_client import AuthenticatedClient
|
||||
|
||||
client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
|
||||
```
|
||||
@ -21,9 +21,9 @@ client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSec
|
||||
Now call your endpoint and use your models:
|
||||
|
||||
```python
|
||||
from PhotosAPI_Client.models import MyDataModel
|
||||
from PhotosAPI_Client.api.my_tag import get_my_data_model
|
||||
from PhotosAPI_Client.types import Response
|
||||
from photosapi_client.models import MyDataModel
|
||||
from photosapi_client.api.my_tag import get_my_data_model
|
||||
from photosapi_client.types import Response
|
||||
|
||||
my_data: MyDataModel = get_my_data_model.sync(client=client)
|
||||
# or if you need more info (e.g. status_code)
|
||||
@ -33,9 +33,9 @@ response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)
|
||||
Or do the same thing with an async version:
|
||||
|
||||
```python
|
||||
from PhotosAPI_Client.models import MyDataModel
|
||||
from PhotosAPI_Client.api.my_tag import get_my_data_model
|
||||
from PhotosAPI_Client.types import Response
|
||||
from photosapi_client.models import MyDataModel
|
||||
from photosapi_client.api.my_tag import get_my_data_model
|
||||
from photosapi_client.types import Response
|
||||
|
||||
my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
|
||||
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)
|
||||
@ -72,7 +72,7 @@ Things to know:
|
||||
|
||||
1. All path/query params, and bodies become method arguments.
|
||||
1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
|
||||
1. Any endpoint which did not have a tag will be in `PhotosAPI_Client.api.default`
|
||||
1. Any endpoint which did not have a tag will be in `photosapi_client.api.default`
|
||||
|
||||
## Building / publishing this Client
|
||||
This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics:
|
||||
|
Loading…
Reference in New Issue
Block a user