Skip to content

Commit

Permalink
New storage search feature (#10)
Browse files Browse the repository at this point in the history
* updated python sdk to include the new mcode-sdk-api capabilities - specifically storage.search

* updated python sdk to include the new mcode-sdk-api capabilities - specifically storage.search
  • Loading branch information
royWeisselberg authored Dec 17, 2024
1 parent 94a0b56 commit 39a72bd
Show file tree
Hide file tree
Showing 10 changed files with 525 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# NOTE: This file is auto generated by OpenAPI Generator.
# URL: https://openapi-generator.tech
#
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: monday_code Python package

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
- name: Test with pytest
run: |
pytest --cov={{packageName}}
98 changes: 98 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
.openapi-generator-ignore
.travis.yml
README.md
docs/EnvironmentVariablesApi.md
docs/GetByKeyFromStorage404Response.md
docs/GetByKeyFromStorage500Response.md
docs/IncrementCounter200Response.md
docs/IncrementCounter200ResponseAnyOf.md
docs/IncrementCounter200ResponseAnyOf1.md
docs/IncrementCounterParams.md
docs/JsonDataContract.md
docs/LogMethods.md
docs/LogsApi.md
docs/Period.md
docs/PublishMessageParams.md
docs/PublishMessageResponse.md
docs/QueueApi.md
docs/SecretsApi.md
docs/SecureStorageApi.md
docs/StorageApi.md
docs/StorageDataContract.md
docs/UpsertByKeyFromStorage200Response.md
docs/UpsertByKeyFromStorage200ResponseAnyOf.md
docs/UpsertByKeyFromStorage200ResponseAnyOf1.md
docs/ValidateSecretParams.md
docs/ValidateSecretResponse.md
docs/WriteLogRequestBody.md
docs/WriteLogRequestBodyError.md
git_push.sh
monday_code/__init__.py
monday_code/api/__init__.py
monday_code/api/environment_variables_api.py
monday_code/api/logs_api.py
monday_code/api/queue_api.py
monday_code/api/secrets_api.py
monday_code/api/secure_storage_api.py
monday_code/api/storage_api.py
monday_code/api_client.py
monday_code/api_response.py
monday_code/configuration.py
monday_code/exceptions.py
monday_code/models/__init__.py
monday_code/models/get_by_key_from_storage404_response.py
monday_code/models/get_by_key_from_storage500_response.py
monday_code/models/increment_counter200_response.py
monday_code/models/increment_counter200_response_any_of.py
monday_code/models/increment_counter200_response_any_of1.py
monday_code/models/increment_counter_params.py
monday_code/models/json_data_contract.py
monday_code/models/log_methods.py
monday_code/models/period.py
monday_code/models/publish_message_params.py
monday_code/models/publish_message_response.py
monday_code/models/storage_data_contract.py
monday_code/models/upsert_by_key_from_storage200_response.py
monday_code/models/upsert_by_key_from_storage200_response_any_of.py
monday_code/models/upsert_by_key_from_storage200_response_any_of1.py
monday_code/models/validate_secret_params.py
monday_code/models/validate_secret_response.py
monday_code/models/write_log_request_body.py
monday_code/models/write_log_request_body_error.py
monday_code/py.typed
monday_code/rest.py
pyproject.toml
requirements.txt
setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_environment_variables_api.py
test/test_get_by_key_from_storage404_response.py
test/test_get_by_key_from_storage500_response.py
test/test_increment_counter200_response.py
test/test_increment_counter200_response_any_of.py
test/test_increment_counter200_response_any_of1.py
test/test_increment_counter_params.py
test/test_json_data_contract.py
test/test_log_methods.py
test/test_logs_api.py
test/test_period.py
test/test_publish_message_params.py
test/test_publish_message_response.py
test/test_queue_api.py
test/test_secrets_api.py
test/test_secure_storage_api.py
test/test_storage_api.py
test/test_storage_data_contract.py
test/test_upsert_by_key_from_storage200_response.py
test/test_upsert_by_key_from_storage200_response_any_of.py
test/test_upsert_by_key_from_storage200_response_any_of1.py
test/test_validate_secret_params.py
test/test_validate_secret_response.py
test/test_write_log_request_body.py
test/test_write_log_request_body_error.py
tox.ini
1 change: 1 addition & 0 deletions .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.11.0-SNAPSHOT
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Class | Method | HTTP request | Description
*StorageApi* | [**delete_by_key_from_storage**](docs/StorageApi.md#delete_by_key_from_storage) | **DELETE** /storage/{key} |
*StorageApi* | [**get_by_key_from_storage**](docs/StorageApi.md#get_by_key_from_storage) | **GET** /storage/{key} |
*StorageApi* | [**increment_counter**](docs/StorageApi.md#increment_counter) | **PUT** /storage/counter/increment |
*StorageApi* | [**search_record**](docs/StorageApi.md#search_record) | **GET** /storage/search/{term} |
*StorageApi* | [**upsert_by_key_from_storage**](docs/StorageApi.md#upsert_by_key_from_storage) | **PUT** /storage/{key} |


Expand Down
71 changes: 71 additions & 0 deletions docs/StorageApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Method | HTTP request | Description
[**delete_by_key_from_storage**](StorageApi.md#delete_by_key_from_storage) | **DELETE** /storage/{key} |
[**get_by_key_from_storage**](StorageApi.md#get_by_key_from_storage) | **GET** /storage/{key} |
[**increment_counter**](StorageApi.md#increment_counter) | **PUT** /storage/counter/increment |
[**search_record**](StorageApi.md#search_record) | **GET** /storage/search/{term} |
[**upsert_by_key_from_storage**](StorageApi.md#upsert_by_key_from_storage) | **PUT** /storage/{key} |


Expand Down Expand Up @@ -213,6 +214,76 @@ 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)

# **search_record**
> object search_record(term, x_monday_access_token, cursor=cursor)


### Example


```python
import monday_code
from monday_code.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:59999
# See configuration.py for a list of all supported configuration parameters.
configuration = monday_code.Configuration(
host = "http://localhost:59999"
)


# Enter a context with an instance of the API client
with monday_code.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = monday_code.StorageApi(api_client)
term = 'term_example' # str |
x_monday_access_token = 'x_monday_access_token_example' # str |
cursor = 'cursor_example' # str | (optional)

try:
api_response = api_instance.search_record(term, x_monday_access_token, cursor=cursor)
print("The response of StorageApi->search_record:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling StorageApi->search_record: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**term** | **str**| |
**x_monday_access_token** | **str**| |
**cursor** | **str**| | [optional]

### Return type

**object**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**404** | | - |
**500** | | - |

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

# **upsert_by_key_from_storage**
> UpsertByKeyFromStorage200Response upsert_by_key_from_storage(key, x_monday_access_token, json_data_contract, shared=shared, previous_version=previous_version)
Expand Down
Loading

0 comments on commit 39a72bd

Please sign in to comment.