generate doc for python api and doc

This commit is contained in:
wing328
2016-03-30 15:14:58 +08:00
parent f0c3870386
commit 142a3bab72
22 changed files with 1754 additions and 78 deletions

View File

@@ -0,0 +1,10 @@
# Animal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
[[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

@@ -0,0 +1,11 @@
# Cat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**declawed** | **bool** | | [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

@@ -0,0 +1,11 @@
# Category
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **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

@@ -0,0 +1,11 @@
# Dog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**breed** | **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

@@ -0,0 +1,15 @@
# InlineResponse200
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tags** | [**list[Tag]**](Tag.md) | | [optional]
**id** | **int** | |
**category** | [**object**](object.md) | | [optional]
**status** | **str** | pet status in the store | [optional]
**name** | **str** | | [optional]
**photo_urls** | **list[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

@@ -0,0 +1,10 @@
# Model200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [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

@@ -0,0 +1,10 @@
# ModelReturn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **int** | | [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

@@ -0,0 +1,11 @@
# Name
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional]
**snake_case** | **int** | | [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

@@ -0,0 +1,15 @@
# Order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**pet_id** | **int** | | [optional]
**quantity** | **int** | | [optional]
**ship_date** | **datetime** | | [optional]
**status** | **str** | Order Status | [optional]
**complete** | **bool** | | [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

@@ -0,0 +1,15 @@
# Pet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**category** | [**Category**](Category.md) | | [optional]
**name** | **str** | |
**photo_urls** | **list[str]** | |
**tags** | [**list[Tag]**](Tag.md) | | [optional]
**status** | **str** | pet status in the store | [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

@@ -0,0 +1,563 @@
# \PetApi
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)
Add a new pet to the store
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$body = new Pet(); // Pet | Pet object that needs to be added to the store
try {
$api_instance->add_pet($body);
} catch (Exception $e) {
echo 'Exception when calling PetApi->add_pet: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [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
[[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)
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$body = B; // str | Pet object in the form of byte array
try {
$api_instance->add_pet_using_byte_array($body);
} catch (Exception $e) {
echo 'Exception when calling PetApi->add_pet_using_byte_array: ', $e->getMessage(), "\n";
}
?>
```
### 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
[[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)
# **delete_pet**
> delete_pet($pet_id, $api_key)
Deletes a pet
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$pet_id = 789; // int | Pet id to delete
$api_key = api_key_example; // str |
try {
$api_instance->delete_pet($pet_id, $api_key);
} catch (Exception $e) {
echo 'Exception when calling PetApi->delete_pet: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| Pet id to delete |
**api_key** | **str**| | [optional]
### Return type
void (empty response body)
### Authorization
[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)
# **find_pets_by_status**
> list[Pet] find_pets_by_status($status)
Finds Pets by status
Multiple status values can be provided with comma separated strings
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$status = array(available); // list[str] | Status values that need to be considered for query
try {
$result = $api_instance->find_pets_by_status($status);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PetApi->find_pets_by_status: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**list[str]**](str.md)| Status values that need to be considered for query | [optional] [default to available]
### Return type
[**list[Pet]**](Pet.md)
### Authorization
[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)
# **find_pets_by_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.
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$tags = NULL; // list[str] | Tags to filter by
try {
$result = $api_instance->find_pets_by_tags($tags);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PetApi->find_pets_by_tags: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**list[str]**](str.md)| Tags to filter by | [optional]
### Return type
[**list[Pet]**](Pet.md)
### Authorization
[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)
# **get_pet_by_id**
> Pet get_pet_by_id($pet_id)
Find pet by ID
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched
try {
$result = $api_instance->get_pet_by_id($pet_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PetApi->get_pet_by_id: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet that needs to be fetched |
### Return type
[**Pet**](Pet.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)
# **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
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched
try {
$result = $api_instance->get_pet_by_id_in_object($pet_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PetApi->get_pet_by_id_in_object: ', $e->getMessage(), "\n";
}
?>
```
### 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
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$pet_id = 789; // int | ID of pet that needs to be fetched
try {
$result = $api_instance->pet_pet_idtesting_byte_arraytrue_get($pet_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PetApi->pet_pet_idtesting_byte_arraytrue_get: ', $e->getMessage(), "\n";
}
?>
```
### 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
[[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)
Update an existing pet
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$body = new Pet(); // Pet | Pet object that needs to be added to the store
try {
$api_instance->update_pet($body);
} catch (Exception $e) {
echo 'Exception when calling PetApi->update_pet: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [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
[[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_with_form**
> update_pet_with_form($pet_id, $name, $status)
Updates a pet in the store with form data
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$pet_id = pet_id_example; // str | ID of pet that needs to be updated
$name = name_example; // str | Updated name of the pet
$status = status_example; // str | Updated status of the pet
try {
$api_instance->update_pet_with_form($pet_id, $name, $status);
} catch (Exception $e) {
echo 'Exception when calling PetApi->update_pet_with_form: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **str**| ID of pet that needs to be updated |
**name** | **str**| Updated name of the pet | [optional]
**status** | **str**| Updated status of the pet | [optional]
### Return type
void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: application/x-www-form-urlencoded
- **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)
# **upload_file**
> upload_file($pet_id, $additional_metadata, $file)
uploads an image
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: petstore_auth
\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$api_instance = new \Api\PetApi();
$pet_id = 789; // int | ID of pet to update
$additional_metadata = additional_metadata_example; // str | Additional data to pass to server
$file = new file(); // file | file to upload
try {
$api_instance->upload_file($pet_id, $additional_metadata, $file);
} catch (Exception $e) {
echo 'Exception when calling PetApi->upload_file: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **int**| ID of pet to update |
**additional_metadata** | **str**| Additional data to pass to server | [optional]
**file** | **file**| file to upload | [optional]
### Return type
void (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: multipart/form-data
- **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)

View File

@@ -0,0 +1,10 @@
# SpecialModelName
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **int** | | [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

@@ -0,0 +1,312 @@
# \StoreApi
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=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
# **delete_order**
> delete_order($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
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\StoreApi();
$order_id = order_id_example; // str | ID of the order that needs to be deleted
try {
$api_instance->delete_order($order_id);
} catch (Exception $e) {
echo 'Exception when calling StoreApi->delete_order: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **str**| ID of the order that needs to be deleted |
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **find_orders_by_status**
> list[Order] find_orders_by_status($status)
Finds orders by status
A single status value can be provided as a string
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: test_api_client_id
\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_id', 'BEARER');
// Configure API key authorization: test_api_client_secret
\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_secret', 'BEARER');
$api_instance = new \Api\StoreApi();
$status = placed; // str | Status value that needs to be considered for query
try {
$result = $api_instance->find_orders_by_status($status);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StoreApi->find_orders_by_status: ', $e->getMessage(), "\n";
}
?>
```
### 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
[[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**
> dict(str, int) get_inventory()
Returns pet inventories by status
Returns a map of status codes to quantities
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
$api_instance = new \Api\StoreApi();
try {
$result = $api_instance->get_inventory();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StoreApi->get_inventory: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**dict(str, int)**](dict.md)
### Authorization
[api_key](../README.md#api_key)
### 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)
# **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
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
\Configuration::getDefaultConfiguration()->setApiKey('api_key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('api_key', 'BEARER');
$api_instance = new \Api\StoreApi();
try {
$result = $api_instance->get_inventory_in_object();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StoreApi->get_inventory_in_object: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**object**](object.md)
### Authorization
[api_key](../README.md#api_key)
### 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)
# **get_order_by_id**
> Order get_order_by_id($order_id)
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: test_api_key_header
\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_header', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_header', 'BEARER');
// Configure API key authorization: test_api_key_query
\Configuration::getDefaultConfiguration()->setApiKey('test_api_key_query', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('test_api_key_query', 'BEARER');
$api_instance = new \Api\StoreApi();
$order_id = order_id_example; // str | ID of pet that needs to be fetched
try {
$result = $api_instance->get_order_by_id($order_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StoreApi->get_order_by_id: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **str**| ID of pet that needs to be fetched |
### Return type
[**Order**](Order.md)
### Authorization
[test_api_key_header](../README.md#test_api_key_header), [test_api_key_query](../README.md#test_api_key_query)
### 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)
# **place_order**
> Order place_order($body)
Place an order for a pet
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: test_api_client_id
\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_id', 'BEARER');
// Configure API key authorization: test_api_client_secret
\Configuration::getDefaultConfiguration()->setApiKey('x-test_api_client_secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
// \Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-test_api_client_secret', 'BEARER');
$api_instance = new \Api\StoreApi();
$body = new Order(); // Order | order placed for purchasing the pet
try {
$result = $api_instance->place_order($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling StoreApi->place_order: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
### Return type
[**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
[[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

@@ -0,0 +1,11 @@
# Tag
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**name** | **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

@@ -0,0 +1,17 @@
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**username** | **str** | | [optional]
**first_name** | **str** | | [optional]
**last_name** | **str** | | [optional]
**email** | **str** | | [optional]
**password** | **str** | | [optional]
**phone** | **str** | | [optional]
**user_status** | **int** | User Status | [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

@@ -0,0 +1,374 @@
# \UserApi
All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
# **create_user**
> create_user($body)
Create user
This can only be done by the logged in user.
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
$body = new User(); // User | Created user object
try {
$api_instance->create_user($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->create_user: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **create_users_with_array_input**
> create_users_with_array_input($body)
Creates list of users with given input array
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
$body = array(new User()); // list[User] | List of user object
try {
$api_instance->create_users_with_array_input($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->create_users_with_array_input: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **create_users_with_list_input**
> create_users_with_list_input($body)
Creates list of users with given input array
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
$body = array(new User()); // list[User] | List of user object
try {
$api_instance->create_users_with_list_input($body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->create_users_with_list_input: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**list[User]**](User.md)| List of user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **delete_user**
> delete_user($username)
Delete user
This can only be done by the logged in user.
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: test_http_basic
\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
$api_instance = new \Api\UserApi();
$username = username_example; // str | The name that needs to be deleted
try {
$api_instance->delete_user($username);
} catch (Exception $e) {
echo 'Exception when calling UserApi->delete_user: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| The name that needs to be deleted |
### Return type
void (empty response body)
### Authorization
[test_http_basic](../README.md#test_http_basic)
### 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)
# **get_user_by_name**
> User get_user_by_name($username)
Get user by user name
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
$username = username_example; // str | The name that needs to be fetched. Use user1 for testing.
try {
$result = $api_instance->get_user_by_name($username);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->get_user_by_name: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| The name that needs to be fetched. Use user1 for testing. |
### Return type
[**User**](User.md)
### Authorization
No authorization required
### 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)
# **login_user**
> str login_user($username, $password)
Logs user into the system
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
$username = username_example; // str | The user name for login
$password = password_example; // str | The password for login in clear text
try {
$result = $api_instance->login_user($username, $password);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UserApi->login_user: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| The user name for login | [optional]
**password** | **str**| The password for login in clear text | [optional]
### Return type
**str**
### Authorization
No authorization required
### 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)
# **logout_user**
> logout_user()
Logs out current logged in user session
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
try {
$api_instance->logout_user();
} catch (Exception $e) {
echo 'Exception when calling UserApi->logout_user: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
# **update_user**
> update_user($username, $body)
Updated user
This can only be done by the logged in user.
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new \Api\UserApi();
$username = username_example; // str | name that need to be deleted
$body = new User(); // User | Updated user object
try {
$api_instance->update_user($username, $body);
} catch (Exception $e) {
echo 'Exception when calling UserApi->update_user: ', $e->getMessage(), "\n";
}
?>
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **str**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | [optional]
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)