forked from loafle/openapi-generator-original
* Removes future from python-exp v3 sample * Removes future from python-exp v2 sample * Deletes future from remaining python-exp files * Removes six from python-exp templates * Removes six from python-exp samples * Removes mock from python-exp * Python-exp switched to py3 * Removes python 2.7 for python-exp ci testing * Requires python>=3.3 for python-exp * Reverts unnecessary changes to two templates
3.6 KiB
3.6 KiB
dynamic_servers.UsageApi
All URIs are relative to http://petstore.swagger.io:80/v2
Method | HTTP request | Description |
---|---|---|
custom_server | GET /custom | Use custom server |
default_server | GET /default | Use default server |
custom_server
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} custom_server()
Use custom server
Use custom server
Example
import time
import dynamic_servers
from dynamic_servers.api import usage_api
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = dynamic_servers.Configuration(
host = "http://petstore.swagger.io:80/v2"
)
# Enter a context with an instance of the API client
with dynamic_servers.ApiClient() as api_client:
# Create an instance of the API class
api_instance = usage_api.UsageApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Use custom server
api_response = api_instance.custom_server()
pprint(api_response)
except dynamic_servers.ApiException as e:
print("Exception when calling UsageApi->custom_server: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
default_server
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} default_server()
Use default server
Use default server
Example
import time
import dynamic_servers
from dynamic_servers.api import usage_api
from pprint import pprint
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = dynamic_servers.Configuration(
host = "http://petstore.swagger.io:80/v2"
)
# Enter a context with an instance of the API client
with dynamic_servers.ApiClient() as api_client:
# Create an instance of the API class
api_instance = usage_api.UsageApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Use default server
api_response = api_instance.default_server()
pprint(api_response)
except dynamic_servers.ApiException as e:
print("Exception when calling UsageApi->default_server: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]