All URIs are relative to http://petstore.swagger.io/v2
Method | HTTP request | Description ------------- | ------------- | ------------- DeleteOrder | DELETE /store/order/{orderId} | Delete purchase order by ID GetInventory | GET /store/inventory | Returns pet inventories by status GetOrderById | GET /store/order/{orderId} | Find purchase order by ID PlaceOrder | POST /store/order | Place an order for a pet
DeleteOrder(order.id)
Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
library(petstore)
var.order.id <- 'order.id_example' # character | ID of the order that needs to be deleted
#Delete purchase order by ID
api.instance <- StoreApi$new()
api.instance$DeleteOrder(var.order.id)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- order.id | character| ID of the order that needs to be deleted |
void (empty response body)
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 400 | Invalid ID supplied | - | | 404 | Order not found | - |
map(integer) GetInventory()
Returns pet inventories by status
Returns a map of status codes to quantities
library(petstore)
#Returns pet inventories by status
api.instance <- StoreApi$new()
# Configure API key authorization: api_key
api.instance$apiClient$apiKeys['api_key'] <- 'TODO_YOUR_API_KEY';
result <- api.instance$GetInventory()
dput(result)
This endpoint does not need any parameter.
map(integer)
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | successful operation | - |
Order GetOrderById(order.id)
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
library(petstore)
var.order.id <- 56 # integer | ID of pet that needs to be fetched
#Find purchase order by ID
api.instance <- StoreApi$new()
result <- api.instance$GetOrderById(var.order.id)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- order.id | integer| ID of pet that needs to be fetched |
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | successful operation | - | | 400 | Invalid ID supplied | - | | 404 | Order not found | - |
Order PlaceOrder(body)
Place an order for a pet
library(petstore)
var.body <- Order$new(123, 123, 123, "shipDate_example", "placed", "complete_example") # Order | order placed for purchasing the pet
#Place an order for a pet
api.instance <- StoreApi$new()
result <- api.instance$PlaceOrder(var.body)
dput(result)
Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | Order| order placed for purchasing the pet |
No authorization required
| Status code | Description | Response headers | |-------------|-------------|------------------| | 200 | successful operation | - | | 400 | Invalid Order | - |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.