@@ -29,14 +29,14 @@ library(petstore)
29
29
30
30
var_pet <- Pet $ new(" name_example" , list (" photoUrls_example" ), 123 , Category $ new(123 , " name_example" ), list (Tag $ new(123 , " name_example" )), " available" ) # Pet | Pet object that needs to be added to the store
31
31
32
- # Add a new pet to the store
32
+ # Add a new pet to the store
33
33
api_instance <- petstore_api $ new()
34
34
# Configure HTTP basic authorization: http_auth
35
35
api_instance $ api_client $ username <- Sys.getenv(" USERNAME" )
36
36
api_instance $ api_client $ password <- Sys.getenv(" PASSWORD" )
37
37
result <- tryCatch(
38
38
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
39
- # api_instance$add_pet(var_pet, data_file = "result.txt"),
39
+ # api_instance$pet_api$ add_pet(var_pet, data_file = "result.txt"),
40
40
api_instance $ pet_api $ add_pet(var_pet ),
41
41
ApiException = function (ex ) ex
42
42
)
@@ -93,7 +93,7 @@ library(petstore)
93
93
var_pet_id <- 56 # integer | Pet id to delete
94
94
var_api_key <- " api_key_example" # character | (Optional)
95
95
96
- # Deletes a pet
96
+ # Deletes a pet
97
97
api_instance <- petstore_api $ new()
98
98
# Configure OAuth2 access token for authorization: petstore_auth
99
99
api_instance $ api_client $ access_token <- Sys.getenv(" ACCESS_TOKEN" )
@@ -149,13 +149,13 @@ library(petstore)
149
149
150
150
var_status <- list (" available" ) # array[character] | Status values that need to be considered for filter
151
151
152
- # Finds Pets by status
152
+ # Finds Pets by status
153
153
api_instance <- petstore_api $ new()
154
154
# Configure OAuth2 access token for authorization: petstore_auth
155
155
api_instance $ api_client $ access_token <- Sys.getenv(" ACCESS_TOKEN" )
156
156
result <- tryCatch(
157
157
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
158
- # api_instance$find_pets_by_status(var_status, data_file = "result.txt"),
158
+ # api_instance$pet_api$ find_pets_by_status(var_status, data_file = "result.txt"),
159
159
api_instance $ pet_api $ find_pets_by_status(var_status ),
160
160
ApiException = function (ex ) ex
161
161
)
@@ -211,13 +211,13 @@ library(petstore)
211
211
212
212
var_tags <- list (" inner_example" ) # array[character] | Tags to filter by
213
213
214
- # Finds Pets by tags
214
+ # Finds Pets by tags
215
215
api_instance <- petstore_api $ new()
216
216
# Configure OAuth2 access token for authorization: petstore_auth
217
217
api_instance $ api_client $ access_token <- Sys.getenv(" ACCESS_TOKEN" )
218
218
result <- tryCatch(
219
219
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
220
- # api_instance$find_pets_by_tags(var_tags, data_file = "result.txt"),
220
+ # api_instance$pet_api$ find_pets_by_tags(var_tags, data_file = "result.txt"),
221
221
api_instance $ pet_api $ find_pets_by_tags(var_tags ),
222
222
ApiException = function (ex ) ex
223
223
)
@@ -273,13 +273,13 @@ library(petstore)
273
273
274
274
var_pet_id <- 56 # integer | ID of pet to return
275
275
276
- # Find pet by ID
276
+ # Find pet by ID
277
277
api_instance <- petstore_api $ new()
278
278
# Configure HTTP bearer authorization: BearerToken
279
279
api_instance $ api_client $ bearer_token <- Sys.getenv(" BEARER_TOKEN" )
280
280
result <- tryCatch(
281
281
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
282
- # api_instance$get_pet_by_id(var_pet_id, data_file = "result.txt"),
282
+ # api_instance$pet_api$ get_pet_by_id(var_pet_id, data_file = "result.txt"),
283
283
api_instance $ pet_api $ get_pet_by_id(var_pet_id ),
284
284
ApiException = function (ex ) ex
285
285
)
@@ -336,15 +336,15 @@ library(petstore)
336
336
337
337
var_pet_id <- 56 # integer | ID of pet to return
338
338
339
- # Find pet by ID (streaming)
339
+ # Find pet by ID (streaming)
340
340
api_instance <- petstore_api $ new()
341
341
# Configure API key authorization: api_key
342
342
api_instance $ api_client $ api_keys [" api_key" ] <- Sys.getenv(" API_KEY" )
343
343
result <- tryCatch(
344
344
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
345
- # api_instance$get_pet_by_id_streaming(var_pet_id, data_file = "result.txt"),
345
+ # api_instance$pet_api$ get_pet_by_id_streaming(var_pet_id, data_file = "result.txt"),
346
346
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
347
- # api_instance$get_pet_by_id_streaming(var_pet_id, stream_callback = function(x){ print(length(x)) }),
347
+ # api_instance$pet_api$ get_pet_by_id_streaming(var_pet_id, stream_callback = function(x){ print(length(x)) }),
348
348
api_instance $ pet_api $ get_pet_by_id_streaming(var_pet_id ),
349
349
ApiException = function (ex ) ex
350
350
)
@@ -401,15 +401,15 @@ library(petstore)
401
401
402
402
var_header_test_int <- 56 # integer | header test int
403
403
404
- # Header test
404
+ # Header test
405
405
api_instance <- petstore_api $ new()
406
406
# Configure API key authorization: api_key
407
407
api_instance $ api_client $ api_keys [" api_key" ] <- Sys.getenv(" API_KEY" )
408
408
result <- tryCatch(
409
409
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
410
- # api_instance$test_header(var_header_test_int, data_file = "result.txt"),
410
+ # api_instance$pet_api$ test_header(var_header_test_int, data_file = "result.txt"),
411
411
# this endpoint supports data streaming via a callback function using the optional `stream_callback` parameter, e.g.
412
- # api_instance$test_header(var_header_test_int, stream_callback = function(x){ print(length(x)) }),
412
+ # api_instance$pet_api$ test_header(var_header_test_int, stream_callback = function(x){ print(length(x)) }),
413
413
api_instance $ pet_api $ test_header(var_header_test_int ),
414
414
ApiException = function (ex ) ex
415
415
)
@@ -466,13 +466,13 @@ library(petstore)
466
466
467
467
var_pet <- Pet $ new(" name_example" , list (" photoUrls_example" ), 123 , Category $ new(123 , " name_example" ), list (Tag $ new(123 , " name_example" )), " available" ) # Pet | Pet object that needs to be added to the store
468
468
469
- # Update an existing pet
469
+ # Update an existing pet
470
470
api_instance <- petstore_api $ new()
471
471
# Configure OAuth2 access token for authorization: petstore_auth
472
472
api_instance $ api_client $ access_token <- Sys.getenv(" ACCESS_TOKEN" )
473
473
result <- tryCatch(
474
474
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
475
- # api_instance$update_pet(var_pet, data_file = "result.txt"),
475
+ # api_instance$pet_api$ update_pet(var_pet, data_file = "result.txt"),
476
476
api_instance $ pet_api $ update_pet(var_pet ),
477
477
ApiException = function (ex ) ex
478
478
)
@@ -532,7 +532,7 @@ var_pet_id <- 56 # integer | ID of pet that needs to be updated
532
532
var_name <- " name_example" # character | Updated name of the pet (Optional)
533
533
var_status <- " status_example" # character | Updated status of the pet (Optional)
534
534
535
- # Updates a pet in the store with form data
535
+ # Updates a pet in the store with form data
536
536
api_instance <- petstore_api $ new()
537
537
result <- tryCatch(
538
538
api_instance $ pet_api $ update_pet_with_form(var_pet_id , name = var_name , status = var_status ),
@@ -589,13 +589,13 @@ var_pet_id <- 56 # integer | ID of pet to update
589
589
var_additional_metadata <- " additional_metadata_example" # character | Additional data to pass to server (Optional)
590
590
var_file <- File.new(' /path/to/file' ) # data.frame | file to upload (Optional)
591
591
592
- # uploads an image
592
+ # uploads an image
593
593
api_instance <- petstore_api $ new()
594
594
# Configure OAuth2 access token for authorization: petstore_auth
595
595
api_instance $ api_client $ access_token <- Sys.getenv(" ACCESS_TOKEN" )
596
596
result <- tryCatch(
597
597
# to save the result into a file, simply add the optional `data_file` parameter, e.g.
598
- # api_instance$upload_file(var_pet_id, additional_metadata = var_additional_metadata, file = var_file, data_file = "result.txt"),
598
+ # api_instance$pet_api$ upload_file(var_pet_id, additional_metadata = var_additional_metadata, file = var_file, data_file = "result.txt"),
599
599
api_instance $ pet_api $ upload_file(var_pet_id , additional_metadata = var_additional_metadata , file = var_file ),
600
600
ApiException = function (ex ) ex
601
601
)
0 commit comments