Ally's PetStore API

PetApi
in package

PetApi Class Doc Comment

Tags
category

Class

author

OpenAPI Generator team

link
https://openapi-generator.tech

Table of Contents

$client  : ClientInterface
$config  : Configuration
$headerSelector  : HeaderSelector
$hostIndex  : int
__construct()  : mixed
addPet()  : Pet
Operation addPet
addPetAsync()  : PromiseInterface
Operation addPetAsync
addPetAsyncWithHttpInfo()  : PromiseInterface
Operation addPetAsyncWithHttpInfo
addPetRequest()  : Request
Create request for operation 'addPet'
addPetWithHttpInfo()  : array<string|int, mixed>
Operation addPetWithHttpInfo
deletePet()  : void
Operation deletePet
deletePetAsync()  : PromiseInterface
Operation deletePetAsync
deletePetAsyncWithHttpInfo()  : PromiseInterface
Operation deletePetAsyncWithHttpInfo
deletePetRequest()  : Request
Create request for operation 'deletePet'
deletePetWithHttpInfo()  : array<string|int, mixed>
Operation deletePetWithHttpInfo
findPetsByStatus()  : array<string|int, Pet>
Operation findPetsByStatus
findPetsByStatusAsync()  : PromiseInterface
Operation findPetsByStatusAsync
findPetsByStatusAsyncWithHttpInfo()  : PromiseInterface
Operation findPetsByStatusAsyncWithHttpInfo
findPetsByStatusRequest()  : Request
Create request for operation 'findPetsByStatus'
findPetsByStatusWithHttpInfo()  : array<string|int, mixed>
Operation findPetsByStatusWithHttpInfo
findPetsByTags()  : array<string|int, Pet>
Operation findPetsByTags
findPetsByTagsAsync()  : PromiseInterface
Operation findPetsByTagsAsync
findPetsByTagsAsyncWithHttpInfo()  : PromiseInterface
Operation findPetsByTagsAsyncWithHttpInfo
findPetsByTagsRequest()  : Request
Create request for operation 'findPetsByTags'
findPetsByTagsWithHttpInfo()  : array<string|int, mixed>
Operation findPetsByTagsWithHttpInfo
getConfig()  : Configuration
getHostIndex()  : int
Get the host index
getPetById()  : Pet
Operation getPetById
getPetByIdAsync()  : PromiseInterface
Operation getPetByIdAsync
getPetByIdAsyncWithHttpInfo()  : PromiseInterface
Operation getPetByIdAsyncWithHttpInfo
getPetByIdRequest()  : Request
Create request for operation 'getPetById'
getPetByIdWithHttpInfo()  : array<string|int, mixed>
Operation getPetByIdWithHttpInfo
setHostIndex()  : void
Set the host index
updatePet()  : Pet
Operation updatePet
updatePetAsync()  : PromiseInterface
Operation updatePetAsync
updatePetAsyncWithHttpInfo()  : PromiseInterface
Operation updatePetAsyncWithHttpInfo
updatePetRequest()  : Request
Create request for operation 'updatePet'
updatePetWithForm()  : void
Operation updatePetWithForm
updatePetWithFormAsync()  : PromiseInterface
Operation updatePetWithFormAsync
updatePetWithFormAsyncWithHttpInfo()  : PromiseInterface
Operation updatePetWithFormAsyncWithHttpInfo
updatePetWithFormRequest()  : Request
Create request for operation 'updatePetWithForm'
updatePetWithFormWithHttpInfo()  : array<string|int, mixed>
Operation updatePetWithFormWithHttpInfo
updatePetWithHttpInfo()  : array<string|int, mixed>
Operation updatePetWithHttpInfo
uploadFile()  : ApiResponse
Operation uploadFile
uploadFileAsync()  : PromiseInterface
Operation uploadFileAsync
uploadFileAsyncWithHttpInfo()  : PromiseInterface
Operation uploadFileAsyncWithHttpInfo
uploadFileRequest()  : Request
Create request for operation 'uploadFile'
uploadFileWithHttpInfo()  : array<string|int, mixed>
Operation uploadFileWithHttpInfo
createHttpClientOption()  : array<string|int, mixed>
Create http client option

Properties

$client

protected ClientInterface $client
Tags

$hostIndex

protected int $hostIndex

Host index

Tags

Methods

__construct()

public __construct([ClientInterface $client = null ][, Configuration $config = null ][, HeaderSelector $selector = null ][, int $hostIndex = 0 ]) : mixed
Parameters
$client : ClientInterface = null
$config : Configuration = null
$selector : HeaderSelector = null
$hostIndex : int = 0

(Optional) host index to select the list of hosts if defined in the OpenAPI spec

Tags
Return values
mixed

addPet()

Operation addPet

public addPet(Pet $pet) : Pet

Add a new pet to the store

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
Pet

addPetAsync()

Operation addPetAsync

public addPetAsync(Pet $pet) : PromiseInterface

Add a new pet to the store

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

addPetAsyncWithHttpInfo()

Operation addPetAsyncWithHttpInfo

public addPetAsyncWithHttpInfo(Pet $pet) : PromiseInterface

Add a new pet to the store

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

addPetRequest()

Create request for operation 'addPet'

public addPetRequest(Pet $pet) : Request
Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
InvalidArgumentException
Return values
Request

addPetWithHttpInfo()

Operation addPetWithHttpInfo

public addPetWithHttpInfo(Pet $pet) : array<string|int, mixed>

Add a new pet to the store

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of \Ally\PetStore\Schema\Pet, HTTP status code, HTTP response headers (array of strings)

deletePet()

Operation deletePet

public deletePet(int $pet_id[, string $api_key = null ]) : void

Deletes a pet

Parameters
$pet_id : int

Pet id to delete (required)

$api_key : string = null

api_key (optional)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
void

deletePetAsync()

Operation deletePetAsync

public deletePetAsync(int $pet_id[, string $api_key = null ]) : PromiseInterface

Deletes a pet

Parameters
$pet_id : int

Pet id to delete (required)

$api_key : string = null

(optional)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

deletePetAsyncWithHttpInfo()

Operation deletePetAsyncWithHttpInfo

public deletePetAsyncWithHttpInfo(int $pet_id[, string $api_key = null ]) : PromiseInterface

Deletes a pet

Parameters
$pet_id : int

Pet id to delete (required)

$api_key : string = null

(optional)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

deletePetRequest()

Create request for operation 'deletePet'

public deletePetRequest(int $pet_id[, string $api_key = null ]) : Request
Parameters
$pet_id : int

Pet id to delete (required)

$api_key : string = null

(optional)

Tags
throws
InvalidArgumentException
Return values
Request

deletePetWithHttpInfo()

Operation deletePetWithHttpInfo

public deletePetWithHttpInfo(int $pet_id[, string $api_key = null ]) : array<string|int, mixed>

Deletes a pet

Parameters
$pet_id : int

Pet id to delete (required)

$api_key : string = null

(optional)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of null, HTTP status code, HTTP response headers (array of strings)

findPetsByStatus()

Operation findPetsByStatus

public findPetsByStatus(array<string|int, string> $status) : array<string|int, Pet>

Finds Pets by status

Parameters
$status : array<string|int, string>

Status values that need to be considered for filter (required) (deprecated)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, Pet>

findPetsByStatusAsync()

Operation findPetsByStatusAsync

public findPetsByStatusAsync(array<string|int, string> $status) : PromiseInterface

Finds Pets by status

Parameters
$status : array<string|int, string>

Status values that need to be considered for filter (required) (deprecated)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

findPetsByStatusAsyncWithHttpInfo()

Operation findPetsByStatusAsyncWithHttpInfo

public findPetsByStatusAsyncWithHttpInfo(array<string|int, string> $status) : PromiseInterface

Finds Pets by status

Parameters
$status : array<string|int, string>

Status values that need to be considered for filter (required) (deprecated)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

findPetsByStatusRequest()

Create request for operation 'findPetsByStatus'

public findPetsByStatusRequest(array<string|int, string> $status) : Request
Parameters
$status : array<string|int, string>

Status values that need to be considered for filter (required) (deprecated)

Tags
throws
InvalidArgumentException
Return values
Request

findPetsByStatusWithHttpInfo()

Operation findPetsByStatusWithHttpInfo

public findPetsByStatusWithHttpInfo(array<string|int, string> $status) : array<string|int, mixed>

Finds Pets by status

Parameters
$status : array<string|int, string>

Status values that need to be considered for filter (required) (deprecated)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of \Ally\PetStore\Schema\Pet[], HTTP status code, HTTP response headers (array of strings)

findPetsByTags()

Operation findPetsByTags

public findPetsByTags(array<string|int, string> $tags) : array<string|int, Pet>

Finds Pets by tags

Parameters
$tags : array<string|int, string>

Tags to filter by (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
deprecated
Return values
array<string|int, Pet>

findPetsByTagsAsync()

Operation findPetsByTagsAsync

public findPetsByTagsAsync(array<string|int, string> $tags) : PromiseInterface

Finds Pets by tags

Parameters
$tags : array<string|int, string>

Tags to filter by (required)

Tags
throws
InvalidArgumentException
deprecated
Return values
PromiseInterface

findPetsByTagsAsyncWithHttpInfo()

Operation findPetsByTagsAsyncWithHttpInfo

public findPetsByTagsAsyncWithHttpInfo(array<string|int, string> $tags) : PromiseInterface

Finds Pets by tags

Parameters
$tags : array<string|int, string>

Tags to filter by (required)

Tags
throws
InvalidArgumentException
deprecated
Return values
PromiseInterface

findPetsByTagsRequest()

Create request for operation 'findPetsByTags'

public findPetsByTagsRequest(array<string|int, string> $tags) : Request
Parameters
$tags : array<string|int, string>

Tags to filter by (required)

Tags
throws
InvalidArgumentException
deprecated
Return values
Request

findPetsByTagsWithHttpInfo()

Operation findPetsByTagsWithHttpInfo

public findPetsByTagsWithHttpInfo(array<string|int, string> $tags) : array<string|int, mixed>

Finds Pets by tags

Parameters
$tags : array<string|int, string>

Tags to filter by (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
deprecated
Return values
array<string|int, mixed>

of \Ally\PetStore\Schema\Pet[], HTTP status code, HTTP response headers (array of strings)

getHostIndex()

Get the host index

public getHostIndex() : int
Tags
Return values
int

Host index

getPetById()

Operation getPetById

public getPetById(int $pet_id) : Pet

Find pet by ID

Parameters
$pet_id : int

ID of pet to return (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
Pet

getPetByIdAsync()

Operation getPetByIdAsync

public getPetByIdAsync(int $pet_id) : PromiseInterface

Find pet by ID

Parameters
$pet_id : int

ID of pet to return (required)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

getPetByIdAsyncWithHttpInfo()

Operation getPetByIdAsyncWithHttpInfo

public getPetByIdAsyncWithHttpInfo(int $pet_id) : PromiseInterface

Find pet by ID

Parameters
$pet_id : int

ID of pet to return (required)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

getPetByIdRequest()

Create request for operation 'getPetById'

public getPetByIdRequest(int $pet_id) : Request
Parameters
$pet_id : int

ID of pet to return (required)

Tags
throws
InvalidArgumentException
Return values
Request

getPetByIdWithHttpInfo()

Operation getPetByIdWithHttpInfo

public getPetByIdWithHttpInfo(int $pet_id) : array<string|int, mixed>

Find pet by ID

Parameters
$pet_id : int

ID of pet to return (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of \Ally\PetStore\Schema\Pet, HTTP status code, HTTP response headers (array of strings)

setHostIndex()

Set the host index

public setHostIndex(int $hostIndex) : void
Parameters
$hostIndex : int

Host index (required)

Tags
Return values
void

updatePet()

Operation updatePet

public updatePet(Pet $pet) : Pet

Update an existing pet

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
Pet

updatePetAsync()

Operation updatePetAsync

public updatePetAsync(Pet $pet) : PromiseInterface

Update an existing pet

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

updatePetAsyncWithHttpInfo()

Operation updatePetAsyncWithHttpInfo

public updatePetAsyncWithHttpInfo(Pet $pet) : PromiseInterface

Update an existing pet

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

updatePetRequest()

Create request for operation 'updatePet'

public updatePetRequest(Pet $pet) : Request
Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
InvalidArgumentException
Return values
Request

updatePetWithForm()

Operation updatePetWithForm

public updatePetWithForm(int $pet_id[, string $name = null ][, string $status = null ]) : void

Updates a pet in the store with form data

Parameters
$pet_id : int

ID of pet that needs to be updated (required)

$name : string = null

Updated name of the pet (optional)

$status : string = null

Updated status of the pet (optional)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
void

updatePetWithFormAsync()

Operation updatePetWithFormAsync

public updatePetWithFormAsync(int $pet_id[, string $name = null ][, string $status = null ]) : PromiseInterface

Updates a pet in the store with form data

Parameters
$pet_id : int

ID of pet that needs to be updated (required)

$name : string = null

Updated name of the pet (optional)

$status : string = null

Updated status of the pet (optional)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

updatePetWithFormAsyncWithHttpInfo()

Operation updatePetWithFormAsyncWithHttpInfo

public updatePetWithFormAsyncWithHttpInfo(int $pet_id[, string $name = null ][, string $status = null ]) : PromiseInterface

Updates a pet in the store with form data

Parameters
$pet_id : int

ID of pet that needs to be updated (required)

$name : string = null

Updated name of the pet (optional)

$status : string = null

Updated status of the pet (optional)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

updatePetWithFormRequest()

Create request for operation 'updatePetWithForm'

public updatePetWithFormRequest(int $pet_id[, string $name = null ][, string $status = null ]) : Request
Parameters
$pet_id : int

ID of pet that needs to be updated (required)

$name : string = null

Updated name of the pet (optional)

$status : string = null

Updated status of the pet (optional)

Tags
throws
InvalidArgumentException
Return values
Request

updatePetWithFormWithHttpInfo()

Operation updatePetWithFormWithHttpInfo

public updatePetWithFormWithHttpInfo(int $pet_id[, string $name = null ][, string $status = null ]) : array<string|int, mixed>

Updates a pet in the store with form data

Parameters
$pet_id : int

ID of pet that needs to be updated (required)

$name : string = null

Updated name of the pet (optional)

$status : string = null

Updated status of the pet (optional)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of null, HTTP status code, HTTP response headers (array of strings)

updatePetWithHttpInfo()

Operation updatePetWithHttpInfo

public updatePetWithHttpInfo(Pet $pet) : array<string|int, mixed>

Update an existing pet

Parameters
$pet : Pet

Pet object that needs to be added to the store (required)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of \Ally\PetStore\Schema\Pet, HTTP status code, HTTP response headers (array of strings)

uploadFile()

Operation uploadFile

public uploadFile(int $pet_id[, string $additional_metadata = null ][, SplFileObject $file = null ]) : ApiResponse

uploads an image

Parameters
$pet_id : int

ID of pet to update (required)

$additional_metadata : string = null

Additional data to pass to server (optional)

$file : SplFileObject = null

file to upload (optional)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
ApiResponse

uploadFileAsync()

Operation uploadFileAsync

public uploadFileAsync(int $pet_id[, string $additional_metadata = null ][, SplFileObject $file = null ]) : PromiseInterface

uploads an image

Parameters
$pet_id : int

ID of pet to update (required)

$additional_metadata : string = null

Additional data to pass to server (optional)

$file : SplFileObject = null

file to upload (optional)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

uploadFileAsyncWithHttpInfo()

Operation uploadFileAsyncWithHttpInfo

public uploadFileAsyncWithHttpInfo(int $pet_id[, string $additional_metadata = null ][, SplFileObject $file = null ]) : PromiseInterface

uploads an image

Parameters
$pet_id : int

ID of pet to update (required)

$additional_metadata : string = null

Additional data to pass to server (optional)

$file : SplFileObject = null

file to upload (optional)

Tags
throws
InvalidArgumentException
Return values
PromiseInterface

uploadFileRequest()

Create request for operation 'uploadFile'

public uploadFileRequest(int $pet_id[, string $additional_metadata = null ][, SplFileObject $file = null ]) : Request
Parameters
$pet_id : int

ID of pet to update (required)

$additional_metadata : string = null

Additional data to pass to server (optional)

$file : SplFileObject = null

file to upload (optional)

Tags
throws
InvalidArgumentException
Return values
Request

uploadFileWithHttpInfo()

Operation uploadFileWithHttpInfo

public uploadFileWithHttpInfo(int $pet_id[, string $additional_metadata = null ][, SplFileObject $file = null ]) : array<string|int, mixed>

uploads an image

Parameters
$pet_id : int

ID of pet to update (required)

$additional_metadata : string = null

Additional data to pass to server (optional)

$file : SplFileObject = null

file to upload (optional)

Tags
throws
ApiException

on non-2xx response

throws
InvalidArgumentException
Return values
array<string|int, mixed>

of \Ally\PetStore\Schema\ApiResponse, HTTP status code, HTTP response headers (array of strings)

createHttpClientOption()

Create http client option

protected createHttpClientOption() : array<string|int, mixed>
Tags
throws
RuntimeException

on file opening failure

Return values
array<string|int, mixed>

of http client options


        

Search results