Skip to content

Latest commit

 

History

History
253 lines (140 loc) · 6.5 KB

File metadata and controls

253 lines (140 loc) · 6.5 KB

\PetApi

All URIs are relative to http://petstore.swagger.io/v2

Method HTTP request Description
AddPet Post /pet Add a new pet to the store
DeletePet Delete /pet/{petId} Deletes a pet
FindPetsByStatus Get /pet/findByStatus Finds Pets by status
FindPetsByTags Get /pet/findByTags Finds Pets by tags
GetPetById Get /pet/{petId} Find pet by ID
UpdatePet Put /pet Update an existing pet
UpdatePetWithForm Post /pet/{petId} Updates a pet in the store with form data
UploadFile Post /pet/{petId}/uploadImage uploads an image

AddPet

AddPet($body)

Add a new pet to the store

Parameters

Name Type Description Notes
body Pet Pet object that needs to be added to the store

Return type

void (empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeletePet

DeletePet($petId, $apiKey)

Deletes a pet

Parameters

Name Type Description Notes
petId int64 Pet id to delete
apiKey string [optional]

Return type

void (empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindPetsByStatus

[]Pet FindPetsByStatus($status)

Finds Pets by status

Multiple status values can be provided with comma separated strings

Parameters

Name Type Description Notes
status []string Status values that need to be considered for filter

Return type

[]Pet

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

FindPetsByTags

[]Pet FindPetsByTags($tags)

Finds Pets by tags

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Parameters

Name Type Description Notes
tags []string Tags to filter by

Return type

[]Pet

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPetById

Pet GetPetById($petId)

Find pet by ID

Returns a single pet

Parameters

Name Type Description Notes
petId int64 ID of pet to return

Return type

Pet

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdatePet

UpdatePet($body)

Update an existing pet

Parameters

Name Type Description Notes
body Pet Pet object that needs to be added to the store

Return type

void (empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/json, application/xml
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdatePetWithForm

UpdatePetWithForm($petId, $name, $status)

Updates a pet in the store with form data

Parameters

Name Type Description Notes
petId int64 ID of pet that needs to be updated
name string Updated name of the pet [optional]
status string Updated status of the pet [optional]

Return type

void (empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/xml, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UploadFile

ModelApiResponse UploadFile($petId, $additionalMetadata, $file)

uploads an image

Parameters

Name Type Description Notes
petId int64 ID of pet to update
additionalMetadata string Additional data to pass to server [optional]
file *os.File file to upload [optional]

Return type

ModelApiResponse

Authorization

petstore_auth

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]