add getting start section for perl

This commit is contained in:
wing328
2016-03-17 15:07:57 +08:00
parent 04e97e3fd7
commit 035b27ad83
7 changed files with 116 additions and 33 deletions

View File

@@ -37,7 +37,7 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $body = WWW::SwaggerClient::Object::Pet->new(); # [Pet] Pet object that needs to be added to the store
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
$api->add_pet(body => $body);
@@ -83,7 +83,7 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $body = WWW::SwaggerClient::Object::string->new(); # [string] Pet object in the form of byte array
my $body = WWW::SwaggerClient::Object::string->new(); # string | Pet object in the form of byte array
eval {
$api->add_pet_using_byte_array(body => $body);
@@ -129,8 +129,8 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] Pet id to delete
my $api_key = 'api_key_example'; # [string]
my $pet_id = 789; # int | Pet id to delete
my $api_key = 'api_key_example'; # string |
eval {
$api->delete_pet(pet_id => $pet_id, api_key => $api_key);
@@ -177,7 +177,7 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $status = (); # [ARRAY[string]] Status values that need to be considered for query
my $status = (); # ARRAY[string] | Status values that need to be considered for query
eval {
my $result = $api->find_pets_by_status(status => $status);
@@ -224,7 +224,7 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $tags = (); # [ARRAY[string]] Tags to filter by
my $tags = (); # ARRAY[string] | Tags to filter by
eval {
my $result = $api->find_pets_by_tags(tags => $tags);
@@ -275,7 +275,7 @@ WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
my $pet_id = 789; # int | ID of pet that needs to be fetched
eval {
my $result = $api->get_pet_by_id(pet_id => $pet_id);
@@ -326,7 +326,7 @@ WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
my $pet_id = 789; # int | ID of pet that needs to be fetched
eval {
my $result = $api->get_pet_by_id_in_object(pet_id => $pet_id);
@@ -377,7 +377,7 @@ WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet that needs to be fetched
my $pet_id = 789; # int | ID of pet that needs to be fetched
eval {
my $result = $api->pet_pet_idtesting_byte_arraytrue_get(pet_id => $pet_id);
@@ -424,7 +424,7 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $body = WWW::SwaggerClient::Object::Pet->new(); # [Pet] Pet object that needs to be added to the store
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
$api->update_pet(body => $body);
@@ -470,9 +470,9 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 'pet_id_example'; # [string] ID of pet that needs to be updated
my $name = 'name_example'; # [string] Updated name of the pet
my $status = 'status_example'; # [string] Updated status of the pet
my $pet_id = 'pet_id_example'; # string | ID of pet that needs to be updated
my $name = 'name_example'; # string | Updated name of the pet
my $status = 'status_example'; # string | Updated status of the pet
eval {
$api->update_pet_with_form(pet_id => $pet_id, name => $name, status => $status);
@@ -520,9 +520,9 @@ use Data::Dumper;
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
my $api = WWW::SwaggerClient::PetApi->new();
my $pet_id = 789; # [int] ID of pet to update
my $additional_metadata = 'additional_metadata_example'; # [string] Additional data to pass to server
my $file = '/path/to/file.txt'; # [File] file to upload
my $pet_id = 789; # int | ID of pet to update
my $additional_metadata = 'additional_metadata_example'; # string | Additional data to pass to server
my $file = '/path/to/file.txt'; # File | file to upload
eval {
$api->upload_file(pet_id => $pet_id, additional_metadata => $additional_metadata, file => $file);