apiClient = $apiClient; } /** * getPetById * Find pet by ID * petId, string: ID of pet that needs to be fetched (required) * @return Pet */ public function getPetById($petId) { //parse inputs $resourcePath = "/pet.{format}/{petId}"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "GET"; $queryParams = array(); $headerParams = array(); if($petId != null) { $resourcePath = str_replace("{" . "petId" . "}", $petId, $resourcePath); } //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); if(! $response){ return null; } $responseObject = $this->apiClient->deserialize($response, 'Pet'); return $responseObject; } /** * addPet * Add a new pet to the store * body, Pet: Pet object that needs to be added to the store (required) * @return */ public function addPet($body) { //parse inputs $resourcePath = "/pet.{format}"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "POST"; $queryParams = array(); $headerParams = array(); //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); } /** * updatePet * Update an existing pet * body, Pet: Pet object that needs to be updated in the store (required) * @return */ public function updatePet($body) { //parse inputs $resourcePath = "/pet.{format}"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "PUT"; $queryParams = array(); $headerParams = array(); //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); } /** * findPetsByStatus * Finds Pets by status * status, string: Status values that need to be considered for filter (required) * @return array[Pet] */ public function findPetsByStatus($status) { //parse inputs $resourcePath = "/pet.{format}/findByStatus"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "GET"; $queryParams = array(); $headerParams = array(); if($status != null) { $queryParams['status'] = $this->apiClient->toPathValue($status); } //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); if(! $response){ return null; } $responseObject = $this->apiClient->deserialize($response, 'array[Pet]'); return $responseObject; } /** * findPetsByTags * Finds Pets by tags * tags, string: Tags to filter by (required) * @return array[Pet] */ public function findPetsByTags($tags) { //parse inputs $resourcePath = "/pet.{format}/findByTags"; $resourcePath = str_replace("{format}", "json", $resourcePath); $method = "GET"; $queryParams = array(); $headerParams = array(); if($tags != null) { $queryParams['tags'] = $this->apiClient->toPathValue($tags); } //make the API Call if (! isset($body)) { $body = null; } $response = $this->apiClient->callAPI($resourcePath, $method, $queryParams, $body, $headerParams); if(! $response){ return null; } $responseObject = $this->apiClient->deserialize($response, 'array[Pet]'); return $responseObject; } }