Skip to content

Commit

Permalink
refactor: rename getOfferedStorage to getAvailabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau committed Aug 25, 2024
1 parent 87afa99 commit 0ccb33a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
1 change: 0 additions & 1 deletion .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,4 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_slot_agent.py
tox.ini
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Class | Method | HTTP request | Description
*MarketplaceApi* | [**create_storage_request**](docs/MarketplaceApi.md#create_storage_request) | **POST** /storage/request/{cid} | Creates a new Request for storage
*MarketplaceApi* | [**get_active_slot_by_id**](docs/MarketplaceApi.md#get_active_slot_by_id) | **GET** /sales/slots/{slotId} | Returns active slot with id {slotId} for the host
*MarketplaceApi* | [**get_active_slots**](docs/MarketplaceApi.md#get_active_slots) | **GET** /sales/slots | Returns active slots
*MarketplaceApi* | [**get_offered_storage**](docs/MarketplaceApi.md#get_offered_storage) | **GET** /sales/availability | Returns storage that is for sale
*MarketplaceApi* | [**get_availabilities**](docs/MarketplaceApi.md#get_availabilities) | **GET** /sales/availability | Returns storage that is for sale
*MarketplaceApi* | [**get_purchase**](docs/MarketplaceApi.md#get_purchase) | **GET** /storage/purchases/{id} | Returns purchase details
*MarketplaceApi* | [**get_purchases**](docs/MarketplaceApi.md#get_purchases) | **GET** /storage/purchases | Returns list of purchase IDs
*MarketplaceApi* | [**get_reservations**](docs/MarketplaceApi.md#get_reservations) | **GET** /sales/availability/{id}/reservations | Get availability's reservations
Expand Down
2 changes: 1 addition & 1 deletion codex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ paths:
get:
summary: "Returns storage that is for sale"
tags: [ Marketplace ]
operationId: getOfferedStorage
operationId: getAvailabilities
responses:
"200":
description: Retrieved storage availabilities of the node
Expand Down
14 changes: 7 additions & 7 deletions codex_client/api/marketplace_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def _get_active_slots_serialize(


@validate_call
def get_offered_storage(
def get_availabilities(
self,
_request_timeout: Union[
None,
Expand Down Expand Up @@ -886,7 +886,7 @@ def get_offered_storage(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_offered_storage_serialize(
_param = self._get_availabilities_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -910,7 +910,7 @@ def get_offered_storage(


@validate_call
def get_offered_storage_with_http_info(
def get_availabilities_with_http_info(
self,
_request_timeout: Union[
None,
Expand Down Expand Up @@ -950,7 +950,7 @@ def get_offered_storage_with_http_info(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_offered_storage_serialize(
_param = self._get_availabilities_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -974,7 +974,7 @@ def get_offered_storage_with_http_info(


@validate_call
def get_offered_storage_without_preload_content(
def get_availabilities_without_preload_content(
self,
_request_timeout: Union[
None,
Expand Down Expand Up @@ -1014,7 +1014,7 @@ def get_offered_storage_without_preload_content(
:return: Returns the result object.
""" # noqa: E501

_param = self._get_offered_storage_serialize(
_param = self._get_availabilities_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand All @@ -1033,7 +1033,7 @@ def get_offered_storage_without_preload_content(
return response_data.response


def _get_offered_storage_serialize(
def _get_availabilities_serialize(
self,
_request_auth,
_content_type,
Expand Down
12 changes: 6 additions & 6 deletions docs/MarketplaceApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Method | HTTP request | Description
[**create_storage_request**](MarketplaceApi.md#create_storage_request) | **POST** /storage/request/{cid} | Creates a new Request for storage
[**get_active_slot_by_id**](MarketplaceApi.md#get_active_slot_by_id) | **GET** /sales/slots/{slotId} | Returns active slot with id {slotId} for the host
[**get_active_slots**](MarketplaceApi.md#get_active_slots) | **GET** /sales/slots | Returns active slots
[**get_offered_storage**](MarketplaceApi.md#get_offered_storage) | **GET** /sales/availability | Returns storage that is for sale
[**get_availabilities**](MarketplaceApi.md#get_availabilities) | **GET** /sales/availability | Returns storage that is for sale
[**get_purchase**](MarketplaceApi.md#get_purchase) | **GET** /storage/purchases/{id} | Returns purchase details
[**get_purchases**](MarketplaceApi.md#get_purchases) | **GET** /storage/purchases | Returns list of purchase IDs
[**get_reservations**](MarketplaceApi.md#get_reservations) | **GET** /sales/availability/{id}/reservations | Get availability's reservations
Expand Down Expand Up @@ -218,8 +218,8 @@ No authorization required

[[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_offered_storage**
> List[SalesAvailability] get_offered_storage()
# **get_availabilities**
> List[SalesAvailability] get_availabilities()
Returns storage that is for sale

Expand All @@ -246,11 +246,11 @@ with codex_client.ApiClient(configuration) as api_client:

try:
# Returns storage that is for sale
api_response = api_instance.get_offered_storage()
print("The response of MarketplaceApi->get_offered_storage:\n")
api_response = api_instance.get_availabilities()
print("The response of MarketplaceApi->get_availabilities:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MarketplaceApi->get_offered_storage: %s\n" % e)
print("Exception when calling MarketplaceApi->get_availabilities: %s\n" % e)
```


Expand Down

0 comments on commit 0ccb33a

Please sign in to comment.