Changed API project name

This commit is contained in:
Profitroll 2023-03-22 22:04:25 +01:00
parent 18b5b998a8
commit f661f86533
54 changed files with 10 additions and 10 deletions

View File

@ -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:

View File

@ -14,5 +14,5 @@ setup(
packages=find_packages(),
python_requires=">=3.7, <4",
install_requires=["httpx >= 0.15.0, < 0.24.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
package_data={"PhotosAPI_Client": ["py.typed"]},
package_data={"photosapi_client": ["py.typed"]},
)