Changed API project name
This commit is contained in:
parent
18b5b998a8
commit
f661f86533
README.md
photosapi_client
__init__.py
setup.pyapi
__init__.py
client.pyerrors.pydefault
__init__.pyalbum_create_albums_post.pyalbum_delete_album_id_delete.pyalbum_find_albums_get.pyalbum_patch_albums_id_patch.pyalbum_put_albums_id_put.pylogin_for_access_token_token_post.pyphoto_delete_photos_id_delete.pyphoto_find_albums_album_photos_get.pyphoto_get_photos_id_get.pyphoto_get_token_token_photo_token_get.pyphoto_move_photos_id_put.pyphoto_patch_photos_id_patch.pyphoto_upload_albums_album_photos_post.pyuser_confirm_users_user_confirm_get.pyuser_confirm_users_user_confirm_patch.pyuser_create_users_post.pyuser_delete_users_me_delete.pyuser_me_users_me_get.pyvideo_delete_videos_id_delete.pyvideo_find_albums_album_videos_get.pyvideo_get_videos_id_get.pyvideo_move_videos_id_put.pyvideo_patch_videos_id_patch.pyvideo_upload_albums_album_videos_post.py
models
__init__.pyalbum.pyalbum_modified.pybody_login_for_access_token_token_post.pybody_photo_upload_albums_album_photos_post.pybody_user_create_users_post.pybody_user_delete_users_me_delete.pybody_video_upload_albums_album_videos_post.pyhttp_validation_error.pyphoto.pyphoto_public.pyphoto_search.pysearch_results_album.pysearch_results_photo.pysearch_results_video.pytoken.pyuser.pyvalidation_error.pyvideo.pyvideo_public.pyvideo_search.py
py.typedtypes.py
18
README.md
18
README.md
@ -5,7 +5,7 @@ A client library for accessing END PLAY Photos
|
|||||||
First, create a client:
|
First, create a client:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from PhotosAPI_Client import Client
|
from photosapi_client import Client
|
||||||
|
|
||||||
client = Client(base_url="https://api.example.com")
|
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:
|
If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from PhotosAPI_Client import AuthenticatedClient
|
from photosapi_client import AuthenticatedClient
|
||||||
|
|
||||||
client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken")
|
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:
|
Now call your endpoint and use your models:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from PhotosAPI_Client.models import MyDataModel
|
from photosapi_client.models import MyDataModel
|
||||||
from PhotosAPI_Client.api.my_tag import get_my_data_model
|
from photosapi_client.api.my_tag import get_my_data_model
|
||||||
from PhotosAPI_Client.types import Response
|
from photosapi_client.types import Response
|
||||||
|
|
||||||
my_data: MyDataModel = get_my_data_model.sync(client=client)
|
my_data: MyDataModel = get_my_data_model.sync(client=client)
|
||||||
# or if you need more info (e.g. status_code)
|
# 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:
|
Or do the same thing with an async version:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from PhotosAPI_Client.models import MyDataModel
|
from photosapi_client.models import MyDataModel
|
||||||
from PhotosAPI_Client.api.my_tag import get_my_data_model
|
from photosapi_client.api.my_tag import get_my_data_model
|
||||||
from PhotosAPI_Client.types import Response
|
from photosapi_client.types import Response
|
||||||
|
|
||||||
my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
|
my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
|
||||||
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(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. 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. 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
|
## Building / publishing this Client
|
||||||
This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics:
|
This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics:
|
||||||
|
0
PhotosAPI_Client/models/http_validation_error.py → photosapi_client/models/http_validation_error.py
0
PhotosAPI_Client/models/http_validation_error.py → photosapi_client/models/http_validation_error.py
2
setup.py
2
setup.py
@ -14,5 +14,5 @@ setup(
|
|||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
python_requires=">=3.7, <4",
|
python_requires=">=3.7, <4",
|
||||||
install_requires=["httpx >= 0.15.0, < 0.24.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"],
|
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"]},
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user