update python to use test spec

This commit is contained in:
wing328
2016-04-14 18:30:54 +08:00
parent 261fa26b1e
commit 5a88b9e896
19 changed files with 236 additions and 907 deletions

View File

@@ -13,7 +13,8 @@ Name | Type | Description | Notes
**byte** | **str** | | [optional]
**binary** | **str** | | [optional]
**date** | **date** | | [optional]
**date_time** | **str** | | [optional]
**date_time** | **datetime** | | [optional]
**password** | **str** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**quantity** | **int** | | [optional]
**ship_date** | **datetime** | | [optional]
**status** | **str** | Order Status | [optional]
**complete** | **bool** | | [optional]
**complete** | **bool** | | [optional] [default to False]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -5,20 +5,17 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
[**add_pet_using_byte_array**](PetApi.md#add_pet_using_byte_array) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
[**get_pet_by_id_in_object**](PetApi.md#get_pet_by_id_in_object) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
[**pet_pet_idtesting_byte_arraytrue_get**](PetApi.md#pet_pet_idtesting_byte_arraytrue_get) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
# **add_pet**
> add_pet(body=body)
> add_pet(body)
Add a new pet to the store
@@ -36,11 +33,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
try:
# Add a new pet to the store
api_instance.add_pet(body=body)
api_instance.add_pet(body)
except ApiException as e:
print "Exception when calling PetApi->add_pet: %s\n" % e
```
@@ -49,7 +46,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -59,59 +56,10 @@ void (empty response body)
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **add_pet_using_byte_array**
> add_pet_using_byte_array(body=body)
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
body = 'B' # str | Pet object in the form of byte array (optional)
try:
# Fake endpoint to test byte array in body parameter for adding a new pet to the store
api_instance.add_pet_using_byte_array(body=body)
except ApiException as e:
print "Exception when calling PetApi->add_pet_using_byte_array: %s\n" % e
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **str**| Pet object in the form of byte array | [optional]
### Return type
void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -159,15 +107,15 @@ void (empty response body)
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **find_pets_by_status**
> list[Pet] find_pets_by_status(status=status)
> list[Pet] find_pets_by_status(status)
Finds Pets by status
@@ -185,11 +133,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
status = ['available'] # list[str] | Status values that need to be considered for query (optional) (default to available)
status = ['status_example'] # list[str] | Status values that need to be considered for filter
try:
# Finds Pets by status
api_response = api_instance.find_pets_by_status(status=status)
api_response = api_instance.find_pets_by_status(status)
pprint(api_response)
except ApiException as e:
print "Exception when calling PetApi->find_pets_by_status: %s\n" % e
@@ -199,7 +147,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**list[str]**](str.md)| Status values that need to be considered for query | [optional] [default to available]
**status** | [**list[str]**](str.md)| Status values that need to be considered for filter |
### Return type
@@ -209,19 +157,19 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **find_pets_by_tags**
> list[Pet] find_pets_by_tags(tags=tags)
> list[Pet] find_pets_by_tags(tags)
Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Example
```python
@@ -235,11 +183,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
tags = ['tags_example'] # list[str] | Tags to filter by (optional)
tags = ['tags_example'] # list[str] | Tags to filter by
try:
# Finds Pets by tags
api_response = api_instance.find_pets_by_tags(tags=tags)
api_response = api_instance.find_pets_by_tags(tags)
pprint(api_response)
except ApiException as e:
print "Exception when calling PetApi->find_pets_by_tags: %s\n" % e
@@ -249,7 +197,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**list[str]**](str.md)| Tags to filter by | [optional]
**tags** | [**list[str]**](str.md)| Tags to filter by |
### Return type
@@ -259,10 +207,10 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -271,7 +219,7 @@ Name | Type | Description | Notes
Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
Returns a single pet
### Example
```python
@@ -284,12 +232,10 @@ from pprint import pprint
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
pet_id = 789 # int | ID of pet that needs to be fetched
pet_id = 789 # int | ID of pet to return
try:
# Find pet by ID
@@ -303,7 +249,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
**pet_id** | **int**| ID of pet to return |
### Return type
@@ -311,125 +257,17 @@ Name | Type | Description | Notes
### Authorization
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
[api_key](../README.md#api_key)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_pet_by_id_in_object**
> InlineResponse200 get_pet_by_id_in_object(pet_id)
Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
pet_id = 789 # int | ID of pet that needs to be fetched
try:
# Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
api_response = api_instance.get_pet_by_id_in_object(pet_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling PetApi->get_pet_by_id_in_object: %s\n" % e
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
### Return type
[**InlineResponse200**](InlineResponse200.md)
### Authorization
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **pet_pet_idtesting_byte_arraytrue_get**
> str pet_pet_idtesting_byte_arraytrue_get(pet_id)
Fake endpoint to test byte array return by 'Find pet by ID'
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# Configure OAuth2 access token for authorization: petstore_auth
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
pet_id = 789 # int | ID of pet that needs to be fetched
try:
# Fake endpoint to test byte array return by 'Find pet by ID'
api_response = api_instance.pet_pet_idtesting_byte_arraytrue_get(pet_id)
pprint(api_response)
except ApiException as e:
print "Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: %s\n" % e
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
### Return type
**str**
### Authorization
[api_key](../README.md#api_key), [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_pet**
> update_pet(body=body)
> update_pet(body)
Update an existing pet
@@ -447,11 +285,11 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store (optional)
body = swagger_client.Pet() # Pet | Pet object that needs to be added to the store
try:
# Update an existing pet
api_instance.update_pet(body=body)
api_instance.update_pet(body)
except ApiException as e:
print "Exception when calling PetApi->update_pet: %s\n" % e
```
@@ -460,7 +298,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -470,10 +308,10 @@ void (empty response body)
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -496,7 +334,7 @@ swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.PetApi()
pet_id = 'pet_id_example' # str | ID of pet that needs to be updated
pet_id = 789 # int | ID of pet that needs to be updated
name = 'name_example' # str | Updated name of the pet (optional)
status = 'status_example' # str | Updated status of the pet (optional)
@@ -511,7 +349,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **str**| ID of pet that needs to be updated |
**pet_id** | **int**| ID of pet that needs to be updated |
**name** | **str**| Updated name of the pet | [optional]
**status** | **str**| Updated status of the pet | [optional]
@@ -523,15 +361,15 @@ void (empty response body)
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **upload_file**
> upload_file(pet_id, additional_metadata=additional_metadata, file=file)
> ApiResponse upload_file(pet_id, additional_metadata=additional_metadata, file=file)
uploads an image
@@ -555,7 +393,8 @@ file = '/path/to/file.txt' # file | file to upload (optional)
try:
# uploads an image
api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file)
pprint(api_response)
except ApiException as e:
print "Exception when calling PetApi->upload_file: %s\n" % e
```
@@ -570,16 +409,16 @@ Name | Type | Description | Notes
### Return type
void (empty response body)
[**ApiResponse**](ApiResponse.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, application/xml
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**find_orders_by_status**](StoreApi.md#find_orders_by_status) | **GET** /store/findByStatus | Finds orders by status
[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
[**get_inventory_in_object**](StoreApi.md#get_inventory_in_object) | **GET** /store/inventory?response&#x3D;arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID
[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
@@ -51,66 +49,10 @@ void (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **find_orders_by_status**
> list[Order] find_orders_by_status(status=status)
Finds orders by status
A single status value can be provided as a string
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: test_api_client_id
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
# Configure API key authorization: test_api_client_secret
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
# create an instance of the API class
api_instance = swagger_client.StoreApi()
status = 'placed' # str | Status value that needs to be considered for query (optional) (default to placed)
try:
# Finds orders by status
api_response = api_instance.find_orders_by_status(status=status)
pprint(api_response)
except ApiException as e:
print "Exception when calling StoreApi->find_orders_by_status: %s\n" % e
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | **str**| Status value that needs to be considered for query | [optional] [default to placed]
### Return type
[**list[Order]**](Order.md)
### Authorization
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -155,58 +97,10 @@ This endpoint does not need any parameter.
[api_key](../README.md#api_key)
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_inventory_in_object**
> object get_inventory_in_object()
Fake endpoint to test arbitrary object return by 'Get inventory'
Returns an arbitrary object which is actually a map of status codes to quantities
### Example
```python
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
swagger_client.configuration.api_key['api_key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['api_key'] = 'BEARER'
# create an instance of the API class
api_instance = swagger_client.StoreApi()
try:
# Fake endpoint to test arbitrary object return by 'Get inventory'
api_response = api_instance.get_inventory_in_object()
pprint(api_response)
except ApiException as e:
print "Exception when calling StoreApi->get_inventory_in_object: %s\n" % e
```
### Parameters
This endpoint does not need any parameter.
### Return type
**object**
### Authorization
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -224,18 +118,9 @@ import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: test_api_key_header
swagger_client.configuration.api_key['test_api_key_header'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['test_api_key_header'] = 'BEARER'
# Configure API key authorization: test_api_key_query
swagger_client.configuration.api_key['test_api_key_query'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['test_api_key_query'] = 'BEARER'
# create an instance of the API class
api_instance = swagger_client.StoreApi()
order_id = 'order_id_example' # str | ID of pet that needs to be fetched
order_id = 789 # int | ID of pet that needs to be fetched
try:
# Find purchase order by ID
@@ -249,7 +134,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **str**| ID of pet that needs to be fetched |
**order_id** | **int**| ID of pet that needs to be fetched |
### Return type
@@ -257,17 +142,17 @@ Name | Type | Description | Notes
### Authorization
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **place_order**
> Order place_order(body=body)
> Order place_order(body)
Place an order for a pet
@@ -280,22 +165,13 @@ import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: test_api_client_id
swagger_client.configuration.api_key['x-test_api_client_id'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-test_api_client_id'] = 'BEARER'
# Configure API key authorization: test_api_client_secret
swagger_client.configuration.api_key['x-test_api_client_secret'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# swagger_client.configuration.api_key_prefix['x-test_api_client_secret'] = 'BEARER'
# create an instance of the API class
api_instance = swagger_client.StoreApi()
body = swagger_client.Order() # Order | order placed for purchasing the pet (optional)
body = swagger_client.Order() # Order | order placed for purchasing the pet
try:
# Place an order for a pet
api_response = api_instance.place_order(body=body)
api_response = api_instance.place_order(body)
pprint(api_response)
except ApiException as e:
print "Exception when calling StoreApi->place_order: %s\n" % e
@@ -305,7 +181,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -313,12 +189,12 @@ Name | Type | Description | Notes
### Authorization
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -15,7 +15,7 @@ Method | HTTP request | Description
# **create_user**
> create_user(body=body)
> create_user(body)
Create user
@@ -30,11 +30,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
body = swagger_client.User() # User | Created user object (optional)
body = swagger_client.User() # User | Created user object
try:
# Create user
api_instance.create_user(body=body)
api_instance.create_user(body)
except ApiException as e:
print "Exception when calling UserApi->create_user: %s\n" % e
```
@@ -43,7 +43,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | [optional]
**body** | [**User**](User.md)| Created user object |
### Return type
@@ -53,15 +53,15 @@ void (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_array_input**
> create_users_with_array_input(body=body)
> create_users_with_array_input(body)
Creates list of users with given input array
@@ -76,11 +76,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
body = [swagger_client.User()] # list[User] | List of user object (optional)
body = [swagger_client.User()] # list[User] | List of user object
try:
# Creates list of users with given input array
api_instance.create_users_with_array_input(body=body)
api_instance.create_users_with_array_input(body)
except ApiException as e:
print "Exception when calling UserApi->create_users_with_array_input: %s\n" % e
```
@@ -89,7 +89,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object | [optional]
**body** | [**list[User]**](User.md)| List of user object |
### Return type
@@ -99,15 +99,15 @@ void (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_users_with_list_input**
> create_users_with_list_input(body=body)
> create_users_with_list_input(body)
Creates list of users with given input array
@@ -122,11 +122,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
body = [swagger_client.User()] # list[User] | List of user object (optional)
body = [swagger_client.User()] # list[User] | List of user object
try:
# Creates list of users with given input array
api_instance.create_users_with_list_input(body=body)
api_instance.create_users_with_list_input(body)
except ApiException as e:
print "Exception when calling UserApi->create_users_with_list_input: %s\n" % e
```
@@ -135,7 +135,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object | [optional]
**body** | [**list[User]**](User.md)| List of user object |
### Return type
@@ -145,10 +145,10 @@ void (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -166,10 +166,6 @@ import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: test_http_basic
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = swagger_client.UserApi()
username = 'username_example' # str | The name that needs to be deleted
@@ -193,12 +189,12 @@ void (empty response body)
### Authorization
[test_http_basic](../README.md#test_http_basic)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -242,15 +238,15 @@ Name | Type | Description | Notes
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **login_user**
> str login_user(username=username, password=password)
> str login_user(username, password)
Logs user into the system
@@ -265,12 +261,12 @@ from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
username = 'username_example' # str | The user name for login (optional)
password = 'password_example' # str | The password for login in clear text (optional)
username = 'username_example' # str | The user name for login
password = 'password_example' # str | The password for login in clear text
try:
# Logs user into the system
api_response = api_instance.login_user(username=username, password=password)
api_response = api_instance.login_user(username, password)
pprint(api_response)
except ApiException as e:
print "Exception when calling UserApi->login_user: %s\n" % e
@@ -280,8 +276,8 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| The user name for login | [optional]
**password** | **str**| The password for login in clear text | [optional]
**username** | **str**| The user name for login |
**password** | **str**| The password for login in clear text |
### Return type
@@ -291,10 +287,10 @@ Name | Type | Description | Notes
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@@ -333,15 +329,15 @@ void (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_user**
> update_user(username, body=body)
> update_user(username, body)
Updated user
@@ -357,11 +353,11 @@ from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
username = 'username_example' # str | name that need to be deleted
body = swagger_client.User() # User | Updated user object (optional)
body = swagger_client.User() # User | Updated user object
try:
# Updated user
api_instance.update_user(username, body=body)
api_instance.update_user(username, body)
except ApiException as e:
print "Exception when calling UserApi->update_user: %s\n" % e
```
@@ -371,7 +367,7 @@ except ApiException as e:
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | [optional]
**body** | [**User**](User.md)| Updated user object |
### Return type
@@ -381,10 +377,10 @@ void (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)