text
stringlengths 0
828
|
---|
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._get_free_shipping_by_id_with_http_info(free_shipping_id, **kwargs) |
else: |
(data) = cls._get_free_shipping_by_id_with_http_info(free_shipping_id, **kwargs) |
return data" |
4990,"def list_all_free_shippings(cls, **kwargs): |
""""""List FreeShippings |
Return a list of FreeShippings |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.list_all_free_shippings(async=True) |
>>> result = thread.get() |
:param async bool |
:param int page: page number |
:param int size: page size |
:param str sort: page order |
:return: page[FreeShipping] |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._list_all_free_shippings_with_http_info(**kwargs) |
else: |
(data) = cls._list_all_free_shippings_with_http_info(**kwargs) |
return data" |
4991,"def replace_free_shipping_by_id(cls, free_shipping_id, free_shipping, **kwargs): |
""""""Replace FreeShipping |
Replace all attributes of FreeShipping |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.replace_free_shipping_by_id(free_shipping_id, free_shipping, async=True) |
>>> result = thread.get() |
:param async bool |
:param str free_shipping_id: ID of freeShipping to replace (required) |
:param FreeShipping free_shipping: Attributes of freeShipping to replace (required) |
:return: FreeShipping |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._replace_free_shipping_by_id_with_http_info(free_shipping_id, free_shipping, **kwargs) |
else: |
(data) = cls._replace_free_shipping_by_id_with_http_info(free_shipping_id, free_shipping, **kwargs) |
return data" |
4992,"def update_free_shipping_by_id(cls, free_shipping_id, free_shipping, **kwargs): |
""""""Update FreeShipping |
Update attributes of FreeShipping |
This method makes a synchronous HTTP request by default. To make an |
asynchronous HTTP request, please pass async=True |
>>> thread = api.update_free_shipping_by_id(free_shipping_id, free_shipping, async=True) |
>>> result = thread.get() |
:param async bool |
:param str free_shipping_id: ID of freeShipping to update. (required) |
:param FreeShipping free_shipping: Attributes of freeShipping to update. (required) |
:return: FreeShipping |
If the method is called asynchronously, |
returns the request thread. |
"""""" |
kwargs['_return_http_data_only'] = True |
if kwargs.get('async'): |
return cls._update_free_shipping_by_id_with_http_info(free_shipping_id, free_shipping, **kwargs) |
else: |
(data) = cls._update_free_shipping_by_id_with_http_info(free_shipping_id, free_shipping, **kwargs) |
return data" |
4993,"def publish(dataset_uri): |
""""""Return access URL to HTTP enabled (published) dataset. |
Exits with error code 1 if the dataset_uri is not a dataset. |
Exits with error code 2 if the dataset cannot be HTTP enabled. |
"""""" |
try: |
dataset = dtoolcore.DataSet.from_uri(dataset_uri) |
except dtoolcore.DtoolCoreTypeError: |
print(""Not a dataset: {}"".format(dataset_uri)) |
sys.exit(1) |
try: |
access_uri = dataset._storage_broker.http_enable() |
except AttributeError: |
print( |
""Datasets of type '{}' cannot be published using HTTP"".format( |
dataset._storage_broker.key) |
) |
sys.exit(2) |
return access_uri" |
4994,"def cli(): |
""""""Command line utility to HTTP enable (publish) a dataset."""""" |