Skip to content

Commit 2c35359

Browse files
authored
Merge pull request #53 from FreeClimbAPI/VCSWP-18372
add get_next_page operation to default api
2 parents 302393e + ebbdb12 commit 2c35359

File tree

12 files changed

+548
-10
lines changed

12 files changed

+548
-10
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
99

1010
None
1111

12+
<a name="4.7.0"></a>
13+
14+
## [4.7.0] - 2024-09-12
15+
16+
### Added
17+
18+
- get_next_page operation to default api
19+
1220
<a name="4.6.2"></a>
1321

1422
## [4.6.2] - 2024-07-23

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22
-------------
33

4-
Copyright (c) 2023 FreeClimbAPI
4+
Copyright (c) 2024 FreeClimbAPI
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
77

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FreeClimb is a cloud-based application programming interface (API) that puts the
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: 1.0.0
7-
- Package version: 4.6.2
7+
- Package version: 4.7.0
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99
For more information, please visit [https://www.freeclimb.com/support/](https://www.freeclimb.com/support/)
1010

@@ -183,7 +183,7 @@ Class | Method | HTTP request | Description
183183
*DefaultApi* | [**update_an_account**](docs/DefaultApi.md#update_an_account) | **POST** /Accounts/{accountId} | Manage an account
184184
*DefaultApi* | [**update_an_application**](docs/DefaultApi.md#update_an_application) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application
185185
*DefaultApi* | [**update_an_incoming_number**](docs/DefaultApi.md#update_an_incoming_number) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number
186-
186+
*DefaultApi* | [get_next_page](docs/DefaultApi.md#get_next_page) | **GET** | Get Next Page of Paginated List Resource
187187

188188
## Documentation For Models
189189

docs/AddToConference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AddToConference
22

3-
The `AddToConference` command adds a Participant to a Conference. If this Participant currently is in another Conference, the Participant is first removed from that Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`.
3+
The `AddToConference` command adds a Participant to a Conference. Two Call legs can be bridged together by creating a Conference and adding both Call legs to it via `AddToConference`.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------

docs/DefaultApi.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Method | HTTP request | Description
6060
[**update_an_account**](DefaultApi.md#update_an_account) | **POST** /Accounts/{accountId} | Manage an account
6161
[**update_an_application**](DefaultApi.md#update_an_application) | **POST** /Accounts/{accountId}/Applications/{applicationId} | Update an application
6262
[**update_an_incoming_number**](DefaultApi.md#update_an_incoming_number) | **POST** /Accounts/{accountId}/IncomingPhoneNumbers/{phoneNumberId} | Update an Incoming Number
63-
63+
[**get_next_page**](DefaultApi.md#get_next_page) | **GET** | Get Next Page of Paginated List Resource
6464

6565
# **buy_a_phone_number**
6666
> IncomingNumberResult buy_a_phone_number(account_id, buy_incoming_number_request)
@@ -4747,3 +4747,76 @@ Name | Type | Description | Notes
47474747

47484748
[[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)
47494749

4750+
4751+
# **get_next_page**
4752+
4753+
> (type(response)) get_next_page(response)
4754+
4755+
Get Next Page of Paginated List Resource
4756+
4757+
### Example
4758+
4759+
* Basic Authentication (fc):
4760+
4761+
```typescript
4762+
import time
4763+
import freeclimb
4764+
from freeclimb.api import default_api
4765+
from freeclimb.model.call_status import CallStatus
4766+
from freeclimb.model.call_list import CallList
4767+
from pprint import pprint
4768+
# Defining the host is optional and defaults to https://www.freeclimb.com/apiserver
4769+
# See configuration.py for a list of all supported configuration parameters.
4770+
configuration = freeclimb.Configuration(
4771+
host = "https://www.freeclimb.com/apiserver"
4772+
)
4773+
4774+
# The client must configure the authentication and authorization parameters
4775+
# in accordance with the API server security policy.
4776+
# Examples for each auth method are provided below, use the example that
4777+
# satisfies your auth use case.
4778+
4779+
# Configure HTTP basic authorization: fc
4780+
configuration = freeclimb.Configuration(
4781+
username = 'ACCOUNT_ID',
4782+
password = 'API_KEY'
4783+
)
4784+
4785+
# Enter a context with an instance of the API client
4786+
with freeclimb.ApiClient(configuration) as api_client:
4787+
# Create an instance of the API class
4788+
api_instance = default_api.DefaultApi(api_client)
4789+
4790+
try:
4791+
api_response = api_instance.list_calls()
4792+
pprint(api_response)
4793+
next_page_response = api_instance.get_next_page(api_response)
4794+
pprint(next_page_response)
4795+
except freeclimb.ApiException as e:
4796+
print("Exception when calling DefaultApi->list_calls: %s\n" % e)
4797+
```
4798+
4799+
### Parameters
4800+
4801+
Name | Type | Description | Notes
4802+
------------- | ------------- | ------------- | -------------
4803+
response | Any | Response from operation to list an API resource |
4804+
4805+
### Return type
4806+
4807+
type(response)
4808+
4809+
### Authorization
4810+
4811+
[fc](../README.md#fc)
4812+
4813+
### HTTP request headers
4814+
4815+
- **Content-Type**: Not defined
4816+
- **Accept**: application/json
4817+
4818+
### HTTP response details
4819+
4820+
| Status code | Description | Response headers |
4821+
|-------------|-------------|------------------|
4822+
| 200 | Successful retrieved resource list | - |

freeclimb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313

14-
__version__ = "4.6.2"
14+
__version__ = "4.7.0"
1515

1616
# import ApiClient
1717
from freeclimb.api_client import ApiClient

freeclimb/api/default_api.py

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8365,3 +8365,129 @@ def update_an_incoming_number(
83658365

83668366
return self.update_an_incoming_number_endpoint.call_with_http_info(**kwargs)
83678367

8368+
8369+
def get_next_page(
8370+
self,
8371+
response,
8372+
**kwargs
8373+
):
8374+
"""Get Next Page
8375+
8376+
This method makes a synchronous HTTP request by default. To make an
8377+
asynchronous HTTP request, please pass async_req=True
8378+
8379+
>>> thread = api.get_next_page(response, async_req=True)
8380+
>>> result = thread.get()
8381+
8382+
Args:
8383+
response (object): Response from previous request to get paginated list resource.
8384+
8385+
Keyword Args:
8386+
_return_http_data_only (bool): response data without head status
8387+
code and headers. Default is True.
8388+
_preload_content (bool): if False, the urllib3.HTTPResponse object
8389+
will be returned without reading/decoding response data.
8390+
Default is True.
8391+
_request_timeout (int/float/tuple): timeout setting for this request. If
8392+
one number provided, it will be total request timeout. It can also
8393+
be a pair (tuple) of (connection, read) timeouts.
8394+
Default is None.
8395+
_check_input_type (bool): specifies if type checking
8396+
should be done one the data sent to the server.
8397+
Default is True.
8398+
_check_return_type (bool): specifies if type checking
8399+
should be done one the data received from the server.
8400+
Default is True.
8401+
_spec_property_naming (bool): True if the variable names in the input data
8402+
are serialized names, as specified in the OpenAPI document.
8403+
False if the variable names in the input data
8404+
are pythonic names, e.g. snake case (default)
8405+
_content_type (str/None): force body content-type.
8406+
Default is None and content-type will be predicted by allowed
8407+
content-types and body.
8408+
_host_index (int/None): specifies the index of the server
8409+
that we want to use.
8410+
Default is read from the configuration.
8411+
async_req (bool): execute request asynchronously
8412+
8413+
Returns:
8414+
object
8415+
If the method is called asynchronously, returns the request
8416+
thread.
8417+
"""
8418+
kwargs['async_req'] = kwargs.get(
8419+
'async_req', False
8420+
)
8421+
kwargs['_return_http_data_only'] = kwargs.get(
8422+
'_return_http_data_only', True
8423+
)
8424+
kwargs['_preload_content'] = kwargs.get(
8425+
'_preload_content', True
8426+
)
8427+
kwargs['_request_timeout'] = kwargs.get(
8428+
'_request_timeout', None
8429+
)
8430+
kwargs['_check_input_type'] = kwargs.get(
8431+
'_check_input_type', True
8432+
)
8433+
kwargs['_check_return_type'] = kwargs.get(
8434+
'_check_return_type', True
8435+
)
8436+
kwargs['_spec_property_naming'] = kwargs.get(
8437+
'_spec_property_naming', False
8438+
)
8439+
kwargs['_content_type'] = kwargs.get(
8440+
'_content_type')
8441+
kwargs['_host_index'] = kwargs.get('_host_index')
8442+
8443+
if not hasattr(response, 'next_page_uri') or not response.next_page_uri:
8444+
raise ValueError("The response object does not have a next_page_uri attribute or it is empty.")
8445+
8446+
endpoint = _Endpoint(
8447+
settings={
8448+
'response_type': (type(response),),
8449+
'auth': [
8450+
'fc'
8451+
],
8452+
'endpoint_path': response.next_page_uri,
8453+
'operation_id': 'get_next_page',
8454+
'http_method': 'GET',
8455+
'servers': None,
8456+
},
8457+
params_map={
8458+
'all': [
8459+
],
8460+
'required': [
8461+
],
8462+
'nullable': [
8463+
],
8464+
'enum': [
8465+
],
8466+
'validation': [
8467+
]
8468+
},
8469+
root_map={
8470+
'validations': {
8471+
},
8472+
'allowed_values': {
8473+
},
8474+
'openapi_types': {
8475+
},
8476+
'attribute_map': {
8477+
},
8478+
'location_map': {
8479+
},
8480+
'collection_format_map': {
8481+
}
8482+
},
8483+
headers_map={
8484+
'accept': [
8485+
'application/json'
8486+
],
8487+
'content_type': [],
8488+
},
8489+
api_client=self.api_client
8490+
)
8491+
8492+
return endpoint.call_with_http_info(**kwargs)
8493+

freeclimb/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/4.6.2/python'
80+
self.user_agent = 'OpenAPI-Generator/4.7.0/python'
8181

8282
def __enter__(self):
8383
return self

freeclimb/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def to_debug_report(self):
405405
"OS: {env}\n"\
406406
"Python Version: {pyversion}\n"\
407407
"Version of the API: 1.0.0\n"\
408-
"SDK Package Version: 4.6.2".\
408+
"SDK Package Version: 4.7.0".\
409409
format(env=sys.platform, pyversion=sys.version)
410410

411411
def get_host_settings(self):

0 commit comments

Comments
 (0)