class PetStore::PetApi

Defined in:

pet_store/api/pet_api.cr

Constant Summary

ADD_PET_MAX_LENGTH_FOR_CSRFTOKEN = 64
ADD_PET_MIN_LENGTH_FOR_CSRFTOKEN = 64
FIND_PETS_BY_STATUS_VALID_VALUES_FOR_STATUS = String.static_array("available", "pending", "sold")

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_client : PetStore::ApiClient = ApiClient.default) #

[View source]

Instance Method Detail

def add_pet(*, csrftoken : String | Nil = nil, pet : PetStore::Pet | Nil = nil) : Nil #

Add a new pet to the store

@required @param csrftoken [String?] csrf token in cookie @required @param pet [PetStore::Pet?] Pet object that needs to be added to the store @return [Nil]


[View source]
def add_pet(*, csrftoken : String | Nil = nil, pet : PetStore::Pet | Nil = nil, &block : Crest::Response -> ) : Nil #

Add a new pet to the store

@required @param csrftoken [String?] csrf token in cookie @required @param pet [PetStore::Pet?] Pet object that needs to be added to the store @return nil


[View source]
def add_pet_with_http_info(*, csrftoken : String | Nil = nil, pet : PetStore::Pet | Nil = nil) : Tuple(Nil, Int32, Hash(String, Array(String) | String)) #

Add a new pet to the store

@required @param csrftoken [String?] csrf token in cookie @required @param pet [PetStore::Pet?] Pet object that needs to be added to the store @return [Tuple(Nil, Integer, Hash)] Nil, response status code and response headers


[View source]
def api_client : ApiClient #

[View source]
def api_client=(api_client : ApiClient) #

[View source]
def build_api_request_for_add_pet(*, csrftoken : String | Nil = nil, pet : PetStore::Pet | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_delete_pet(*, pet_id : Int64 | Nil = nil, api_key : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_find_pets_by_status(*, status : Array(String) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_find_pets_by_tags(*, tags : Array(String) | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_get_pet_by_id(*, pet_id : Int64 | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_update_pet(*, pet : PetStore::Pet | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_update_pet_with_form(*, pet_id : Int64 | Nil = nil, name : String | Nil = nil, status : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_upload_file(*, pet_id : Int64 | Nil = nil, additional_metadata : String | Nil = nil, file : ::File | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def build_api_request_for_upload_file_with_required_file(*, pet_id : Int64 | Nil = nil, required_file : ::File | Nil = nil, additional_metadata : String | Nil = nil) : Crest::Request #

@return Crest::Request


[View source]
def client_side_validation(*args, **options) #

[View source]
def client_side_validation(*args, **options, &) #

[View source]
def debugging(*args, **options) #

[View source]
def debugging(*args, **options, &) #

[View source]
def delete_pet(*, pet_id : Int64 | Nil = nil, api_key : String | Nil = nil) : Nil #

Deletes a pet

@required @param pet_id [Int64?] Pet id to delete @optional @param api_key [String?] @return [Nil]


[View source]
def delete_pet(*, pet_id : Int64 | Nil = nil, api_key : String | Nil = nil, &block : Crest::Response -> ) : Nil #

Deletes a pet

@required @param pet_id [Int64?] Pet id to delete @optional @param api_key [String?] @return nil


[View source]
def delete_pet_with_http_info(*, pet_id : Int64 | Nil = nil, api_key : String | Nil = nil) : Tuple(Nil, Int32, Hash(String, Array(String) | String)) #

Deletes a pet

@required @param pet_id [Int64?] Pet id to delete @optional @param api_key [String?] @return [Tuple(Nil, Integer, Hash)] Nil, response status code and response headers


[View source]
def find_pets_by_status(*, status : Array(String) | Nil = nil) : Array(PetStore::Pet) #

Finds Pets by status Multiple status values can be provided with comma separated strings @required @param status [Array(String)?] Status values that need to be considered for filter @return [Array(PetStore::Pet)]


[View source]
def find_pets_by_status(*, status : Array(String) | Nil = nil, &block : Crest::Response -> ) : Nil #

Finds Pets by status Multiple status values can be provided with comma separated strings @required @param status [Array(String)?] Status values that need to be considered for filter @return nil


[View source]
def find_pets_by_status_with_http_info(*, status : Array(String) | Nil = nil) : Tuple(Array(PetStore::Pet), Int32, Hash(String, Array(String) | String)) #

Finds Pets by status Multiple status values can be provided with comma separated strings @required @param status [Array(String)?] Status values that need to be considered for filter @return [Tuple(Array(PetStore::Pet), Integer, Hash)] Array(PetStore::Pet), response status code and response headers


[View source]
def find_pets_by_tags(*, tags : Array(String) | Nil = nil) : Array(PetStore::Pet) #

Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @required @param tags [Array(String)?] Tags to filter by @return [Array(PetStore::Pet)]


[View source]
def find_pets_by_tags(*, tags : Array(String) | Nil = nil, &block : Crest::Response -> ) : Nil #

Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @required @param tags [Array(String)?] Tags to filter by @return nil


[View source]
def find_pets_by_tags_with_http_info(*, tags : Array(String) | Nil = nil) : Tuple(Array(PetStore::Pet), Int32, Hash(String, Array(String) | String)) #

Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. @required @param tags [Array(String)?] Tags to filter by @return [Tuple(Array(PetStore::Pet), Integer, Hash)] Array(PetStore::Pet), response status code and response headers


[View source]
def get_pet_by_id(*, pet_id : Int64 | Nil = nil) : PetStore::Pet #

Find pet by ID Returns a single pet @required @param pet_id [Int64?] ID of pet to return @return [PetStore::Pet]


[View source]
def get_pet_by_id(*, pet_id : Int64 | Nil = nil, &block : Crest::Response -> ) : Nil #

Find pet by ID Returns a single pet @required @param pet_id [Int64?] ID of pet to return @return nil


[View source]
def get_pet_by_id_with_http_info(*, pet_id : Int64 | Nil = nil) : Tuple(PetStore::Pet, Int32, Hash(String, Array(String) | String)) #

Find pet by ID Returns a single pet @required @param pet_id [Int64?] ID of pet to return @return [Tuple(PetStore::Pet, Integer, Hash)] PetStore::Pet, response status code and response headers


[View source]
def update_pet(*, pet : PetStore::Pet | Nil = nil) : Nil #

Update an existing pet

@required @param pet [PetStore::Pet?] Pet object that needs to be added to the store @return [Nil]


[View source]
def update_pet(*, pet : PetStore::Pet | Nil = nil, &block : Crest::Response -> ) : Nil #

Update an existing pet

@required @param pet [PetStore::Pet?] Pet object that needs to be added to the store @return nil


[View source]
def update_pet_with_form(*, pet_id : Int64 | Nil = nil, name : String | Nil = nil, status : String | Nil = nil) : Nil #

Updates a pet in the store with form data

@required @param pet_id [Int64?] ID of pet that needs to be updated @optional @param name [String?] Updated name of the pet @optional @param status [String?] Updated status of the pet @return [Nil]


[View source]
def update_pet_with_form(*, pet_id : Int64 | Nil = nil, name : String | Nil = nil, status : String | Nil = nil, &block : Crest::Response -> ) : Nil #

Updates a pet in the store with form data

@required @param pet_id [Int64?] ID of pet that needs to be updated @optional @param name [String?] Updated name of the pet @optional @param status [String?] Updated status of the pet @return nil


[View source]
def update_pet_with_form_with_http_info(*, pet_id : Int64 | Nil = nil, name : String | Nil = nil, status : String | Nil = nil) : Tuple(Nil, Int32, Hash(String, Array(String) | String)) #

Updates a pet in the store with form data

@required @param pet_id [Int64?] ID of pet that needs to be updated @optional @param name [String?] Updated name of the pet @optional @param status [String?] Updated status of the pet @return [Tuple(Nil, Integer, Hash)] Nil, response status code and response headers


[View source]
def update_pet_with_http_info(*, pet : PetStore::Pet | Nil = nil) : Tuple(Nil, Int32, Hash(String, Array(String) | String)) #

Update an existing pet

@required @param pet [PetStore::Pet?] Pet object that needs to be added to the store @return [Tuple(Nil, Integer, Hash)] Nil, response status code and response headers


[View source]
def upload_file(*, pet_id : Int64 | Nil = nil, additional_metadata : String | Nil = nil, file : ::File | Nil = nil) : PetStore::ApiResponse #

uploads an image

@required @param pet_id [Int64?] ID of pet to update @optional @param additional_metadata [String?] Additional data to pass to server @optional @param file [::File?] file to upload @return [PetStore::ApiResponse]


[View source]
def upload_file(*, pet_id : Int64 | Nil = nil, additional_metadata : String | Nil = nil, file : ::File | Nil = nil, &block : Crest::Response -> ) : Nil #

uploads an image

@required @param pet_id [Int64?] ID of pet to update @optional @param additional_metadata [String?] Additional data to pass to server @optional @param file [::File?] file to upload @return nil


[View source]
def upload_file_with_http_info(*, pet_id : Int64 | Nil = nil, additional_metadata : String | Nil = nil, file : ::File | Nil = nil) : Tuple(PetStore::ApiResponse, Int32, Hash(String, Array(String) | String)) #

uploads an image

@required @param pet_id [Int64?] ID of pet to update @optional @param additional_metadata [String?] Additional data to pass to server @optional @param file [::File?] file to upload @return [Tuple(PetStore::ApiResponse, Integer, Hash)] PetStore::ApiResponse, response status code and response headers


[View source]
def upload_file_with_required_file(*, pet_id : Int64 | Nil = nil, required_file : ::File | Nil = nil, additional_metadata : String | Nil = nil) : PetStore::ApiResponse #

uploads an image (required)

@required @param pet_id [Int64?] ID of pet to update @required @param required_file [::File?] file to upload @optional @param additional_metadata [String?] Additional data to pass to server @return [PetStore::ApiResponse]


[View source]
def upload_file_with_required_file(*, pet_id : Int64 | Nil = nil, required_file : ::File | Nil = nil, additional_metadata : String | Nil = nil, &block : Crest::Response -> ) : Nil #

uploads an image (required)

@required @param pet_id [Int64?] ID of pet to update @required @param required_file [::File?] file to upload @optional @param additional_metadata [String?] Additional data to pass to server @return nil


[View source]
def upload_file_with_required_file_with_http_info(*, pet_id : Int64 | Nil = nil, required_file : ::File | Nil = nil, additional_metadata : String | Nil = nil) : Tuple(PetStore::ApiResponse, Int32, Hash(String, Array(String) | String)) #

uploads an image (required)

@required @param pet_id [Int64?] ID of pet to update @required @param required_file [::File?] file to upload @optional @param additional_metadata [String?] Additional data to pass to server @return [Tuple(PetStore::ApiResponse, Integer, Hash)] PetStore::ApiResponse, response status code and response headers


[View source]