- create_pets - Create a pet
- list_pets - List all pets
- show_pet_by_id - Info for a specific pet
Create a pet
import petstore
s = petstore.Petstore()
res = s.pets.create_pets()
if res.status_code == 200:
# handle response
List all pets
import petstore
from petstore.models import operations
s = petstore.Petstore()
req = operations.ListPetsRequest(
limit=548814,
)
res = s.pets.list_pets(req)
if res.pets is not None:
# handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListPetsRequest | ✔️ | The request object to use for the request. |
Info for a specific pet
import petstore
from petstore.models import operations
s = petstore.Petstore()
req = operations.ShowPetByIDRequest(
pet_id='provident',
)
res = s.pets.show_pet_by_id(req)
if res.pet is not None:
# handle response
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ShowPetByIDRequest | ✔️ | The request object to use for the request. |