Colin Henry 6e60671cfd WIP
2020-05-20 23:18:58 -07:00

8.1 KiB

\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(ctx, body)

Add a new pet to the store

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body Pet Pet object that needs to be added to the store

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

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

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

DeletePet

DeletePet(ctx, petId, optional)

Deletes a pet

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
petId int64 Pet id to delete
optional *DeletePetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a DeletePetOpts struct

Name Type Description Notes

apiKey | optional.String| |

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

FindPetsByStatus

[]Pet FindPetsByStatus(ctx, status)

Finds Pets by status

Multiple status values can be provided with comma separated strings

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
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(ctx, tags)

Finds Pets by tags

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

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
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(ctx, petId)

Find pet by ID

Returns a single pet

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
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(ctx, body)

Update an existing pet

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body Pet Pet object that needs to be added to the store

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

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

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

UpdatePetWithForm

UpdatePetWithForm(ctx, petId, optional)

Updates a pet in the store with form data

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
petId int64 ID of pet that needs to be updated
optional *UpdatePetWithFormOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct

Name Type Description Notes

name | optional.String| Updated name of the pet | status | optional.String| Updated status of the pet |

Return type

(empty response body)

Authorization

petstore_auth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

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

UploadFile

ApiResponse UploadFile(ctx, petId, optional)

uploads an image

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
petId int64 ID of pet to update
optional *UploadFileOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a UploadFileOpts struct

Name Type Description Notes

additionalMetadata | optional.String| Additional data to pass to server | file | *optional.Interface of os.File***optional.os.File| file to upload |

Return type

ApiResponse

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]