From a796577b99188e20b877ecd6acd81e216fd3dc47 Mon Sep 17 00:00:00 2001 From: Paolo Lucchino Date: Tue, 7 May 2024 11:26:46 +0200 Subject: [PATCH 1/3] API v4.0.0 --- .openapi-generator/FILES | 16 +- .openapi-generator/VERSION | 2 +- README.md | 60 ++- data_bridges_client/__init__.py | 7 +- data_bridges_client/api/commodities_api.py | 40 +- .../api/commodity_units_api.py | 40 +- data_bridges_client/api/currency_api.py | 40 +- data_bridges_client/api/economic_data_api.py | 43 +- data_bridges_client/api/food_security_api.py | 30 +- data_bridges_client/api/gorp_api.py | 40 +- data_bridges_client/api/incubation_api.py | 406 ++++++++++++++++-- data_bridges_client/api/market_prices_api.py | 67 ++- data_bridges_client/api/markets_api.py | 60 ++- data_bridges_client/api/rpme_api.py | 111 +++-- data_bridges_client/api/surveys_api.py | 108 +++-- data_bridges_client/api/xls_forms_api.py | 316 +------------- data_bridges_client/api_client.py | 119 +++-- data_bridges_client/api_response.py | 6 +- data_bridges_client/configuration.py | 14 +- data_bridges_client/exceptions.py | 3 +- data_bridges_client/models/__init__.py | 7 +- data_bridges_client/models/bad_request_dto.py | 34 +- data_bridges_client/models/commodity_dto.py | 37 +- .../models/commodity_price_dto.py | 33 +- .../models/commodity_processing_dto.py | 34 +- .../models/commodity_quality_dto.py | 34 +- data_bridges_client/models/currency_dto.py | 33 +- .../models/economic_data_dto.py | 33 +- .../models/economic_indicator_property.py | 33 +- ...conomic_indicator_property_paged_result.py | 38 +- data_bridges_client/models/feature.py | 37 +- data_bridges_client/models/geometry.py | 33 +- .../models/gorp_value_with_changes.py | 34 +- .../gorp_value_with_changes_paged_result.py | 38 +- .../models/household_survey_list_dto.py | 37 +- .../household_survey_list_dto_paged_result.py | 38 +- data_bridges_client/models/ipc_value.py | 33 +- .../models/ipc_value_paged_result.py | 38 +- data_bridges_client/models/key_name_dto.py | 33 +- data_bridges_client/models/market_dto.py | 34 +- .../models/market_geo_json_root.py | 35 +- .../models/mfi_processed_data_dto.py | 33 +- .../models/nearby_markets_dto.py | 34 +- .../models/paged_commodity_list_dto.py | 36 +- .../models/paged_commodity_price_list_dto.py | 36 +- ...modity_weekly_aggregated_price_list_dto.py | 36 +- .../models/paged_currency_list_dto.py | 36 +- .../models/paged_economic_data_dto.py | 36 +- .../models/paged_market_list_dto.py | 36 +- .../models/paged_processed_data_dto.py | 36 +- .../models/paged_survey_list_dto.py | 36 +- .../models/paged_survey_responses_dto.py | 34 +- .../models/paged_xls_form_list_dto.py | 36 +- data_bridges_client/models/problem_details.py | 33 +- data_bridges_client/models/properties.py | 33 +- data_bridges_client/models/rpme_assessment.py | 35 +- .../models/rpme_assessment_paged_result.py | 38 +- .../models/rpme_output_values.py | 34 +- data_bridges_client/models/rpme_variable.py | 34 +- .../models/rpme_variable_paged_result.py | 38 +- data_bridges_client/models/survey_list_dto.py | 33 +- .../models/usd_indirect_quotation.py | 33 +- .../usd_indirect_quotation_paged_result.py | 38 +- .../models/view_extended_aggregated_price.py | 33 +- ..._extended_aggregated_price_paged_result.py | 38 +- .../models/view_extended_alps_value.py | 33 +- .../view_extended_alps_value_paged_result.py | 38 +- .../models/weekly_aggregated_price.py | 33 +- .../xls_form_definition_new_schema_dto.py | 163 +++++++ data_bridges_client/models/xls_form_dto.py | 33 +- ...finition_dto.py => xls_form_fields_dto.py} | 91 ++-- .../models/xls_form_list_choice_dto.py | 113 +++++ .../models/xls_form_list_choices_dto.py | 121 ++++++ data_bridges_client/rest.py | 62 ++- docs/BadRequestDTO.md | 4 +- docs/CommoditiesApi.md | 18 +- docs/CommodityDTO.md | 4 +- docs/CommodityPriceDTO.md | 4 +- docs/CommodityProcessingDTO.md | 4 +- docs/CommodityQualityDTO.md | 4 +- docs/CommodityUnitsApi.md | 18 +- docs/CurrencyApi.md | 18 +- docs/CurrencyDTO.md | 4 +- docs/EconomicDataApi.md | 18 +- docs/EconomicDataDTO.md | 4 +- docs/EconomicIndicatorProperty.md | 4 +- docs/EconomicIndicatorPropertyPagedResult.md | 4 +- docs/Feature.md | 4 +- docs/FoodSecurityApi.md | 10 +- docs/Geometry.md | 4 +- docs/GorpApi.md | 18 +- docs/GorpValueWithChanges.md | 4 +- docs/GorpValueWithChangesPagedResult.md | 4 +- docs/HouseholdSurveyListDTO.md | 4 +- docs/HouseholdSurveyListDTOPagedResult.md | 4 +- docs/IncubationApi.md | 143 ++++-- docs/IpcValue.md | 4 +- docs/IpcValuePagedResult.md | 4 +- docs/KeyNameDto.md | 4 +- docs/MFIProcessedDataDTO.md | 4 +- docs/MarketDTO.md | 4 +- docs/MarketGeoJsonRoot.md | 4 +- docs/MarketPricesApi.md | 40 +- docs/MarketsApi.md | 34 +- docs/NearbyMarketsDTO.md | 4 +- docs/PagedCommodityListDTO.md | 4 +- docs/PagedCommodityPriceListDTO.md | 4 +- ...edCommodityWeeklyAggregatedPriceListDTO.md | 4 +- docs/PagedCurrencyListDTO.md | 4 +- docs/PagedEconomicDataDTO.md | 4 +- docs/PagedMarketListDTO.md | 4 +- docs/PagedProcessedDataDTO.md | 4 +- docs/PagedSurveyListDTO.md | 4 +- docs/PagedSurveyResponsesDTO.md | 4 +- docs/PagedXlsFormListDTO.md | 4 +- docs/ProblemDetails.md | 4 +- docs/Properties.md | 4 +- docs/RpmeApi.md | 60 ++- docs/RpmeAssessment.md | 4 +- docs/RpmeAssessmentPagedResult.md | 4 +- docs/RpmeOutputValues.md | 4 +- docs/RpmeVariable.md | 4 +- docs/RpmeVariablePagedResult.md | 4 +- docs/SurveyListDTO.md | 4 +- docs/SurveysApi.md | 50 ++- docs/UsdIndirectQuotation.md | 4 +- docs/UsdIndirectQuotationPagedResult.md | 4 +- docs/ViewExtendedAggregatedPrice.md | 4 +- .../ViewExtendedAggregatedPricePagedResult.md | 4 +- docs/ViewExtendedAlpsValue.md | 4 +- docs/ViewExtendedAlpsValuePagedResult.md | 4 +- docs/WeeklyAggregatedPrice.md | 4 +- docs/XlsFormDTO.md | 4 +- docs/XlsFormDefinitionDTO.md | 33 -- docs/XlsFormDefinitionNewSchemaDTO.md | 36 ++ docs/XlsFormFieldsDTO.md | 32 ++ docs/XlsFormListChoiceDTO.md | 30 ++ docs/XlsFormListChoicesDTO.md | 30 ++ docs/XlsFormsApi.md | 91 +--- git_push.sh | 4 +- pyproject.toml | 45 +- setup.py | 2 +- test-requirements.txt | 2 + test/test_bad_request_dto.py | 3 +- test/test_commodities_api.py | 2 +- test/test_commodity_dto.py | 3 +- test/test_commodity_price_dto.py | 3 +- test/test_commodity_processing_dto.py | 3 +- test/test_commodity_quality_dto.py | 3 +- test/test_commodity_units_api.py | 2 +- test/test_currency_api.py | 2 +- test/test_currency_dto.py | 3 +- test/test_economic_data_api.py | 2 +- test/test_economic_data_dto.py | 3 +- test/test_economic_indicator_property.py | 3 +- ...conomic_indicator_property_paged_result.py | 3 +- test/test_feature.py | 3 +- test/test_food_security_api.py | 2 +- test/test_geometry.py | 3 +- test/test_gorp_api.py | 2 +- test/test_gorp_value_with_changes.py | 3 +- ...st_gorp_value_with_changes_paged_result.py | 3 +- test/test_household_survey_list_dto.py | 3 +- ..._household_survey_list_dto_paged_result.py | 3 +- test/test_incubation_api.py | 11 +- test/test_ipc_value.py | 3 +- test/test_ipc_value_paged_result.py | 3 +- test/test_key_name_dto.py | 3 +- test/test_market_dto.py | 3 +- test/test_market_geo_json_root.py | 3 +- test/test_market_prices_api.py | 2 +- test/test_markets_api.py | 2 +- test/test_mfi_processed_data_dto.py | 3 +- test/test_nearby_markets_dto.py | 3 +- test/test_paged_commodity_list_dto.py | 3 +- test/test_paged_commodity_price_list_dto.py | 3 +- ...modity_weekly_aggregated_price_list_dto.py | 3 +- test/test_paged_currency_list_dto.py | 3 +- test/test_paged_economic_data_dto.py | 3 +- test/test_paged_market_list_dto.py | 3 +- test/test_paged_processed_data_dto.py | 3 +- test/test_paged_survey_list_dto.py | 3 +- test/test_paged_survey_responses_dto.py | 3 +- test/test_paged_xls_form_list_dto.py | 3 +- test/test_problem_details.py | 3 +- test/test_properties.py | 3 +- test/test_rpme_api.py | 2 +- test/test_rpme_assessment.py | 3 +- test/test_rpme_assessment_paged_result.py | 3 +- test/test_rpme_output_values.py | 3 +- test/test_rpme_variable.py | 3 +- test/test_rpme_variable_paged_result.py | 3 +- test/test_survey_list_dto.py | 3 +- test/test_surveys_api.py | 2 +- test/test_usd_indirect_quotation.py | 3 +- ...est_usd_indirect_quotation_paged_result.py | 3 +- test/test_view_extended_aggregated_price.py | 3 +- ..._extended_aggregated_price_paged_result.py | 3 +- test/test_view_extended_alps_value.py | 3 +- ...t_view_extended_alps_value_paged_result.py | 3 +- test/test_weekly_aggregated_price.py | 3 +- ...test_xls_form_definition_new_schema_dto.py | 63 +++ test/test_xls_form_dto.py | 3 +- ...ion_dto.py => test_xls_form_fields_dto.py} | 36 +- test/test_xls_form_list_choice_dto.py | 53 +++ test/test_xls_form_list_choices_dto.py | 57 +++ test/test_xls_forms_api.py | 9 +- 207 files changed, 2855 insertions(+), 2228 deletions(-) create mode 100644 data_bridges_client/models/xls_form_definition_new_schema_dto.py rename data_bridges_client/models/{xls_form_definition_dto.py => xls_form_fields_dto.py} (53%) create mode 100644 data_bridges_client/models/xls_form_list_choice_dto.py create mode 100644 data_bridges_client/models/xls_form_list_choices_dto.py delete mode 100644 docs/XlsFormDefinitionDTO.md create mode 100644 docs/XlsFormDefinitionNewSchemaDTO.md create mode 100644 docs/XlsFormFieldsDTO.md create mode 100644 docs/XlsFormListChoiceDTO.md create mode 100644 docs/XlsFormListChoicesDTO.md create mode 100644 test/test_xls_form_definition_new_schema_dto.py rename test/{test_xls_form_definition_dto.py => test_xls_form_fields_dto.py} (59%) create mode 100644 test/test_xls_form_list_choice_dto.py create mode 100644 test/test_xls_form_list_choices_dto.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3f324dd..c2acb95 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,7 +1,6 @@ .github/workflows/python.yml .gitignore .gitlab-ci.yml -.openapi-generator-ignore .travis.yml README.md data_bridges_client/__init__.py @@ -70,8 +69,11 @@ data_bridges_client/models/view_extended_aggregated_price_paged_result.py data_bridges_client/models/view_extended_alps_value.py data_bridges_client/models/view_extended_alps_value_paged_result.py data_bridges_client/models/weekly_aggregated_price.py -data_bridges_client/models/xls_form_definition_dto.py +data_bridges_client/models/xls_form_definition_new_schema_dto.py data_bridges_client/models/xls_form_dto.py +data_bridges_client/models/xls_form_fields_dto.py +data_bridges_client/models/xls_form_list_choice_dto.py +data_bridges_client/models/xls_form_list_choices_dto.py data_bridges_client/py.typed data_bridges_client/rest.py docs/BadRequestDTO.md @@ -133,7 +135,10 @@ docs/ViewExtendedAlpsValue.md docs/ViewExtendedAlpsValuePagedResult.md docs/WeeklyAggregatedPrice.md docs/XlsFormDTO.md -docs/XlsFormDefinitionDTO.md +docs/XlsFormDefinitionNewSchemaDTO.md +docs/XlsFormFieldsDTO.md +docs/XlsFormListChoiceDTO.md +docs/XlsFormListChoicesDTO.md docs/XlsFormsApi.md git_push.sh pyproject.toml @@ -200,7 +205,10 @@ test/test_view_extended_aggregated_price_paged_result.py test/test_view_extended_alps_value.py test/test_view_extended_alps_value_paged_result.py test/test_weekly_aggregated_price.py -test/test_xls_form_definition_dto.py +test/test_xls_form_definition_new_schema_dto.py test/test_xls_form_dto.py +test/test_xls_form_fields_dto.py +test/test_xls_form_list_choice_dto.py +test/test_xls_form_list_choices_dto.py test/test_xls_forms_api.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4b49d9b..18bb418 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.5.0 diff --git a/README.md b/README.md index f664018..c6ddaae 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.o This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 2.0.0 -- Package version: 2.0.0 +- API version: 4.0.0 +- Package version: 4.0.0 +- Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -17,9 +18,9 @@ Python 3.7+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install git+https://github.com/WFP-VAM/DataBridgesAPI.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/WFP-VAM/DataBridgesAPI.git`) Then import the package: ```python @@ -50,11 +51,9 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python -import time import data_bridges_client from data_bridges_client.rest import ApiException from pprint import pprint -from data_bridges_client.token import WfpApiToken # Configure OAuth2 access token for authorization: default KEY = '' @@ -64,7 +63,7 @@ token = WfpApiToken(api_key=KEY, api_secret=SECRET) # Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/1.4.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/1.4.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) configuration.access_token = token.refresh() @@ -91,7 +90,7 @@ with data_bridges_client.ApiClient(configuration) as api_client: ## Documentation for API Endpoints -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -110,7 +109,8 @@ Class | Method | HTTP request | Description *IncubationApi* | [**household_full_data_get**](docs/IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization. *IncubationApi* | [**household_official_use_base_data_get**](docs/IncubationApi.md#household_official_use_base_data_get) | **GET** /Household/OfficialUseBaseData | Get data that includes the core household fields only by Survey ID *IncubationApi* | [**household_public_base_data_get**](docs/IncubationApi.md#household_public_base_data_get) | **GET** /Household/PublicBaseData | Get data that includes the core household fields only by Survey ID -*IncubationApi* | [**household_surveys_get**](docs/IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. +*IncubationApi* | [**household_surveys_get**](docs/IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. +*IncubationApi* | [**xls_forms_definition_get**](docs/IncubationApi.md#xls_forms_definition_get) | **GET** /XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. *MarketPricesApi* | [**market_prices_alps_get**](docs/MarketPricesApi.md#market_prices_alps_get) | **GET** /MarketPrices/Alps | Returns time series values of ALPS and PEWI. *MarketPricesApi* | [**market_prices_price_daily_get**](docs/MarketPricesApi.md#market_prices_price_daily_get) | **GET** /MarketPrices/PriceDaily | Returns a daily time series of commodity market prices. *MarketPricesApi* | [**market_prices_price_monthly_get**](docs/MarketPricesApi.md#market_prices_price_monthly_get) | **GET** /MarketPrices/PriceMonthly | Returns a monthly time series of commodity market prices. @@ -130,7 +130,6 @@ Class | Method | HTTP request | Description *SurveysApi* | [**m_fi_surveys_full_data_get**](docs/SurveysApi.md#m_fi_surveys_full_data_get) | **GET** /MFI/Surveys/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization. *SurveysApi* | [**m_fi_surveys_get**](docs/SurveysApi.md#m_fi_surveys_get) | **GET** /MFI/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. *SurveysApi* | [**m_fi_surveys_processed_data_get**](docs/SurveysApi.md#m_fi_surveys_processed_data_get) | **GET** /MFI/Surveys/ProcessedData | Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range -*XlsFormsApi* | [**m_fi_xls_forms_definition_get**](docs/XlsFormsApi.md#m_fi_xls_forms_definition_get) | **GET** /MFI/XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. *XlsFormsApi* | [**m_fi_xls_forms_get**](docs/XlsFormsApi.md#m_fi_xls_forms_get) | **GET** /MFI/XlsForms | Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. @@ -184,7 +183,10 @@ Class | Method | HTTP request | Description - [ViewExtendedAlpsValuePagedResult](docs/ViewExtendedAlpsValuePagedResult.md) - [WeeklyAggregatedPrice](docs/WeeklyAggregatedPrice.md) - [XlsFormDTO](docs/XlsFormDTO.md) - - [XlsFormDefinitionDTO](docs/XlsFormDefinitionDTO.md) + - [XlsFormDefinitionNewSchemaDTO](docs/XlsFormDefinitionNewSchemaDTO.md) + - [XlsFormFieldsDTO](docs/XlsFormFieldsDTO.md) + - [XlsFormListChoiceDTO](docs/XlsFormListChoiceDTO.md) + - [XlsFormListChoicesDTO](docs/XlsFormListChoicesDTO.md) @@ -199,13 +201,43 @@ Authentication schemes defined for the API: - **Flow**: implicit - **Authorization URL**: https://api.wfp.org/authorize - **Scopes**: - - **vamdatabridges_household-officialusebasedata_get**: vamdatabridges_household-officialusebasedata_get - **vamdatabridges_rpme-fulldata_get**: vamdatabridges_rpme-fulldata_get + - **vamdatabridges_foodsecurity-list_get**: vamdatabridges_foodsecurity-list_get + - **vamdatabridges_commodities-list_get**: vamdatabridges_commodities-list_get + - **vamdatabridges_commodityunits-list_get**: vamdatabridges_commodityunits-list_get + - **vamdatabridges_markets-nearbymarkets_get**: vamdatabridges_markets-nearbymarkets_get + - **vamdatabridges_rpme-outputvalues_get**: vamdatabridges_rpme-outputvalues_get + - **vamdatabridges_marketprices-alps_get**: vamdatabridges_marketprices-alps_get + - **vamdatabridges_mfi-surveys_get**: vamdatabridges_mfi-surveys_get + - **vamdatabridges_commodities-categories-list_get**: vamdatabridges_commodities-categories-list_get + - **vamdatabridges_commodityunits-conversion-list_get**: vamdatabridges_commodityunits-conversion-list_get + - **vamdatabridges_economicdata_get**: vamdatabridges_economicdata_get + - **vamdatabridges_mfi-surveys-processeddata_get**: vamdatabridges_mfi-surveys-processeddata_get + - **vamdatabridges_marketprices-priceweekly_get**: vamdatabridges_marketprices-priceweekly_get + - **vamdatabridges_markets-marketsascsv_get**: vamdatabridges_markets-marketsascsv_get - **vamdatabridges_household-publicbasedata_get**: vamdatabridges_household-publicbasedata_get + - **vamdatabridges_mfi-xlsforms_get**: vamdatabridges_mfi-xlsforms_get + - **vamdatabridges_economicdata-indicatorlist_get**: vamdatabridges_economicdata-indicatorlist_get + - **vamdatabridges_markets-geojsonlist_get**: vamdatabridges_markets-geojsonlist_get + - **vamdatabridges_rpme-surveys_get**: vamdatabridges_rpme-surveys_get + - **vamdatabridges_rpme-xlsforms_get**: vamdatabridges_rpme-xlsforms_get + - **vamdatabridges_mfi-surveys-basedata_get**: vamdatabridges_mfi-surveys-basedata_get - **vamdatabridges_mfi-surveys-fulldata_get**: vamdatabridges_mfi-surveys-fulldata_get - - **vamdatabridges_household-draftinternalbasedata_get**: vamdatabridges_household-draftinternalbasedata_get - - **vamdatabridges_marketprices-priceraw_get**: vamdatabridges_marketprices-priceraw_get - **vamdatabridges_household-fulldata_get**: vamdatabridges_household-fulldata_get + - **vamdatabridges_household-officialusebasedata_get**: vamdatabridges_household-officialusebasedata_get + - **vamdatabridges_marketprices-pricemonthly_get**: vamdatabridges_marketprices-pricemonthly_get + - **vamdatabridges_markets-list_get**: vamdatabridges_markets-list_get + - **vamdatabridges_currency-list_get**: vamdatabridges_currency-list_get + - **vamdatabridges_gorp-list_get**: vamdatabridges_gorp-list_get + - **vamdatabridges_marketprices-priceraw_get**: vamdatabridges_marketprices-priceraw_get + - **vamdatabridges_rpme-variables_get**: vamdatabridges_rpme-variables_get + - **vamdatabridges_gorp-latest_get**: vamdatabridges_gorp-latest_get + - **vamdatabridges_currency-usdindirectquotation_get**: vamdatabridges_currency-usdindirectquotation_get + - **vamdatabridges_xlsforms-definition_get**: vamdatabridges_xlsforms-definition_get + - **vamdatabridges_household-draftinternalbasedata_get**: vamdatabridges_household-draftinternalbasedata_get + - **vamdatabridges_household-surveys_get**: vamdatabridges_household-surveys_get + - **vamdatabridges_marketprices-pricedaily_get**: vamdatabridges_marketprices-pricedaily_get + - **vamdatabridges_rpme-basedata_get**: vamdatabridges_rpme-basedata_get ## Author diff --git a/data_bridges_client/__init__.py b/data_bridges_client/__init__.py index 8fce7c3..cb9a661 100644 --- a/data_bridges_client/__init__.py +++ b/data_bridges_client/__init__.py @@ -7,7 +7,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -91,4 +91,7 @@ from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice from data_bridges_client.models.xls_form_dto import XlsFormDTO -from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO +from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO +from data_bridges_client.models.xls_form_fields_dto import XlsFormFieldsDTO +from data_bridges_client.models.xls_form_list_choice_dto import XlsFormListChoiceDTO +from data_bridges_client.models.xls_form_list_choices_dto import XlsFormListChoicesDTO diff --git a/data_bridges_client/api/commodities_api.py b/data_bridges_client/api/commodities_api.py index a82dad9..2be6747 100644 --- a/data_bridges_client/api/commodities_api.py +++ b/data_bridges_client/api/commodities_api.py @@ -5,34 +5,24 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt, StrictStr, field_validator +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -74,7 +64,7 @@ def commodities_categories_list_get( ) -> PagedCommodityListDTO: """Provides the list of categories. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-categories-list_get\" Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -162,7 +152,7 @@ def commodities_categories_list_get_with_http_info( ) -> ApiResponse[PagedCommodityListDTO]: """Provides the list of categories. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-categories-list_get\" Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -250,7 +240,7 @@ def commodities_categories_list_get_without_preload_content( ) -> RESTResponseType: """Provides the list of categories. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-categories-list_get\" Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -322,7 +312,7 @@ def _commodities_categories_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -333,7 +323,7 @@ def _commodities_categories_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -424,7 +414,7 @@ def commodities_list_get( ) -> PagedCommodityListDTO: """Provide the detailed list of the commodities available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-list_get\" COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -512,7 +502,7 @@ def commodities_list_get_with_http_info( ) -> ApiResponse[PagedCommodityListDTO]: """Provide the detailed list of the commodities available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-list_get\" COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -600,7 +590,7 @@ def commodities_list_get_without_preload_content( ) -> RESTResponseType: """Provide the detailed list of the commodities available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-list_get\" COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -672,7 +662,7 @@ def _commodities_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -683,7 +673,7 @@ def _commodities_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/commodity_units_api.py b/data_bridges_client/api/commodity_units_api.py index 960f962..b13ce4b 100644 --- a/data_bridges_client/api/commodity_units_api.py +++ b/data_bridges_client/api/commodity_units_api.py @@ -5,34 +5,24 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt, StrictStr, field_validator +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -75,7 +65,7 @@ def commodity_units_conversion_list_get( ) -> PagedCommodityListDTO: """Provides conversion factors to Kilogram or Litres for each convertible unit of measure. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-conversion-list_get\" Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -167,7 +157,7 @@ def commodity_units_conversion_list_get_with_http_info( ) -> ApiResponse[PagedCommodityListDTO]: """Provides conversion factors to Kilogram or Litres for each convertible unit of measure. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-conversion-list_get\" Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -259,7 +249,7 @@ def commodity_units_conversion_list_get_without_preload_content( ) -> RESTResponseType: """Provides conversion factors to Kilogram or Litres for each convertible unit of measure. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-conversion-list_get\" Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -335,7 +325,7 @@ def _commodity_units_conversion_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -346,7 +336,7 @@ def _commodity_units_conversion_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -441,7 +431,7 @@ def commodity_units_list_get( ) -> PagedCommodityListDTO: """Provides the detailed list of the unit of measure available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -529,7 +519,7 @@ def commodity_units_list_get_with_http_info( ) -> ApiResponse[PagedCommodityListDTO]: """Provides the detailed list of the unit of measure available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -617,7 +607,7 @@ def commodity_units_list_get_without_preload_content( ) -> RESTResponseType: """Provides the detailed list of the unit of measure available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -689,7 +679,7 @@ def _commodity_units_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -700,7 +690,7 @@ def _commodity_units_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/currency_api.py b/data_bridges_client/api/currency_api.py index a878144..72f32b5 100644 --- a/data_bridges_client/api/currency_api.py +++ b/data_bridges_client/api/currency_api.py @@ -5,35 +5,25 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt, StrictStr, field_validator +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -75,7 +65,7 @@ def currency_list_get( ) -> PagedCurrencyListDTO: """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -163,7 +153,7 @@ def currency_list_get_with_http_info( ) -> ApiResponse[PagedCurrencyListDTO]: """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -251,7 +241,7 @@ def currency_list_get_without_preload_content( ) -> RESTResponseType: """Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -323,7 +313,7 @@ def _currency_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -334,7 +324,7 @@ def _currency_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -424,7 +414,7 @@ def currency_usd_indirect_quotation_get( ) -> UsdIndirectQuotationPagedResult: """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-usdindirectquotation_get\" Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code. :type country_iso3: str @@ -508,7 +498,7 @@ def currency_usd_indirect_quotation_get_with_http_info( ) -> ApiResponse[UsdIndirectQuotationPagedResult]: """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-usdindirectquotation_get\" Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code. :type country_iso3: str @@ -592,7 +582,7 @@ def currency_usd_indirect_quotation_get_without_preload_content( ) -> RESTResponseType: """Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-usdindirectquotation_get\" Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_iso3: The code to identify the country. Must be a ISO-3166 Alpha 3 code. :type country_iso3: str @@ -660,7 +650,7 @@ def _currency_usd_indirect_quotation_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -671,7 +661,7 @@ def _currency_usd_indirect_quotation_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/economic_data_api.py b/data_bridges_client/api/economic_data_api.py index 6f323f9..83a4f7e 100644 --- a/data_bridges_client/api/economic_data_api.py +++ b/data_bridges_client/api/economic_data_api.py @@ -5,37 +5,26 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import datetime - -from pydantic import StrictInt, StrictStr, field_validator +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -76,7 +65,7 @@ def economic_data_indicator_list_get( ) -> EconomicIndicatorPropertyPagedResult: """Returns the lists of indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata-indicatorlist_get\" Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: Page number for paged results :type page: int @@ -160,7 +149,7 @@ def economic_data_indicator_list_get_with_http_info( ) -> ApiResponse[EconomicIndicatorPropertyPagedResult]: """Returns the lists of indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata-indicatorlist_get\" Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: Page number for paged results :type page: int @@ -244,7 +233,7 @@ def economic_data_indicator_list_get_without_preload_content( ) -> RESTResponseType: """Returns the lists of indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata-indicatorlist_get\" Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: Page number for paged results :type page: int @@ -312,7 +301,7 @@ def _economic_data_indicator_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -323,7 +312,7 @@ def _economic_data_indicator_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -411,7 +400,7 @@ def economic_data_indicator_name_get( ) -> PagedEconomicDataDTO: """Returns the time series of values for different indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata_get\" Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param indicator_name: Name of the indicator as found in /EconomicData/IndicatorList. (required) :type indicator_name: str @@ -504,7 +493,7 @@ def economic_data_indicator_name_get_with_http_info( ) -> ApiResponse[PagedEconomicDataDTO]: """Returns the time series of values for different indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata_get\" Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param indicator_name: Name of the indicator as found in /EconomicData/IndicatorList. (required) :type indicator_name: str @@ -597,7 +586,7 @@ def economic_data_indicator_name_get_without_preload_content( ) -> RESTResponseType: """Returns the time series of values for different indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata_get\" Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param indicator_name: Name of the indicator as found in /EconomicData/IndicatorList. (required) :type indicator_name: str @@ -674,7 +663,7 @@ def _economic_data_indicator_name_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -685,7 +674,7 @@ def _economic_data_indicator_name_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/food_security_api.py b/data_bridges_client/api/food_security_api.py index 3103373..c642bf0 100644 --- a/data_bridges_client/api/food_security_api.py +++ b/data_bridges_client/api/food_security_api.py @@ -5,34 +5,24 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt, StrictStr, field_validator +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -72,7 +62,7 @@ def food_security_list_get( ) -> IpcValuePagedResult: """food_security_list_get - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_foodsecurity-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param iso3: The country ISO3 code :type iso3: str @@ -152,7 +142,7 @@ def food_security_list_get_with_http_info( ) -> ApiResponse[IpcValuePagedResult]: """food_security_list_get - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_foodsecurity-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param iso3: The country ISO3 code :type iso3: str @@ -232,7 +222,7 @@ def food_security_list_get_without_preload_content( ) -> RESTResponseType: """food_security_list_get - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_foodsecurity-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param iso3: The country ISO3 code :type iso3: str @@ -296,7 +286,7 @@ def _food_security_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -307,7 +297,7 @@ def _food_security_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/gorp_api.py b/data_bridges_client/api/gorp_api.py index e598cd4..d55f42d 100644 --- a/data_bridges_client/api/gorp_api.py +++ b/data_bridges_client/api/gorp_api.py @@ -5,34 +5,24 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictInt, StrictStr, field_validator +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -70,7 +60,7 @@ def gorp_latest_get( ) -> GorpValueWithChangesPagedResult: """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-latest_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -142,7 +132,7 @@ def gorp_latest_get_with_http_info( ) -> ApiResponse[GorpValueWithChangesPagedResult]: """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-latest_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -214,7 +204,7 @@ def gorp_latest_get_without_preload_content( ) -> RESTResponseType: """Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-latest_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -270,7 +260,7 @@ def _gorp_latest_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -281,7 +271,7 @@ def _gorp_latest_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -352,7 +342,7 @@ def gorp_list_get( ) -> GorpValueWithChangesPagedResult: """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -424,7 +414,7 @@ def gorp_list_get_with_http_info( ) -> ApiResponse[GorpValueWithChangesPagedResult]: """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -496,7 +486,7 @@ def gorp_list_get_without_preload_content( ) -> RESTResponseType: """Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -552,7 +542,7 @@ def _gorp_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -563,7 +553,7 @@ def _gorp_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/incubation_api.py b/data_bridges_client/api/incubation_api.py index 7d453c1..5e3f4f8 100644 --- a/data_bridges_client/api/incubation_api.py +++ b/data_bridges_client/api/incubation_api.py @@ -5,37 +5,27 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import datetime - -from pydantic import StrictInt, StrictStr, field_validator - -from typing import Optional +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import List, Optional +from typing_extensions import Annotated from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO +from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -58,6 +48,7 @@ def household_draft_internal_base_data_get( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -80,6 +71,8 @@ def household_draft_internal_base_data_get( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -107,6 +100,7 @@ def household_draft_internal_base_data_get( _param = self._household_draft_internal_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -135,6 +129,7 @@ def household_draft_internal_base_data_get_with_http_info( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -157,6 +152,8 @@ def household_draft_internal_base_data_get_with_http_info( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -184,6 +181,7 @@ def household_draft_internal_base_data_get_with_http_info( _param = self._household_draft_internal_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -212,6 +210,7 @@ def household_draft_internal_base_data_get_without_preload_content( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -234,6 +233,8 @@ def household_draft_internal_base_data_get_without_preload_content( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -261,6 +262,7 @@ def household_draft_internal_base_data_get_without_preload_content( _param = self._household_draft_internal_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -284,12 +286,13 @@ def _household_draft_internal_base_data_get_serialize( self, survey_id, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -300,7 +303,7 @@ def _household_draft_internal_base_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -313,6 +316,10 @@ def _household_draft_internal_base_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -361,6 +368,7 @@ def household_full_data_get( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -385,6 +393,8 @@ def household_full_data_get( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -413,6 +423,7 @@ def household_full_data_get( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -442,6 +453,7 @@ def household_full_data_get_with_http_info( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -466,6 +478,8 @@ def household_full_data_get_with_http_info( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -494,6 +508,7 @@ def household_full_data_get_with_http_info( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -523,6 +538,7 @@ def household_full_data_get_without_preload_content( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -547,6 +563,8 @@ def household_full_data_get_without_preload_content( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -575,6 +593,7 @@ def household_full_data_get_without_preload_content( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -599,12 +618,13 @@ def _household_full_data_get_serialize( survey_id, format, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -615,7 +635,7 @@ def _household_full_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -632,6 +652,10 @@ def _household_full_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -679,6 +703,7 @@ def household_official_use_base_data_get( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -701,6 +726,8 @@ def household_official_use_base_data_get( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -728,6 +755,7 @@ def household_official_use_base_data_get( _param = self._household_official_use_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -756,6 +784,7 @@ def household_official_use_base_data_get_with_http_info( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -778,6 +807,8 @@ def household_official_use_base_data_get_with_http_info( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -805,6 +836,7 @@ def household_official_use_base_data_get_with_http_info( _param = self._household_official_use_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -833,6 +865,7 @@ def household_official_use_base_data_get_without_preload_content( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -855,6 +888,8 @@ def household_official_use_base_data_get_without_preload_content( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -882,6 +917,7 @@ def household_official_use_base_data_get_without_preload_content( _param = self._household_official_use_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -905,12 +941,13 @@ def _household_official_use_base_data_get_serialize( self, survey_id, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -921,7 +958,7 @@ def _household_official_use_base_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -934,6 +971,10 @@ def _household_official_use_base_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -981,6 +1022,7 @@ def household_public_base_data_get( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -1003,6 +1045,8 @@ def household_public_base_data_get( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -1030,6 +1074,7 @@ def household_public_base_data_get( _param = self._household_public_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -1058,6 +1103,7 @@ def household_public_base_data_get_with_http_info( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -1080,6 +1126,8 @@ def household_public_base_data_get_with_http_info( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -1107,6 +1155,7 @@ def household_public_base_data_get_with_http_info( _param = self._household_public_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -1135,6 +1184,7 @@ def household_public_base_data_get_without_preload_content( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -1157,6 +1207,8 @@ def household_public_base_data_get_without_preload_content( :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -1184,6 +1236,7 @@ def household_public_base_data_get_without_preload_content( _param = self._household_public_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -1207,12 +1260,13 @@ def _household_public_base_data_get_serialize( self, survey_id, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1223,7 +1277,7 @@ def _household_public_base_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1236,6 +1290,10 @@ def _household_public_base_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -1299,9 +1357,9 @@ def household_surveys_get( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> HouseholdSurveyListDTOPagedResult: - """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. + """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1383,9 +1441,9 @@ def household_surveys_get_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[HouseholdSurveyListDTOPagedResult]: - """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. + """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1467,9 +1525,9 @@ def household_surveys_get_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. + """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1537,7 +1595,7 @@ def _household_surveys_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1548,7 +1606,7 @@ def _household_surveys_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1625,3 +1683,283 @@ def _household_surveys_get_serialize( ) + + + @validate_call + def xls_forms_definition_get( + self, + xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None, + env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[XlsFormDefinitionNewSchemaDTO]: + """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. + + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_xlsforms-definition_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms + :type xls_form_id: int + :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org + :type env: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._xls_forms_definition_get_serialize( + xls_form_id=xls_form_id, + env=env, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[XlsFormDefinitionNewSchemaDTO]", + '400': "BadRequestDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def xls_forms_definition_get_with_http_info( + self, + xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None, + env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[XlsFormDefinitionNewSchemaDTO]]: + """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. + + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_xlsforms-definition_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms + :type xls_form_id: int + :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org + :type env: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._xls_forms_definition_get_serialize( + xls_form_id=xls_form_id, + env=env, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[XlsFormDefinitionNewSchemaDTO]", + '400': "BadRequestDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def xls_forms_definition_get_without_preload_content( + self, + xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None, + env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. + + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_xlsforms-definition_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms + :type xls_form_id: int + :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org + :type env: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._xls_forms_definition_get_serialize( + xls_form_id=xls_form_id, + env=env, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[XlsFormDefinitionNewSchemaDTO]", + '400': "BadRequestDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _xls_forms_definition_get_serialize( + self, + xls_form_id, + env, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if xls_form_id is not None: + + _query_params.append(('xlsFormId', xls_form_id)) + + if env is not None: + + _query_params.append(('env', env)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'default' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/XlsForms/definition', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/data_bridges_client/api/market_prices_api.py b/data_bridges_client/api/market_prices_api.py index 90caf14..53a610f 100644 --- a/data_bridges_client/api/market_prices_api.py +++ b/data_bridges_client/api/market_prices_api.py @@ -5,39 +5,28 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import datetime - -from pydantic import StrictBool, StrictInt, StrictStr, field_validator +from datetime import datetime +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -85,7 +74,7 @@ def market_prices_alps_get( ) -> ViewExtendedAlpsValuePagedResult: """Returns time series values of ALPS and PEWI. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-alps_get\" Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -197,7 +186,7 @@ def market_prices_alps_get_with_http_info( ) -> ApiResponse[ViewExtendedAlpsValuePagedResult]: """Returns time series values of ALPS and PEWI. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-alps_get\" Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -309,7 +298,7 @@ def market_prices_alps_get_without_preload_content( ) -> RESTResponseType: """Returns time series values of ALPS and PEWI. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-alps_get\" Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -405,7 +394,7 @@ def _market_prices_alps_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -416,7 +405,7 @@ def _market_prices_alps_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -555,7 +544,7 @@ def market_prices_price_daily_get( ) -> ViewExtendedAggregatedPricePagedResult: """Returns a daily time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricedaily_get\" This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -667,7 +656,7 @@ def market_prices_price_daily_get_with_http_info( ) -> ApiResponse[ViewExtendedAggregatedPricePagedResult]: """Returns a daily time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricedaily_get\" This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -779,7 +768,7 @@ def market_prices_price_daily_get_without_preload_content( ) -> RESTResponseType: """Returns a daily time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricedaily_get\" This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -875,7 +864,7 @@ def _market_prices_price_daily_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -886,7 +875,7 @@ def _market_prices_price_daily_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1025,7 +1014,7 @@ def market_prices_price_monthly_get( ) -> ViewExtendedAggregatedPricePagedResult: """Returns a monthly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricemonthly_get\" This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -1137,7 +1126,7 @@ def market_prices_price_monthly_get_with_http_info( ) -> ApiResponse[ViewExtendedAggregatedPricePagedResult]: """Returns a monthly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricemonthly_get\" This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -1249,7 +1238,7 @@ def market_prices_price_monthly_get_without_preload_content( ) -> RESTResponseType: """Returns a monthly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricemonthly_get\" This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -1345,7 +1334,7 @@ def _market_prices_price_monthly_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1356,7 +1345,7 @@ def _market_prices_price_monthly_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1815,7 +1804,7 @@ def _market_prices_price_raw_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1826,7 +1815,7 @@ def _market_prices_price_raw_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1965,7 +1954,7 @@ def market_prices_price_weekly_get( ) -> PagedCommodityWeeklyAggregatedPriceListDTO: """Returns a weekly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceweekly_get\" Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -2077,7 +2066,7 @@ def market_prices_price_weekly_get_with_http_info( ) -> ApiResponse[PagedCommodityWeeklyAggregatedPriceListDTO]: """Returns a weekly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceweekly_get\" Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -2189,7 +2178,7 @@ def market_prices_price_weekly_get_without_preload_content( ) -> RESTResponseType: """Returns a weekly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceweekly_get\" Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code. :type country_code: str @@ -2285,7 +2274,7 @@ def _market_prices_price_weekly_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -2296,7 +2285,7 @@ def _market_prices_price_weekly_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/markets_api.py b/data_bridges_client/api/markets_api.py index 4d0138b..072b165 100644 --- a/data_bridges_client/api/markets_api.py +++ b/data_bridges_client/api/markets_api.py @@ -5,36 +5,26 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictBool, StrictFloat, StrictInt, StrictStr, field_validator +from pydantic import Field, StrictBool, StrictBytes, StrictFloat, StrictInt, StrictStr, field_validator from typing import List, Optional, Union - +from typing_extensions import Annotated from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -72,7 +62,7 @@ def markets_geo_json_list_get( ) -> MarketGeoJsonRoot: """Provide a list of geo referenced markets in a specific country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-geojsonlist_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: The admin code of the country :type adm0code: int @@ -144,7 +134,7 @@ def markets_geo_json_list_get_with_http_info( ) -> ApiResponse[MarketGeoJsonRoot]: """Provide a list of geo referenced markets in a specific country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-geojsonlist_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: The admin code of the country :type adm0code: int @@ -216,7 +206,7 @@ def markets_geo_json_list_get_without_preload_content( ) -> RESTResponseType: """Provide a list of geo referenced markets in a specific country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-geojsonlist_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: The admin code of the country :type adm0code: int @@ -272,7 +262,7 @@ def _markets_geo_json_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -283,7 +273,7 @@ def _markets_geo_json_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -354,7 +344,7 @@ def markets_list_get( ) -> PagedMarketListDTO: """Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -433,7 +423,7 @@ def markets_list_get_with_http_info( ) -> ApiResponse[PagedMarketListDTO]: """Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -512,7 +502,7 @@ def markets_list_get_without_preload_content( ) -> RESTResponseType: """Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param country_code: The code to identify the country. It can be a ISO-3166 Alpha 3 code or the VAM internal admin0code :type country_code: str @@ -575,7 +565,7 @@ def _markets_list_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -586,7 +576,7 @@ def _markets_list_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -666,7 +656,7 @@ def markets_markets_as_csv_get( ) -> bytearray: """Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-marketsascsv_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: The admin code of the country :type adm0code: int @@ -741,7 +731,7 @@ def markets_markets_as_csv_get_with_http_info( ) -> ApiResponse[bytearray]: """Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-marketsascsv_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: The admin code of the country :type adm0code: int @@ -816,7 +806,7 @@ def markets_markets_as_csv_get_without_preload_content( ) -> RESTResponseType: """Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-marketsascsv_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: The admin code of the country :type adm0code: int @@ -875,7 +865,7 @@ def _markets_markets_as_csv_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -886,7 +876,7 @@ def _markets_markets_as_csv_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -963,7 +953,7 @@ def markets_nearby_markets_get( ) -> List[NearbyMarketsDTO]: """Find markets near a given location by longitude and latitude within a 15Km distance - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-nearbymarkets_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0code: int @@ -1043,7 +1033,7 @@ def markets_nearby_markets_get_with_http_info( ) -> ApiResponse[List[NearbyMarketsDTO]]: """Find markets near a given location by longitude and latitude within a 15Km distance - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-nearbymarkets_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0code: int @@ -1123,7 +1113,7 @@ def markets_nearby_markets_get_without_preload_content( ) -> RESTResponseType: """Find markets near a given location by longitude and latitude within a 15Km distance - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-nearbymarkets_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0code: int @@ -1187,7 +1177,7 @@ def _markets_nearby_markets_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1198,7 +1188,7 @@ def _markets_nearby_markets_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/rpme_api.py b/data_bridges_client/api/rpme_api.py index aeca625..a3ed70a 100644 --- a/data_bridges_client/api/rpme_api.py +++ b/data_bridges_client/api/rpme_api.py @@ -5,40 +5,29 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import datetime - -from pydantic import StrictInt, StrictStr, field_validator +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -61,6 +50,7 @@ def rpme_base_data_get( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -77,12 +67,14 @@ def rpme_base_data_get( ) -> PagedSurveyResponsesDTO: """Get data that includes the core RPME fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API. :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -110,6 +102,7 @@ def rpme_base_data_get( _param = self._rpme_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -138,6 +131,7 @@ def rpme_base_data_get_with_http_info( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -154,12 +148,14 @@ def rpme_base_data_get_with_http_info( ) -> ApiResponse[PagedSurveyResponsesDTO]: """Get data that includes the core RPME fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API. :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -187,6 +183,7 @@ def rpme_base_data_get_with_http_info( _param = self._rpme_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -215,6 +212,7 @@ def rpme_base_data_get_without_preload_content( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -231,12 +229,14 @@ def rpme_base_data_get_without_preload_content( ) -> RESTResponseType: """Get data that includes the core RPME fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API. :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -264,6 +264,7 @@ def rpme_base_data_get_without_preload_content( _param = self._rpme_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -287,12 +288,13 @@ def _rpme_base_data_get_serialize( self, survey_id, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -303,7 +305,7 @@ def _rpme_base_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -316,6 +318,10 @@ def _rpme_base_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -364,6 +370,7 @@ def rpme_full_data_get( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -388,6 +395,8 @@ def rpme_full_data_get( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -416,6 +425,7 @@ def rpme_full_data_get( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -445,6 +455,7 @@ def rpme_full_data_get_with_http_info( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -469,6 +480,8 @@ def rpme_full_data_get_with_http_info( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -497,6 +510,7 @@ def rpme_full_data_get_with_http_info( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -526,6 +540,7 @@ def rpme_full_data_get_without_preload_content( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -550,6 +565,8 @@ def rpme_full_data_get_without_preload_content( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -578,6 +595,7 @@ def rpme_full_data_get_without_preload_content( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -602,12 +620,13 @@ def _rpme_full_data_get_serialize( survey_id, format, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -618,7 +637,7 @@ def _rpme_full_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -635,6 +654,10 @@ def _rpme_full_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -702,7 +725,7 @@ def rpme_output_values_get( ) -> RpmeAssessmentPagedResult: """Processed values for each variable used in the assessments - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-outputvalues_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: page number for paged results :type page: int @@ -794,7 +817,7 @@ def rpme_output_values_get_with_http_info( ) -> ApiResponse[RpmeAssessmentPagedResult]: """Processed values for each variable used in the assessments - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-outputvalues_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: page number for paged results :type page: int @@ -886,7 +909,7 @@ def rpme_output_values_get_without_preload_content( ) -> RESTResponseType: """Processed values for each variable used in the assessments - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-outputvalues_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: page number for paged results :type page: int @@ -962,7 +985,7 @@ def _rpme_output_values_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -973,7 +996,7 @@ def _rpme_output_values_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1067,7 +1090,7 @@ def rpme_surveys_get( ) -> PagedSurveyListDTO: """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1151,7 +1174,7 @@ def rpme_surveys_get_with_http_info( ) -> ApiResponse[PagedSurveyListDTO]: """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1235,7 +1258,7 @@ def rpme_surveys_get_without_preload_content( ) -> RESTResponseType: """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1303,7 +1326,7 @@ def _rpme_surveys_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1314,7 +1337,7 @@ def _rpme_surveys_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1415,7 +1438,7 @@ def rpme_variables_get( ) -> RpmeVariablePagedResult: """List of variables - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-variables_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -1487,7 +1510,7 @@ def rpme_variables_get_with_http_info( ) -> ApiResponse[RpmeVariablePagedResult]: """List of variables - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-variables_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -1559,7 +1582,7 @@ def rpme_variables_get_without_preload_content( ) -> RESTResponseType: """List of variables - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-variables_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param page: :type page: int @@ -1615,7 +1638,7 @@ def _rpme_variables_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1626,7 +1649,7 @@ def _rpme_variables_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1700,7 +1723,7 @@ def rpme_xls_forms_get( ) -> PagedXlsFormListDTO: """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1784,7 +1807,7 @@ def rpme_xls_forms_get_with_http_info( ) -> ApiResponse[PagedXlsFormListDTO]: """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1868,7 +1891,7 @@ def rpme_xls_forms_get_without_preload_content( ) -> RESTResponseType: """Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -1936,7 +1959,7 @@ def _rpme_xls_forms_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1947,7 +1970,7 @@ def _rpme_xls_forms_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api/surveys_api.py b/data_bridges_client/api/surveys_api.py index 30b33c8..7c2732b 100644 --- a/data_bridges_client/api/surveys_api.py +++ b/data_bridges_client/api/surveys_api.py @@ -5,38 +5,27 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import datetime - -from pydantic import StrictInt, StrictStr, field_validator +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -59,6 +48,7 @@ def m_fi_surveys_base_data_get( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -75,12 +65,14 @@ def m_fi_surveys_base_data_get( ) -> PagedSurveyResponsesDTO: """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API. :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -108,6 +100,7 @@ def m_fi_surveys_base_data_get( _param = self._m_fi_surveys_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -136,6 +129,7 @@ def m_fi_surveys_base_data_get_with_http_info( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -152,12 +146,14 @@ def m_fi_surveys_base_data_get_with_http_info( ) -> ApiResponse[PagedSurveyResponsesDTO]: """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API. :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -185,6 +181,7 @@ def m_fi_surveys_base_data_get_with_http_info( _param = self._m_fi_surveys_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -213,6 +210,7 @@ def m_fi_surveys_base_data_get_without_preload_content( self, survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -229,12 +227,14 @@ def m_fi_surveys_base_data_get_without_preload_content( ) -> RESTResponseType: """Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: unique identifier for the collected data, as retrieved from /Surveys API. :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -262,6 +262,7 @@ def m_fi_surveys_base_data_get_without_preload_content( _param = self._m_fi_surveys_base_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -285,12 +286,13 @@ def _m_fi_surveys_base_data_get_serialize( self, survey_id, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -301,7 +303,7 @@ def _m_fi_surveys_base_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -314,6 +316,10 @@ def _m_fi_surveys_base_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -362,6 +368,7 @@ def m_fi_surveys_full_data_get( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -386,6 +393,8 @@ def m_fi_surveys_full_data_get( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -414,6 +423,7 @@ def m_fi_surveys_full_data_get( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -443,6 +453,7 @@ def m_fi_surveys_full_data_get_with_http_info( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -467,6 +478,8 @@ def m_fi_surveys_full_data_get_with_http_info( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -495,6 +508,7 @@ def m_fi_surveys_full_data_get_with_http_info( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -524,6 +538,7 @@ def m_fi_surveys_full_data_get_without_preload_content( survey_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the collected data, as retrieved from /Surveys API.")] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="page size for paged results, default value is 20.")] = None, env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, _request_timeout: Union[ None, @@ -548,6 +563,8 @@ def m_fi_surveys_full_data_get_without_preload_content( :type format: str :param page: page number for paged results :type page: int + :param page_size: page size for paged results, default value is 20. + :type page_size: int :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org :type env: str :param _request_timeout: timeout setting for this request. If one @@ -576,6 +593,7 @@ def m_fi_surveys_full_data_get_without_preload_content( survey_id=survey_id, format=format, page=page, + page_size=page_size, env=env, _request_auth=_request_auth, _content_type=_content_type, @@ -600,12 +618,13 @@ def _m_fi_surveys_full_data_get_serialize( survey_id, format, page, + page_size, env, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -616,7 +635,7 @@ def _m_fi_surveys_full_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -633,6 +652,10 @@ def _m_fi_surveys_full_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if env is not None: _query_params.append(('env', env)) @@ -698,7 +721,7 @@ def m_fi_surveys_get( ) -> PagedSurveyListDTO: """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -782,7 +805,7 @@ def m_fi_surveys_get_with_http_info( ) -> ApiResponse[PagedSurveyListDTO]: """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -866,7 +889,7 @@ def m_fi_surveys_get_without_preload_content( ) -> RESTResponseType: """Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -934,7 +957,7 @@ def _m_fi_surveys_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -945,7 +968,7 @@ def _m_fi_surveys_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1029,6 +1052,7 @@ def m_fi_surveys_processed_data_get( self, survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Optional[StrictInt] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None, end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None, @@ -1051,12 +1075,14 @@ def m_fi_surveys_processed_data_get( ) -> PagedProcessedDataDTO: """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-processeddata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: The ID of the survey :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: + :type page_size: int :param format: Output format: [JSON|CSV] Json is the default value :type format: str :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) @@ -1096,6 +1122,7 @@ def m_fi_surveys_processed_data_get( _param = self._m_fi_surveys_processed_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, format=format, start_date=start_date, end_date=end_date, @@ -1129,6 +1156,7 @@ def m_fi_surveys_processed_data_get_with_http_info( self, survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Optional[StrictInt] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None, end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None, @@ -1151,12 +1179,14 @@ def m_fi_surveys_processed_data_get_with_http_info( ) -> ApiResponse[PagedProcessedDataDTO]: """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-processeddata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: The ID of the survey :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: + :type page_size: int :param format: Output format: [JSON|CSV] Json is the default value :type format: str :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) @@ -1196,6 +1226,7 @@ def m_fi_surveys_processed_data_get_with_http_info( _param = self._m_fi_surveys_processed_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, format=format, start_date=start_date, end_date=end_date, @@ -1229,6 +1260,7 @@ def m_fi_surveys_processed_data_get_without_preload_content( self, survey_id: Annotated[Optional[StrictInt], Field(description="The ID of the survey")] = None, page: Annotated[Optional[StrictInt], Field(description="page number for paged results")] = None, + page_size: Optional[StrictInt] = None, format: Annotated[Optional[StrictStr], Field(description="Output format: [JSON|CSV] Json is the default value")] = None, start_date: Annotated[Optional[datetime], Field(description="Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None, end_date: Annotated[Optional[datetime], Field(description="Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24)")] = None, @@ -1251,12 +1283,14 @@ def m_fi_surveys_processed_data_get_without_preload_content( ) -> RESTResponseType: """Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-processeddata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param survey_id: The ID of the survey :type survey_id: int :param page: page number for paged results :type page: int + :param page_size: + :type page_size: int :param format: Output format: [JSON|CSV] Json is the default value :type format: str :param start_date: Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) @@ -1296,6 +1330,7 @@ def m_fi_surveys_processed_data_get_without_preload_content( _param = self._m_fi_surveys_processed_data_get_serialize( survey_id=survey_id, page=page, + page_size=page_size, format=format, start_date=start_date, end_date=end_date, @@ -1324,6 +1359,7 @@ def _m_fi_surveys_processed_data_get_serialize( self, survey_id, page, + page_size, format, start_date, end_date, @@ -1335,7 +1371,7 @@ def _m_fi_surveys_processed_data_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -1346,7 +1382,7 @@ def _m_fi_surveys_processed_data_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1359,6 +1395,10 @@ def _m_fi_surveys_processed_data_get_serialize( _query_params.append(('page', page)) + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + if format is not None: _query_params.append(('format', format)) diff --git a/data_bridges_client/api/xls_forms_api.py b/data_bridges_client/api/xls_forms_api.py index 646beae..0176164 100644 --- a/data_bridges_client/api/xls_forms_api.py +++ b/data_bridges_client/api/xls_forms_api.py @@ -5,37 +5,25 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from datetime import datetime - -from pydantic import StrictInt, StrictStr, field_validator - -from typing import List, Optional +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO -from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO -from data_bridges_client.api_client import ApiClient +from data_bridges_client.api_client import ApiClient, RequestSerialized from data_bridges_client.api_response import ApiResponse from data_bridges_client.rest import RESTResponseType @@ -53,286 +41,6 @@ def __init__(self, api_client=None) -> None: self.api_client = api_client - @validate_call - def m_fi_xls_forms_definition_get( - self, - xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None, - env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> List[XlsFormDefinitionDTO]: - """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. - - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - - :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms - :type xls_form_id: int - :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org - :type env: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._m_fi_xls_forms_definition_get_serialize( - xls_form_id=xls_form_id, - env=env, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[XlsFormDefinitionDTO]", - '400': "BadRequestDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def m_fi_xls_forms_definition_get_with_http_info( - self, - xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None, - env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[List[XlsFormDefinitionDTO]]: - """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. - - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - - :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms - :type xls_form_id: int - :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org - :type env: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._m_fi_xls_forms_definition_get_serialize( - xls_form_id=xls_form_id, - env=env, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[XlsFormDefinitionDTO]", - '400': "BadRequestDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def m_fi_xls_forms_definition_get_without_preload_content( - self, - xls_form_id: Annotated[Optional[StrictInt], Field(description="unique identifier for the XLS Form, as retrieved from /XLSForms")] = None, - env: Annotated[Optional[StrictStr], Field(description="Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. - - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - - :param xls_form_id: unique identifier for the XLS Form, as retrieved from /XLSForms - :type xls_form_id: int - :param env: Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org - :type env: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._m_fi_xls_forms_definition_get_serialize( - xls_form_id=xls_form_id, - env=env, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "List[XlsFormDefinitionDTO]", - '400': "BadRequestDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _m_fi_xls_forms_definition_get_serialize( - self, - xls_form_id, - env, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> Tuple: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if xls_form_id is not None: - - _query_params.append(('xlsFormId', xls_form_id)) - - if env is not None: - - _query_params.append(('env', env)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'default' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/MFI/XlsForms/definition', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def m_fi_xls_forms_get( self, @@ -356,7 +64,7 @@ def m_fi_xls_forms_get( ) -> PagedXlsFormListDTO: """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -440,7 +148,7 @@ def m_fi_xls_forms_get_with_http_info( ) -> ApiResponse[PagedXlsFormListDTO]: """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -524,7 +232,7 @@ def m_fi_xls_forms_get_without_preload_content( ) -> RESTResponseType: """Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern :param adm0_code: code for the country as retrieved from https://api.vam.wfp.org/geodata/CountriesInRegion :type adm0_code: int @@ -592,7 +300,7 @@ def _m_fi_xls_forms_get_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None @@ -603,7 +311,7 @@ def _m_fi_xls_forms_get_serialize( _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/data_bridges_client/api_client.py b/data_bridges_client/api_client.py index 3f9c8d3..beb835a 100644 --- a/data_bridges_client/api_client.py +++ b/data_bridges_client/api_client.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -13,9 +13,9 @@ """ # noqa: E501 -import atexit import datetime from dateutil.parser import parse +from enum import Enum import json import mimetypes import os @@ -23,10 +23,11 @@ import tempfile from urllib.parse import quote -from typing import Tuple, Optional, List +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr from data_bridges_client.configuration import Configuration -from data_bridges_client.api_response import ApiResponse +from data_bridges_client.api_response import ApiResponse, T as ApiResponseT import data_bridges_client.models from data_bridges_client import rest from data_bridges_client.exceptions import ( @@ -39,6 +40,7 @@ ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] class ApiClient: """Generic API client for OpenAPI client library builds. @@ -148,7 +150,7 @@ def param_serialize( collection_formats=None, _host=None, _request_auth=None - ) -> Tuple: + ) -> RequestSerialized: """Builds the HTTP request params needed by the request. :param method: Method to call. @@ -207,7 +209,8 @@ def param_serialize( post_params, collection_formats ) - post_params.extend(self.files_parameters(files)) + if files: + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -274,23 +277,23 @@ def call_api( ) except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') raise e return response_data def response_deserialize( self, - response_data: rest.RESTResponse = None, - response_types_map=None - ) -> ApiResponse: + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. :param response_types_map: dict of response types. :return: ApiResponse """ + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: @@ -312,7 +315,10 @@ def response_deserialize( match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -332,6 +338,7 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. @@ -344,6 +351,10 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -365,7 +376,10 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = obj.to_dict() + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ return { key: self.sanitize_for_serialization(val) @@ -403,12 +417,16 @@ def __deserialize(self, data, klass): if isinstance(klass, str): if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} @@ -426,6 +444,8 @@ def __deserialize(self, data, klass): return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) @@ -436,7 +456,7 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -466,7 +486,7 @@ def parameters_to_url_query(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: URL query string (e.g. a=Hello%20World&b=123) """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -480,7 +500,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, value) for value in v) + new_params.extend((k, str(value)) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -496,33 +516,32 @@ def parameters_to_url_query(self, params, collection_formats): else: new_params.append((k, quote(str(v)))) - return "&".join(["=".join(item) for item in new_params]) + return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files=None): + def files_parameters(self, files: Dict[str, Union[str, bytes]]): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -651,10 +670,12 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.search( + m = re.search( r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -721,6 +742,24 @@ def __deserialize_datetime(self, string): ) ) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/data_bridges_client/api_response.py b/data_bridges_client/api_response.py index 2ac1ada..9bc7c11 100644 --- a/data_bridges_client/api_response.py +++ b/data_bridges_client/api_response.py @@ -1,8 +1,8 @@ """API response object.""" from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel T = TypeVar("T") @@ -12,7 +12,7 @@ class ApiResponse(BaseModel, Generic[T]): """ status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") diff --git a/data_bridges_client/configuration.py b/data_bridges_client/configuration.py index 35b3376..c0b6044 100644 --- a/data_bridges_client/configuration.py +++ b/data_bridges_client/configuration.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,8 +15,10 @@ import copy import logging +from logging import FileHandler import multiprocessing import sys +from typing import Optional import urllib3 import http.client as httplib @@ -69,7 +71,7 @@ def __init__(self, host=None, ) -> None: """Constructor """ - self._base_path = "https://api.wfp.org/vam-data-bridges/2.0.0" if host is None else host + self._base_path = "https://api.wfp.org/vam-data-bridges/4.0.0" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -117,7 +119,7 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None @@ -157,7 +159,7 @@ def __init__(self, host=None, cpu_count * 5 is used as default value to increase performance. """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ self.proxy_headers = None @@ -376,7 +378,7 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 2.0.0\n"\ + "Version of the API: 4.0.0\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) @@ -387,7 +389,7 @@ def get_host_settings(self): """ return [ { - 'url': "https://api.wfp.org/vam-data-bridges/2.0.0", + 'url': "https://api.wfp.org/vam-data-bridges/4.0.0", 'description': "No description provided", } ] diff --git a/data_bridges_client/exceptions.py b/data_bridges_client/exceptions.py index e0c83ef..2b577e4 100644 --- a/data_bridges_client/exceptions.py +++ b/data_bridges_client/exceptions.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -13,7 +13,6 @@ """ # noqa: E501 from typing import Any, Optional - from typing_extensions import Self class OpenApiException(Exception): diff --git a/data_bridges_client/models/__init__.py b/data_bridges_client/models/__init__.py index 1ba6fe8..9a58860 100644 --- a/data_bridges_client/models/__init__.py +++ b/data_bridges_client/models/__init__.py @@ -6,7 +6,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -63,4 +63,7 @@ from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice from data_bridges_client.models.xls_form_dto import XlsFormDTO -from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO +from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO +from data_bridges_client.models.xls_form_fields_dto import XlsFormFieldsDTO +from data_bridges_client.models.xls_form_list_choice_dto import XlsFormListChoiceDTO +from data_bridges_client.models.xls_form_list_choices_dto import XlsFormListChoicesDTO diff --git a/data_bridges_client/models/bad_request_dto.py b/data_bridges_client/models/bad_request_dto.py index c724104..f49678b 100644 --- a/data_bridges_client/models/bad_request_dto.py +++ b/data_bridges_client/models/bad_request_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class BadRequestDTO(BaseModel): """ @@ -35,11 +31,11 @@ class BadRequestDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["error"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BadRequestDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,11 +63,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -87,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BadRequestDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/commodity_dto.py b/data_bridges_client/models/commodity_dto.py index 318ad25..20d4f00 100644 --- a/data_bridges_client/models/commodity_dto.py +++ b/data_bridges_client/models/commodity_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,15 +19,12 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CommodityDTO(BaseModel): """ @@ -46,11 +43,11 @@ class CommodityDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "parentId", "name", "coicop2018", "supply", "categoryId", "createDate", "updateDate", "qualities", "processing"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -63,7 +60,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CommodityDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -78,11 +75,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in qualities (list) @@ -142,7 +141,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CommodityDTO from a dict""" if obj is None: return None @@ -159,8 +158,8 @@ def from_dict(cls, obj: Dict) -> Self: "categoryId": obj.get("categoryId"), "createDate": obj.get("createDate"), "updateDate": obj.get("updateDate"), - "qualities": [CommodityQualityDTO.from_dict(_item) for _item in obj.get("qualities")] if obj.get("qualities") is not None else None, - "processing": [CommodityProcessingDTO.from_dict(_item) for _item in obj.get("processing")] if obj.get("processing") is not None else None + "qualities": [CommodityQualityDTO.from_dict(_item) for _item in obj["qualities"]] if obj.get("qualities") is not None else None, + "processing": [CommodityProcessingDTO.from_dict(_item) for _item in obj["processing"]] if obj.get("processing") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/commodity_price_dto.py b/data_bridges_client/models/commodity_price_dto.py index d09a96c..8d47daf 100644 --- a/data_bridges_client/models/commodity_price_dto.py +++ b/data_bridges_client/models/commodity_price_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CommodityPriceDTO(BaseModel): """ @@ -60,11 +57,11 @@ class CommodityPriceDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "commodityId", "marketId", "priceTypeId", "commodityUnitId", "currencyId", "commodityName", "marketName", "priceTypeName", "unitName", "currencyName", "originalFrequency", "adm0Code", "countryISO3", "countryName", "commodityPrice", "commodityPriceSourceName", "commodityPriceMetadata", "commodityPriceDate", "commodityPriceObservations", "commodityPriceDateDay", "commodityPriceDateWeek", "commodityPriceDateMonth", "commodityPriceDateYear", "commodityPriceInsertDate", "commodityPriceFlag"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -77,7 +74,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CommodityPriceDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -92,11 +89,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -187,7 +186,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CommodityPriceDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/commodity_processing_dto.py b/data_bridges_client/models/commodity_processing_dto.py index 307518c..4bc74b9 100644 --- a/data_bridges_client/models/commodity_processing_dto.py +++ b/data_bridges_client/models/commodity_processing_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CommodityProcessingDTO(BaseModel): """ @@ -36,11 +32,11 @@ class CommodityProcessingDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CommodityProcessingDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,11 +64,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CommodityProcessingDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/commodity_quality_dto.py b/data_bridges_client/models/commodity_quality_dto.py index b916882..3cae050 100644 --- a/data_bridges_client/models/commodity_quality_dto.py +++ b/data_bridges_client/models/commodity_quality_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CommodityQualityDTO(BaseModel): """ @@ -36,11 +32,11 @@ class CommodityQualityDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CommodityQualityDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,11 +64,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CommodityQualityDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/currency_dto.py b/data_bridges_client/models/currency_dto.py index 4bb7b6c..4545a62 100644 --- a/data_bridges_client/models/currency_dto.py +++ b/data_bridges_client/models/currency_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CurrencyDTO(BaseModel): """ @@ -39,11 +36,11 @@ class CurrencyDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "extendedName", "createDate", "updateDate"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CurrencyDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,11 +68,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -101,7 +100,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CurrencyDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/economic_data_dto.py b/data_bridges_client/models/economic_data_dto.py index 9d35529..da03c94 100644 --- a/data_bridges_client/models/economic_data_dto.py +++ b/data_bridges_client/models/economic_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EconomicDataDTO(BaseModel): """ @@ -36,11 +33,11 @@ class EconomicDataDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["date", "value"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EconomicDataDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,11 +65,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -83,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EconomicDataDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/economic_indicator_property.py b/data_bridges_client/models/economic_indicator_property.py index 6a75368..5854afd 100644 --- a/data_bridges_client/models/economic_indicator_property.py +++ b/data_bridges_client/models/economic_indicator_property.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EconomicIndicatorProperty(BaseModel): """ @@ -42,11 +39,11 @@ class EconomicIndicatorProperty(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "frequency", "unit", "dataSource", "countryIso3", "latestValue", "latestValueDate"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EconomicIndicatorProperty from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -114,7 +113,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EconomicIndicatorProperty from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/economic_indicator_property_paged_result.py b/data_bridges_client/models/economic_indicator_property_paged_result.py index 1f6b8d5..45a3fcc 100644 --- a/data_bridges_client/models/economic_indicator_property_paged_result.py +++ b/data_bridges_client/models/economic_indicator_property_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EconomicIndicatorPropertyPagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class EconomicIndicatorPropertyPagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EconomicIndicatorPropertyPagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EconomicIndicatorPropertyPagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [EconomicIndicatorProperty.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [EconomicIndicatorProperty.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/feature.py b/data_bridges_client/models/feature.py index e13ebbe..5cfd2ab 100644 --- a/data_bridges_client/models/feature.py +++ b/data_bridges_client/models/feature.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,12 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr from data_bridges_client.models.geometry import Geometry from data_bridges_client.models.properties import Properties -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Feature(BaseModel): """ @@ -40,11 +37,11 @@ class Feature(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "id", "bbox", "geometry", "properties"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Feature from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,11 +69,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of geometry @@ -103,7 +102,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Feature from a dict""" if obj is None: return None @@ -115,8 +114,8 @@ def from_dict(cls, obj: Dict) -> Self: "type": obj.get("type"), "id": obj.get("id"), "bbox": obj.get("bbox"), - "geometry": Geometry.from_dict(obj.get("geometry")) if obj.get("geometry") is not None else None, - "properties": Properties.from_dict(obj.get("properties")) if obj.get("properties") is not None else None + "geometry": Geometry.from_dict(obj["geometry"]) if obj.get("geometry") is not None else None, + "properties": Properties.from_dict(obj["properties"]) if obj.get("properties") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/geometry.py b/data_bridges_client/models/geometry.py index b080ac8..5f958c3 100644 --- a/data_bridges_client/models/geometry.py +++ b/data_bridges_client/models/geometry.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Geometry(BaseModel): """ @@ -35,11 +32,11 @@ class Geometry(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "coordinates"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Geometry from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,11 +64,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -92,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Geometry from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/gorp_value_with_changes.py b/data_bridges_client/models/gorp_value_with_changes.py index 3cef22a..182e414 100644 --- a/data_bridges_client/models/gorp_value_with_changes.py +++ b/data_bridges_client/models/gorp_value_with_changes.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GorpValueWithChanges(BaseModel): """ @@ -43,11 +39,11 @@ class GorpValueWithChanges(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["year", "month", "regionName", "actualValue", "baselineValue", "percentageChange", "absoluteChange", "comments", "numberOfCountries"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GorpValueWithChanges from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -105,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GorpValueWithChanges from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/gorp_value_with_changes_paged_result.py b/data_bridges_client/models/gorp_value_with_changes_paged_result.py index 241721d..9a8c1ba 100644 --- a/data_bridges_client/models/gorp_value_with_changes_paged_result.py +++ b/data_bridges_client/models/gorp_value_with_changes_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GorpValueWithChangesPagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class GorpValueWithChangesPagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GorpValueWithChangesPagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GorpValueWithChangesPagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [GorpValueWithChanges.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [GorpValueWithChanges.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/household_survey_list_dto.py b/data_bridges_client/models/household_survey_list_dto.py index 22cf4af..3e07e9a 100644 --- a/data_bridges_client/models/household_survey_list_dto.py +++ b/data_bridges_client/models/household_survey_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,15 +19,12 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated from data_bridges_client.models.key_name_dto import KeyNameDto -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class HouseholdSurveyListDTO(BaseModel): """ @@ -61,11 +58,11 @@ class HouseholdSurveyListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["surveyID", "surveyStatusID", "surveyStartDate", "surveyEndDate", "surveyCreateDate", "surveyValidationReport", "surveyOriginalFilename", "xlsFormName", "baseXlsFormName", "countryName", "adm0Code", "iso3Alpha3", "userName", "approvedBy", "originalCsvFile", "baseData", "surveyAttributes", "organizations", "surveyModalityName", "surveyCategoryName", "surveySubCategoryName", "surveyPhaseName", "surveyVisibilty", "isContinuousMonitoring", "surveyName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -78,7 +75,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of HouseholdSurveyListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -93,11 +90,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in survey_attributes (list) @@ -222,7 +221,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of HouseholdSurveyListDTO from a dict""" if obj is None: return None @@ -247,8 +246,8 @@ def from_dict(cls, obj: Dict) -> Self: "approvedBy": obj.get("approvedBy"), "originalCsvFile": obj.get("originalCsvFile"), "baseData": obj.get("baseData"), - "surveyAttributes": [KeyNameDto.from_dict(_item) for _item in obj.get("surveyAttributes")] if obj.get("surveyAttributes") is not None else None, - "organizations": [KeyNameDto.from_dict(_item) for _item in obj.get("organizations")] if obj.get("organizations") is not None else None, + "surveyAttributes": [KeyNameDto.from_dict(_item) for _item in obj["surveyAttributes"]] if obj.get("surveyAttributes") is not None else None, + "organizations": [KeyNameDto.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, "surveyModalityName": obj.get("surveyModalityName"), "surveyCategoryName": obj.get("surveyCategoryName"), "surveySubCategoryName": obj.get("surveySubCategoryName"), diff --git a/data_bridges_client/models/household_survey_list_dto_paged_result.py b/data_bridges_client/models/household_survey_list_dto_paged_result.py index 985643e..3130bc2 100644 --- a/data_bridges_client/models/household_survey_list_dto_paged_result.py +++ b/data_bridges_client/models/household_survey_list_dto_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class HouseholdSurveyListDTOPagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class HouseholdSurveyListDTOPagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of HouseholdSurveyListDTOPagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of HouseholdSurveyListDTOPagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [HouseholdSurveyListDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [HouseholdSurveyListDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/ipc_value.py b/data_bridges_client/models/ipc_value.py index 76ab8be..1d4d4d0 100644 --- a/data_bridges_client/models/ipc_value.py +++ b/data_bridges_client/models/ipc_value.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,14 +19,11 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class IpcValue(BaseModel): """ @@ -55,11 +52,11 @@ class IpcValue(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["ipcId", "ipcYear", "iso3Alpha3", "ipcIsLatestValue", "ipcCountryName", "ipcAreaName", "ipcPhase3Population", "ipcPhase4Population", "ipcPhase5Population", "ipcPhase3Percentage", "ipcPhase4Percentage", "ipcPhase5Percentage", "ipcAnalysedPopulation", "ipcAnalysedPercentage", "ipcAnalysisComment", "ipcDataType", "ipcDataSource", "ipcReferencePeriod", "ipcCreateDate", "ipcUpdateDate"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +69,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IpcValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,11 +84,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -182,7 +181,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IpcValue from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/ipc_value_paged_result.py b/data_bridges_client/models/ipc_value_paged_result.py index a5d5003..c87a1a1 100644 --- a/data_bridges_client/models/ipc_value_paged_result.py +++ b/data_bridges_client/models/ipc_value_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.ipc_value import IpcValue -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class IpcValuePagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class IpcValuePagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of IpcValuePagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of IpcValuePagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [IpcValue.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [IpcValue.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/key_name_dto.py b/data_bridges_client/models/key_name_dto.py index ac45da7..4b838d4 100644 --- a/data_bridges_client/models/key_name_dto.py +++ b/data_bridges_client/models/key_name_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class KeyNameDto(BaseModel): """ @@ -35,11 +32,11 @@ class KeyNameDto(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of KeyNameDto from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,11 +64,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -87,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of KeyNameDto from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/market_dto.py b/data_bridges_client/models/market_dto.py index a2ffc46..316d89e 100644 --- a/data_bridges_client/models/market_dto.py +++ b/data_bridges_client/models/market_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class MarketDTO(BaseModel): """ @@ -43,11 +39,11 @@ class MarketDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["marketId", "marketName", "marketLocalName", "marketLatitude", "marketLongitude", "admin1Name", "admin1Code", "admin2Name", "admin2Code"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MarketDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -130,7 +128,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MarketDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/market_geo_json_root.py b/data_bridges_client/models/market_geo_json_root.py index 63a7a5f..d9af76c 100644 --- a/data_bridges_client/models/market_geo_json_root.py +++ b/data_bridges_client/models/market_geo_json_root.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr from data_bridges_client.models.feature import Feature -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class MarketGeoJsonRoot(BaseModel): """ @@ -37,11 +34,11 @@ class MarketGeoJsonRoot(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "features", "bbox"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MarketGeoJsonRoot from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in features (list) @@ -106,7 +105,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MarketGeoJsonRoot from a dict""" if obj is None: return None @@ -116,7 +115,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "type": obj.get("type"), - "features": [Feature.from_dict(_item) for _item in obj.get("features")] if obj.get("features") is not None else None, + "features": [Feature.from_dict(_item) for _item in obj["features"]] if obj.get("features") is not None else None, "bbox": obj.get("bbox") }) # store additional fields in additional_properties diff --git a/data_bridges_client/models/mfi_processed_data_dto.py b/data_bridges_client/models/mfi_processed_data_dto.py index 03f1545..f0df58a 100644 --- a/data_bridges_client/models/mfi_processed_data_dto.py +++ b/data_bridges_client/models/mfi_processed_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class MFIProcessedDataDTO(BaseModel): """ @@ -60,11 +57,11 @@ class MFIProcessedDataDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["surveyID", "startDate", "endDate", "marketID", "marketName", "marketLatitude", "marketLongitude", "regionalBureauID", "regionalBureauName", "adm0Code", "adm0Name", "adm1Code", "adm1Name", "adm2Code", "adm2Name", "levelID", "levelName", "dimensionID", "dimensionName", "variableID", "variableName", "variableLabel", "outputValue", "tradersSampleSize", "baseXlsFormID", "baseXlsFormName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -77,7 +74,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of MFIProcessedDataDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -92,11 +89,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -187,7 +186,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of MFIProcessedDataDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/nearby_markets_dto.py b/data_bridges_client/models/nearby_markets_dto.py index 351e0d3..f3c97c2 100644 --- a/data_bridges_client/models/nearby_markets_dto.py +++ b/data_bridges_client/models/nearby_markets_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class NearbyMarketsDTO(BaseModel): """ @@ -37,11 +33,11 @@ class NearbyMarketsDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["marketId", "marketName", "distance"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of NearbyMarketsDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,11 +65,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -89,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of NearbyMarketsDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/paged_commodity_list_dto.py b/data_bridges_client/models/paged_commodity_list_dto.py index aed067e..d2bc549 100644 --- a/data_bridges_client/models/paged_commodity_list_dto.py +++ b/data_bridges_client/models/paged_commodity_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.commodity_dto import CommodityDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedCommodityListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedCommodityListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedCommodityListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedCommodityListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [CommodityDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [CommodityDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_commodity_price_list_dto.py b/data_bridges_client/models/paged_commodity_price_list_dto.py index 857eaac..94ac0e5 100644 --- a/data_bridges_client/models/paged_commodity_price_list_dto.py +++ b/data_bridges_client/models/paged_commodity_price_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedCommodityPriceListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedCommodityPriceListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedCommodityPriceListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedCommodityPriceListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [CommodityPriceDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [CommodityPriceDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py b/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py index eb22b06..42d590c 100644 --- a/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py +++ b/data_bridges_client/models/paged_commodity_weekly_aggregated_price_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedCommodityWeeklyAggregatedPriceListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedCommodityWeeklyAggregatedPriceListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [WeeklyAggregatedPrice.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [WeeklyAggregatedPrice.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_currency_list_dto.py b/data_bridges_client/models/paged_currency_list_dto.py index cf9bfdf..0783e85 100644 --- a/data_bridges_client/models/paged_currency_list_dto.py +++ b/data_bridges_client/models/paged_currency_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.currency_dto import CurrencyDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedCurrencyListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedCurrencyListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedCurrencyListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedCurrencyListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [CurrencyDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [CurrencyDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_economic_data_dto.py b/data_bridges_client/models/paged_economic_data_dto.py index 163dbdc..aa019f0 100644 --- a/data_bridges_client/models/paged_economic_data_dto.py +++ b/data_bridges_client/models/paged_economic_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from data_bridges_client.models.economic_data_dto import EconomicDataDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedEconomicDataDTO(BaseModel): """ @@ -41,11 +37,11 @@ class PagedEconomicDataDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "unit", "frequency", "dataSource", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedEconomicDataDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,11 +69,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -115,7 +113,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedEconomicDataDTO from a dict""" if obj is None: return None @@ -129,7 +127,7 @@ def from_dict(cls, obj: Dict) -> Self: "unit": obj.get("unit"), "frequency": obj.get("frequency"), "dataSource": obj.get("dataSource"), - "items": [EconomicDataDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [EconomicDataDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_market_list_dto.py b/data_bridges_client/models/paged_market_list_dto.py index f2e58e1..48f0eee 100644 --- a/data_bridges_client/models/paged_market_list_dto.py +++ b/data_bridges_client/models/paged_market_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.market_dto import MarketDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedMarketListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedMarketListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedMarketListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedMarketListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [MarketDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [MarketDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_processed_data_dto.py b/data_bridges_client/models/paged_processed_data_dto.py index 82bd332..8fb8850 100644 --- a/data_bridges_client/models/paged_processed_data_dto.py +++ b/data_bridges_client/models/paged_processed_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedProcessedDataDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedProcessedDataDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedProcessedDataDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedProcessedDataDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [MFIProcessedDataDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [MFIProcessedDataDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_survey_list_dto.py b/data_bridges_client/models/paged_survey_list_dto.py index f73b75c..587e349 100644 --- a/data_bridges_client/models/paged_survey_list_dto.py +++ b/data_bridges_client/models/paged_survey_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.survey_list_dto import SurveyListDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedSurveyListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedSurveyListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedSurveyListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedSurveyListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [SurveyListDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [SurveyListDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/paged_survey_responses_dto.py b/data_bridges_client/models/paged_survey_responses_dto.py index 7e73e4f..d757b9e 100644 --- a/data_bridges_client/models/paged_survey_responses_dto.py +++ b/data_bridges_client/models/paged_survey_responses_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedSurveyResponsesDTO(BaseModel): """ @@ -37,11 +33,11 @@ class PagedSurveyResponsesDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedSurveyResponsesDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,11 +65,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -89,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedSurveyResponsesDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/paged_xls_form_list_dto.py b/data_bridges_client/models/paged_xls_form_list_dto.py index 64c98c2..da3720e 100644 --- a/data_bridges_client/models/paged_xls_form_list_dto.py +++ b/data_bridges_client/models/paged_xls_form_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.xls_form_dto import XlsFormDTO -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PagedXlsFormListDTO(BaseModel): """ @@ -38,11 +34,11 @@ class PagedXlsFormListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["totalItems", "page", "items"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PagedXlsFormListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +66,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -97,7 +95,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PagedXlsFormListDTO from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "totalItems": obj.get("totalItems"), "page": obj.get("page"), - "items": [XlsFormDTO.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + "items": [XlsFormDTO.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/problem_details.py b/data_bridges_client/models/problem_details.py index 6d83035..2ce03e5 100644 --- a/data_bridges_client/models/problem_details.py +++ b/data_bridges_client/models/problem_details.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ProblemDetails(BaseModel): """ @@ -38,11 +35,11 @@ class ProblemDetails(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["type", "title", "status", "detail", "instance"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ProblemDetails from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,11 +67,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -110,7 +109,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ProblemDetails from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/properties.py b/data_bridges_client/models/properties.py index af468a6..ccc6dcd 100644 --- a/data_bridges_client/models/properties.py +++ b/data_bridges_client/models/properties.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Properties(BaseModel): """ @@ -34,11 +31,11 @@ class Properties(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Properties from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,11 +63,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -86,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Properties from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/rpme_assessment.py b/data_bridges_client/models/rpme_assessment.py index e3afe90..b971c12 100644 --- a/data_bridges_client/models/rpme_assessment.py +++ b/data_bridges_client/models/rpme_assessment.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,14 +19,11 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field from data_bridges_client.models.rpme_output_values import RpmeOutputValues -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RpmeAssessment(BaseModel): """ @@ -55,11 +52,11 @@ class RpmeAssessment(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["surveyId", "assessmentDate", "shopId", "adm0Code", "adm1Code", "adm2Code", "adm0CodeDOTS", "adm1CodeDOTS", "adm2CodeDOTS", "marketId", "shLatitude", "shLongitude", "nbBeneficiariesInterviewed", "priceScoreTbu", "priceScoreTbd", "beneficiariesScoreTbu", "trdName", "sevCntrDev", "benSevCntrDev", "outputValues"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +69,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RpmeAssessment from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,11 +84,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in output_values (list) @@ -164,7 +163,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RpmeAssessment from a dict""" if obj is None: return None @@ -192,7 +191,7 @@ def from_dict(cls, obj: Dict) -> Self: "trdName": obj.get("trdName"), "sevCntrDev": obj.get("sevCntrDev"), "benSevCntrDev": obj.get("benSevCntrDev"), - "outputValues": [RpmeOutputValues.from_dict(_item) for _item in obj.get("outputValues")] if obj.get("outputValues") is not None else None + "outputValues": [RpmeOutputValues.from_dict(_item) for _item in obj["outputValues"]] if obj.get("outputValues") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/rpme_assessment_paged_result.py b/data_bridges_client/models/rpme_assessment_paged_result.py index 94da6ec..d9121bb 100644 --- a/data_bridges_client/models/rpme_assessment_paged_result.py +++ b/data_bridges_client/models/rpme_assessment_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.rpme_assessment import RpmeAssessment -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RpmeAssessmentPagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class RpmeAssessmentPagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RpmeAssessmentPagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RpmeAssessmentPagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [RpmeAssessment.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [RpmeAssessment.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/rpme_output_values.py b/data_bridges_client/models/rpme_output_values.py index f4b864b..98c87aa 100644 --- a/data_bridges_client/models/rpme_output_values.py +++ b/data_bridges_client/models/rpme_output_values.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RpmeOutputValues(BaseModel): """ @@ -36,11 +32,11 @@ class RpmeOutputValues(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["variableId", "outputValue"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RpmeOutputValues from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,11 +64,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RpmeOutputValues from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/rpme_variable.py b/data_bridges_client/models/rpme_variable.py index 4601cb0..7705b29 100644 --- a/data_bridges_client/models/rpme_variable.py +++ b/data_bridges_client/models/rpme_variable.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RpmeVariable(BaseModel): """ @@ -43,11 +39,11 @@ class RpmeVariable(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["variableId", "variableName", "variableDescription", "dimensionId", "dimensionName", "levelId", "levelName", "surveyModeId", "surveyModeName"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RpmeVariable from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -115,7 +113,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RpmeVariable from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/rpme_variable_paged_result.py b/data_bridges_client/models/rpme_variable_paged_result.py index 8faf1b3..2b32b32 100644 --- a/data_bridges_client/models/rpme_variable_paged_result.py +++ b/data_bridges_client/models/rpme_variable_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.rpme_variable import RpmeVariable -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RpmeVariablePagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class RpmeVariablePagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RpmeVariablePagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RpmeVariablePagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [RpmeVariable.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [RpmeVariable.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/survey_list_dto.py b/data_bridges_client/models/survey_list_dto.py index e2c66c2..968e4e5 100644 --- a/data_bridges_client/models/survey_list_dto.py +++ b/data_bridges_client/models/survey_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,14 +19,11 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SurveyListDTO(BaseModel): """ @@ -50,11 +47,11 @@ class SurveyListDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["surveyID", "surveyStatusID", "surveyStartDate", "surveyEndDate", "surveyCreateDate", "surveyValidationReport", "surveyOriginalFilename", "xlsFormName", "baseXlsFormName", "countryName", "adm0Code", "iso3Alpha3", "userName", "originalCsvFile", "baseData"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -67,7 +64,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SurveyListDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,11 +79,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -152,7 +151,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SurveyListDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/usd_indirect_quotation.py b/data_bridges_client/models/usd_indirect_quotation.py index ce62e29..0672d33 100644 --- a/data_bridges_client/models/usd_indirect_quotation.py +++ b/data_bridges_client/models/usd_indirect_quotation.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UsdIndirectQuotation(BaseModel): """ @@ -42,11 +39,11 @@ class UsdIndirectQuotation(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["id", "name", "adm0Code", "countryISO3", "isOfficial", "frequency", "value", "date"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UsdIndirectQuotation from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,11 +71,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -109,7 +108,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UsdIndirectQuotation from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/usd_indirect_quotation_paged_result.py b/data_bridges_client/models/usd_indirect_quotation_paged_result.py index 779861b..e2ecbc1 100644 --- a/data_bridges_client/models/usd_indirect_quotation_paged_result.py +++ b/data_bridges_client/models/usd_indirect_quotation_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UsdIndirectQuotationPagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class UsdIndirectQuotationPagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UsdIndirectQuotationPagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UsdIndirectQuotationPagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [UsdIndirectQuotation.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [UsdIndirectQuotation.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/view_extended_aggregated_price.py b/data_bridges_client/models/view_extended_aggregated_price.py index de8b77c..e690dcc 100644 --- a/data_bridges_client/models/view_extended_aggregated_price.py +++ b/data_bridges_client/models/view_extended_aggregated_price.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ViewExtendedAggregatedPrice(BaseModel): """ @@ -56,11 +53,11 @@ class ViewExtendedAggregatedPrice(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["commodityID", "marketID", "priceTypeID", "commodityUnitID", "currencyID", "adm0Code", "commodityDateWeek", "commodityDateMonth", "commodityDateYear", "commodityPriceDate", "commodityName", "marketName", "priceTypeName", "commodityUnitName", "currencyName", "countryISO3", "countryName", "commodityPriceSourceName", "originalFrequency", "commodityPrice", "commodityPriceObservations", "commodityPriceFlag"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -73,7 +70,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ViewExtendedAggregatedPrice from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -88,11 +85,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -188,7 +187,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ViewExtendedAggregatedPrice from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/view_extended_aggregated_price_paged_result.py b/data_bridges_client/models/view_extended_aggregated_price_paged_result.py index fef2d40..6efbdb1 100644 --- a/data_bridges_client/models/view_extended_aggregated_price_paged_result.py +++ b/data_bridges_client/models/view_extended_aggregated_price_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ViewExtendedAggregatedPricePagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class ViewExtendedAggregatedPricePagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ViewExtendedAggregatedPricePagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ViewExtendedAggregatedPricePagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [ViewExtendedAggregatedPrice.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [ViewExtendedAggregatedPrice.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/view_extended_alps_value.py b/data_bridges_client/models/view_extended_alps_value.py index 7561d26..23e59a6 100644 --- a/data_bridges_client/models/view_extended_alps_value.py +++ b/data_bridges_client/models/view_extended_alps_value.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ViewExtendedAlpsValue(BaseModel): """ @@ -53,11 +50,11 @@ class ViewExtendedAlpsValue(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["commodityID", "marketID", "priceTypeID", "commodityUnitID", "currencyID", "adm0Code", "countryName", "commodityPriceDateYear", "commodityPriceDateMonth", "commodityPriceDateWeek", "commodityPriceDate", "commodityName", "marketName", "priceTypeName", "commodityUnitName", "currencyName", "analysisValueEstimatedPrice", "analysisValuePewiValue", "analysisValuePriceFlag"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -70,7 +67,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ViewExtendedAlpsValue from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -85,11 +82,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -155,7 +154,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ViewExtendedAlpsValue from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/view_extended_alps_value_paged_result.py b/data_bridges_client/models/view_extended_alps_value_paged_result.py index eeac6d7..2e95a6b 100644 --- a/data_bridges_client/models/view_extended_alps_value_paged_result.py +++ b/data_bridges_client/models/view_extended_alps_value_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -from pydantic import Field from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ViewExtendedAlpsValuePagedResult(BaseModel): """ @@ -38,11 +34,11 @@ class ViewExtendedAlpsValuePagedResult(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["items", "page", "totalItems"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ViewExtendedAlpsValuePagedResult from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +67,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "items", + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "items", - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in items (list) @@ -99,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ViewExtendedAlpsValuePagedResult from a dict""" if obj is None: return None @@ -108,7 +106,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "items": [ViewExtendedAlpsValue.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "items": [ViewExtendedAlpsValue.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, "page": obj.get("page"), "totalItems": obj.get("totalItems") }) diff --git a/data_bridges_client/models/weekly_aggregated_price.py b/data_bridges_client/models/weekly_aggregated_price.py index fdcd88b..825d66e 100644 --- a/data_bridges_client/models/weekly_aggregated_price.py +++ b/data_bridges_client/models/weekly_aggregated_price.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictFloat, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WeeklyAggregatedPrice(BaseModel): """ @@ -55,11 +52,11 @@ class WeeklyAggregatedPrice(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["commodityId", "marketId", "priceTypeId", "commodityUnitId", "currencyId", "commodityName", "marketName", "priceTypeName", "commodityUnitName", "currencyName", "adm0Code", "countryISO3", "countryName", "commodityPrice", "originalFrequency", "commodityPriceSourceName", "commodityPriceObservations", "commodityDateMonth", "commodityDateYear", "commodityPriceDate", "commodityPriceFlag"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +69,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WeeklyAggregatedPrice from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -87,11 +84,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -157,7 +156,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WeeklyAggregatedPrice from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/xls_form_definition_new_schema_dto.py b/data_bridges_client/models/xls_form_definition_new_schema_dto.py new file mode 100644 index 0000000..c09f8c9 --- /dev/null +++ b/data_bridges_client/models/xls_form_definition_new_schema_dto.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + VAM-Data-Bridges + + API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + The version of the OpenAPI document: 4.0.0 + Contact: wfp.economicanalysis@wfp.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from data_bridges_client.models.xls_form_fields_dto import XlsFormFieldsDTO +from typing import Optional, Set +from typing_extensions import Self + +class XlsFormDefinitionNewSchemaDTO(BaseModel): + """ + XlsFormDefinitionNewSchemaDTO + """ # noqa: E501 + form_name: Optional[StrictStr] = Field(default=None, alias="formName") + form_description: Optional[StrictStr] = Field(default=None, alias="formDescription") + form_type: Optional[StrictStr] = Field(default=None, alias="formType") + adm0_code: Optional[StrictInt] = Field(default=None, alias="adm0Code") + base_schema_id: Optional[StrictInt] = Field(default=None, alias="baseSchemaId") + category: Optional[StrictStr] = None + type: Optional[StrictStr] = None + fields: Optional[List[XlsFormFieldsDTO]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["formName", "formDescription", "formType", "adm0Code", "baseSchemaId", "category", "type", "fields"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of XlsFormDefinitionNewSchemaDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item in self.fields: + if _item: + _items.append(_item.to_dict()) + _dict['fields'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if form_name (nullable) is None + # and model_fields_set contains the field + if self.form_name is None and "form_name" in self.model_fields_set: + _dict['formName'] = None + + # set to None if form_description (nullable) is None + # and model_fields_set contains the field + if self.form_description is None and "form_description" in self.model_fields_set: + _dict['formDescription'] = None + + # set to None if form_type (nullable) is None + # and model_fields_set contains the field + if self.form_type is None and "form_type" in self.model_fields_set: + _dict['formType'] = None + + # set to None if adm0_code (nullable) is None + # and model_fields_set contains the field + if self.adm0_code is None and "adm0_code" in self.model_fields_set: + _dict['adm0Code'] = None + + # set to None if base_schema_id (nullable) is None + # and model_fields_set contains the field + if self.base_schema_id is None and "base_schema_id" in self.model_fields_set: + _dict['baseSchemaId'] = None + + # set to None if category (nullable) is None + # and model_fields_set contains the field + if self.category is None and "category" in self.model_fields_set: + _dict['category'] = None + + # set to None if type (nullable) is None + # and model_fields_set contains the field + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None + + # set to None if fields (nullable) is None + # and model_fields_set contains the field + if self.fields is None and "fields" in self.model_fields_set: + _dict['fields'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of XlsFormDefinitionNewSchemaDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "formName": obj.get("formName"), + "formDescription": obj.get("formDescription"), + "formType": obj.get("formType"), + "adm0Code": obj.get("adm0Code"), + "baseSchemaId": obj.get("baseSchemaId"), + "category": obj.get("category"), + "type": obj.get("type"), + "fields": [XlsFormFieldsDTO.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/data_bridges_client/models/xls_form_dto.py b/data_bridges_client/models/xls_form_dto.py index a19cd53..8790df4 100644 --- a/data_bridges_client/models/xls_form_dto.py +++ b/data_bridges_client/models/xls_form_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,13 +19,10 @@ import json from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class XlsFormDTO(BaseModel): """ @@ -41,11 +38,11 @@ class XlsFormDTO(BaseModel): additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["xlsFormID", "xlsFormName", "xlsFormCreateDate", "userName", "xlsFormSourceFile", "xlsFormIsBaseSchema", "adm0Code"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of XlsFormDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,11 +70,13 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) # puts key-value pairs in additional_properties in the top level @@ -108,7 +107,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of XlsFormDTO from a dict""" if obj is None: return None diff --git a/data_bridges_client/models/xls_form_definition_dto.py b/data_bridges_client/models/xls_form_fields_dto.py similarity index 53% rename from data_bridges_client/models/xls_form_definition_dto.py rename to data_bridges_client/models/xls_form_fields_dto.py index a6bccd9..f79c4ef 100644 --- a/data_bridges_client/models/xls_form_definition_dto.py +++ b/data_bridges_client/models/xls_form_fields_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -18,32 +18,28 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class XlsFormDefinitionDTO(BaseModel): +from data_bridges_client.models.xls_form_list_choices_dto import XlsFormListChoicesDTO +from typing import Optional, Set +from typing_extensions import Self + +class XlsFormFieldsDTO(BaseModel): """ - XlsFormDefinitionDTO + XlsFormFieldsDTO """ # noqa: E501 - xls_form_field_name: Optional[StrictStr] = Field(default=None, alias="xlsFormFieldName") - xls_form_field_label: Optional[StrictStr] = Field(default=None, alias="xlsFormFieldLabel") - xls_form_field_row: Optional[StrictInt] = Field(default=None, alias="xlsFormFieldRow") - xls_form_field_type: Optional[StrictStr] = Field(default=None, alias="xlsFormFieldType") - xls_form_list_id: Optional[StrictInt] = Field(default=None, alias="xlsFormListId") + name: Optional[StrictStr] = None + label: Optional[StrictStr] = None + type: Optional[StrictStr] = None + choice_list: Optional[XlsFormListChoicesDTO] = Field(default=None, alias="choiceList") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["xlsFormFieldName", "xlsFormFieldLabel", "xlsFormFieldRow", "xlsFormFieldType", "xlsFormListId"] + __properties: ClassVar[List[str]] = ["name", "label", "type", "choiceList"] - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "protected_namespaces": (), - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,8 +52,8 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of XlsFormDefinitionDTO from a JSON string""" + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of XlsFormFieldsDTO from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,43 +67,43 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "additional_properties", - }, + exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of choice_list + if self.choice_list: + _dict['choiceList'] = self.choice_list.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if xls_form_field_name (nullable) is None - # and model_fields_set contains the field - if self.xls_form_field_name is None and "xls_form_field_name" in self.model_fields_set: - _dict['xlsFormFieldName'] = None - - # set to None if xls_form_field_label (nullable) is None + # set to None if name (nullable) is None # and model_fields_set contains the field - if self.xls_form_field_label is None and "xls_form_field_label" in self.model_fields_set: - _dict['xlsFormFieldLabel'] = None + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None - # set to None if xls_form_field_type (nullable) is None + # set to None if label (nullable) is None # and model_fields_set contains the field - if self.xls_form_field_type is None and "xls_form_field_type" in self.model_fields_set: - _dict['xlsFormFieldType'] = None + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None - # set to None if xls_form_list_id (nullable) is None + # set to None if type (nullable) is None # and model_fields_set contains the field - if self.xls_form_list_id is None and "xls_form_list_id" in self.model_fields_set: - _dict['xlsFormListId'] = None + if self.type is None and "type" in self.model_fields_set: + _dict['type'] = None return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of XlsFormDefinitionDTO from a dict""" + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of XlsFormFieldsDTO from a dict""" if obj is None: return None @@ -115,11 +111,10 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "xlsFormFieldName": obj.get("xlsFormFieldName"), - "xlsFormFieldLabel": obj.get("xlsFormFieldLabel"), - "xlsFormFieldRow": obj.get("xlsFormFieldRow"), - "xlsFormFieldType": obj.get("xlsFormFieldType"), - "xlsFormListId": obj.get("xlsFormListId") + "name": obj.get("name"), + "label": obj.get("label"), + "type": obj.get("type"), + "choiceList": XlsFormListChoicesDTO.from_dict(obj["choiceList"]) if obj.get("choiceList") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/data_bridges_client/models/xls_form_list_choice_dto.py b/data_bridges_client/models/xls_form_list_choice_dto.py new file mode 100644 index 0000000..ccbd0a7 --- /dev/null +++ b/data_bridges_client/models/xls_form_list_choice_dto.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + VAM-Data-Bridges + + API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + The version of the OpenAPI document: 4.0.0 + Contact: wfp.economicanalysis@wfp.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class XlsFormListChoiceDTO(BaseModel): + """ + XlsFormListChoiceDTO + """ # noqa: E501 + name: Optional[StrictStr] = None + label: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "label"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of XlsFormListChoiceDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if label (nullable) is None + # and model_fields_set contains the field + if self.label is None and "label" in self.model_fields_set: + _dict['label'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of XlsFormListChoiceDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "label": obj.get("label") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/data_bridges_client/models/xls_form_list_choices_dto.py b/data_bridges_client/models/xls_form_list_choices_dto.py new file mode 100644 index 0000000..86dc5d3 --- /dev/null +++ b/data_bridges_client/models/xls_form_list_choices_dto.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + VAM-Data-Bridges + + API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + The version of the OpenAPI document: 4.0.0 + Contact: wfp.economicanalysis@wfp.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from data_bridges_client.models.xls_form_list_choice_dto import XlsFormListChoiceDTO +from typing import Optional, Set +from typing_extensions import Self + +class XlsFormListChoicesDTO(BaseModel): + """ + XlsFormListChoicesDTO + """ # noqa: E501 + name: Optional[StrictStr] = None + choices: Optional[List[XlsFormListChoiceDTO]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "choices"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of XlsFormListChoicesDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in choices (list) + _items = [] + if self.choices: + for _item in self.choices: + if _item: + _items.append(_item.to_dict()) + _dict['choices'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if choices (nullable) is None + # and model_fields_set contains the field + if self.choices is None and "choices" in self.model_fields_set: + _dict['choices'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of XlsFormListChoicesDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "choices": [XlsFormListChoiceDTO.from_dict(_item) for _item in obj["choices"]] if obj.get("choices") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/data_bridges_client/rest.py b/data_bridges_client/rest.py index 4fecf74..ca9744b 100644 --- a/data_bridges_client/rest.py +++ b/data_bridges_client/rest.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -72,56 +72,45 @@ def __init__(self, configuration) -> None: else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( + pool_args['assert_hostname'] = ( configuration.assert_hostname ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name + pool_args['server_hostname'] = configuration.tls_server_name if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options if configuration.connection_pool_maxsize is not None: - addition_pool_args['maxsize'] = configuration.connection_pool_maxsize + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager + self.pool_manager: urllib3.PoolManager + if configuration.proxy: if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager - self.pool_manager = SOCKSProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - headers=configuration.proxy_headers, - **addition_pool_args - ) + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) else: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) + self.pool_manager = urllib3.PoolManager(**pool_args) def request( self, @@ -214,6 +203,8 @@ def request( # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url, @@ -224,14 +215,13 @@ def request( preload_content=False ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( method, url, - body=request_body, + body=body, timeout=timeout, headers=headers, preload_content=False diff --git a/docs/BadRequestDTO.md b/docs/BadRequestDTO.md index 8caf2b0..a61ef1d 100644 --- a/docs/BadRequestDTO.md +++ b/docs/BadRequestDTO.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of BadRequestDTO from a JSON string bad_request_dto_instance = BadRequestDTO.from_json(json) # print the JSON string representation of the object -print BadRequestDTO.to_json() +print(BadRequestDTO.to_json()) # convert the object into a dict bad_request_dto_dict = bad_request_dto_instance.to_dict() # create an instance of BadRequestDTO from a dict -bad_request_dto_form_dict = bad_request_dto.from_dict(bad_request_dto_dict) +bad_request_dto_from_dict = BadRequestDTO.from_dict(bad_request_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommoditiesApi.md b/docs/CommoditiesApi.md index cbe3b1d..12b6cf7 100644 --- a/docs/CommoditiesApi.md +++ b/docs/CommoditiesApi.md @@ -1,6 +1,6 @@ # data_bridges_client.CommoditiesApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,24 +13,22 @@ Method | HTTP request | Description Provides the list of categories. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-categories-list_get\" Categories are matched with high level WFP commodity classification at level 1. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -101,24 +99,22 @@ Name | Type | Description | Notes Provide the detailed list of the commodities available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodities-list_get\" COICOP 2018 codes are returned to hierarchically matching categories based on [UN-Statistical Division codes](https://unstats.un.org/unsd/classifications/Econ/). No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/CommodityDTO.md b/docs/CommodityDTO.md index e78b91d..fe49bae 100644 --- a/docs/CommodityDTO.md +++ b/docs/CommodityDTO.md @@ -26,12 +26,12 @@ json = "{}" # create an instance of CommodityDTO from a JSON string commodity_dto_instance = CommodityDTO.from_json(json) # print the JSON string representation of the object -print CommodityDTO.to_json() +print(CommodityDTO.to_json()) # convert the object into a dict commodity_dto_dict = commodity_dto_instance.to_dict() # create an instance of CommodityDTO from a dict -commodity_dto_form_dict = commodity_dto.from_dict(commodity_dto_dict) +commodity_dto_from_dict = CommodityDTO.from_dict(commodity_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommodityPriceDTO.md b/docs/CommodityPriceDTO.md index 2c9ead6..995c793 100644 --- a/docs/CommodityPriceDTO.md +++ b/docs/CommodityPriceDTO.md @@ -42,12 +42,12 @@ json = "{}" # create an instance of CommodityPriceDTO from a JSON string commodity_price_dto_instance = CommodityPriceDTO.from_json(json) # print the JSON string representation of the object -print CommodityPriceDTO.to_json() +print(CommodityPriceDTO.to_json()) # convert the object into a dict commodity_price_dto_dict = commodity_price_dto_instance.to_dict() # create an instance of CommodityPriceDTO from a dict -commodity_price_dto_form_dict = commodity_price_dto.from_dict(commodity_price_dto_dict) +commodity_price_dto_from_dict = CommodityPriceDTO.from_dict(commodity_price_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommodityProcessingDTO.md b/docs/CommodityProcessingDTO.md index c2c8495..91ea47b 100644 --- a/docs/CommodityProcessingDTO.md +++ b/docs/CommodityProcessingDTO.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of CommodityProcessingDTO from a JSON string commodity_processing_dto_instance = CommodityProcessingDTO.from_json(json) # print the JSON string representation of the object -print CommodityProcessingDTO.to_json() +print(CommodityProcessingDTO.to_json()) # convert the object into a dict commodity_processing_dto_dict = commodity_processing_dto_instance.to_dict() # create an instance of CommodityProcessingDTO from a dict -commodity_processing_dto_form_dict = commodity_processing_dto.from_dict(commodity_processing_dto_dict) +commodity_processing_dto_from_dict = CommodityProcessingDTO.from_dict(commodity_processing_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommodityQualityDTO.md b/docs/CommodityQualityDTO.md index daefc1a..8039b63 100644 --- a/docs/CommodityQualityDTO.md +++ b/docs/CommodityQualityDTO.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of CommodityQualityDTO from a JSON string commodity_quality_dto_instance = CommodityQualityDTO.from_json(json) # print the JSON string representation of the object -print CommodityQualityDTO.to_json() +print(CommodityQualityDTO.to_json()) # convert the object into a dict commodity_quality_dto_dict = commodity_quality_dto_instance.to_dict() # create an instance of CommodityQualityDTO from a dict -commodity_quality_dto_form_dict = commodity_quality_dto.from_dict(commodity_quality_dto_dict) +commodity_quality_dto_from_dict = CommodityQualityDTO.from_dict(commodity_quality_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommodityUnitsApi.md b/docs/CommodityUnitsApi.md index 3d2dbfe..9e45aa2 100644 --- a/docs/CommodityUnitsApi.md +++ b/docs/CommodityUnitsApi.md @@ -1,6 +1,6 @@ # data_bridges_client.CommodityUnitsApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,24 +13,22 @@ Method | HTTP request | Description Provides conversion factors to Kilogram or Litres for each convertible unit of measure. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-conversion-list_get\" Some non-standard units of measure might have different a conversion factor based on the country [Adm0Code]; Other non-standard units of measure might have a different conversion factor based on the commodity [CommodityID] being measured. Other cases will have null adm0code and CommodityID. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -103,24 +101,22 @@ Name | Type | Description | Notes Provides the detailed list of the unit of measure available in DataBridges platform - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_commodityunits-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/CurrencyApi.md b/docs/CurrencyApi.md index 0eeb72d..dbd8824 100644 --- a/docs/CurrencyApi.md +++ b/docs/CurrencyApi.md @@ -1,6 +1,6 @@ # data_bridges_client.CurrencyApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,24 +13,22 @@ Method | HTTP request | Description Returns the list of currencies available in the internal VAM database, with Currency 3-letter code, matching with ISO 4217. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -101,24 +99,22 @@ Name | Type | Description | Notes Returns the value of the Exchange rates from Trading Economics, for official rates, and DataViz for unofficial rates. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_currency-usdindirectquotation_get\" Returns the time series of values of the Exchange rate of the Local Currency for buying 1 USD in the official market. Original frequency for official rates is daily, non-indicated. Unofficial rates are aggregated at national level by the original frequency of collection. For greater detail on unofficial exchange rates, explore the Exchange Rate (unofficial) commodity in Market Prices Prices. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/CurrencyDTO.md b/docs/CurrencyDTO.md index ada93ae..d2fb06f 100644 --- a/docs/CurrencyDTO.md +++ b/docs/CurrencyDTO.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of CurrencyDTO from a JSON string currency_dto_instance = CurrencyDTO.from_json(json) # print the JSON string representation of the object -print CurrencyDTO.to_json() +print(CurrencyDTO.to_json()) # convert the object into a dict currency_dto_dict = currency_dto_instance.to_dict() # create an instance of CurrencyDTO from a dict -currency_dto_form_dict = currency_dto.from_dict(currency_dto_dict) +currency_dto_from_dict = CurrencyDTO.from_dict(currency_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EconomicDataApi.md b/docs/EconomicDataApi.md index 1938629..febe502 100644 --- a/docs/EconomicDataApi.md +++ b/docs/EconomicDataApi.md @@ -1,6 +1,6 @@ # data_bridges_client.EconomicDataApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,24 +13,22 @@ Method | HTTP request | Description Returns the lists of indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata-indicatorlist_get\" Returns the lists of indicators for which Vulnerability Analysis and Mapping - Economic and Market Analysis Unit has redistribution licensing from Trading Economics. No mandatory parameter. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -99,24 +97,22 @@ Name | Type | Description | Notes Returns the time series of values for different indicators. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_economicdata_get\" Indicator name as retrieved from /EconomicData/IndicatorList is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/EconomicDataDTO.md b/docs/EconomicDataDTO.md index 1bc3f11..46dca1e 100644 --- a/docs/EconomicDataDTO.md +++ b/docs/EconomicDataDTO.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of EconomicDataDTO from a JSON string economic_data_dto_instance = EconomicDataDTO.from_json(json) # print the JSON string representation of the object -print EconomicDataDTO.to_json() +print(EconomicDataDTO.to_json()) # convert the object into a dict economic_data_dto_dict = economic_data_dto_instance.to_dict() # create an instance of EconomicDataDTO from a dict -economic_data_dto_form_dict = economic_data_dto.from_dict(economic_data_dto_dict) +economic_data_dto_from_dict = EconomicDataDTO.from_dict(economic_data_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EconomicIndicatorProperty.md b/docs/EconomicIndicatorProperty.md index bd908f3..efe7add 100644 --- a/docs/EconomicIndicatorProperty.md +++ b/docs/EconomicIndicatorProperty.md @@ -24,12 +24,12 @@ json = "{}" # create an instance of EconomicIndicatorProperty from a JSON string economic_indicator_property_instance = EconomicIndicatorProperty.from_json(json) # print the JSON string representation of the object -print EconomicIndicatorProperty.to_json() +print(EconomicIndicatorProperty.to_json()) # convert the object into a dict economic_indicator_property_dict = economic_indicator_property_instance.to_dict() # create an instance of EconomicIndicatorProperty from a dict -economic_indicator_property_form_dict = economic_indicator_property.from_dict(economic_indicator_property_dict) +economic_indicator_property_from_dict = EconomicIndicatorProperty.from_dict(economic_indicator_property_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EconomicIndicatorPropertyPagedResult.md b/docs/EconomicIndicatorPropertyPagedResult.md index 1fb553f..5a67a36 100644 --- a/docs/EconomicIndicatorPropertyPagedResult.md +++ b/docs/EconomicIndicatorPropertyPagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of EconomicIndicatorPropertyPagedResult from a JSON string economic_indicator_property_paged_result_instance = EconomicIndicatorPropertyPagedResult.from_json(json) # print the JSON string representation of the object -print EconomicIndicatorPropertyPagedResult.to_json() +print(EconomicIndicatorPropertyPagedResult.to_json()) # convert the object into a dict economic_indicator_property_paged_result_dict = economic_indicator_property_paged_result_instance.to_dict() # create an instance of EconomicIndicatorPropertyPagedResult from a dict -economic_indicator_property_paged_result_form_dict = economic_indicator_property_paged_result.from_dict(economic_indicator_property_paged_result_dict) +economic_indicator_property_paged_result_from_dict = EconomicIndicatorPropertyPagedResult.from_dict(economic_indicator_property_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Feature.md b/docs/Feature.md index 74ee781..a76c353 100644 --- a/docs/Feature.md +++ b/docs/Feature.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of Feature from a JSON string feature_instance = Feature.from_json(json) # print the JSON string representation of the object -print Feature.to_json() +print(Feature.to_json()) # convert the object into a dict feature_dict = feature_instance.to_dict() # create an instance of Feature from a dict -feature_form_dict = feature.from_dict(feature_dict) +feature_from_dict = Feature.from_dict(feature_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FoodSecurityApi.md b/docs/FoodSecurityApi.md index 17146e8..ecaa612 100644 --- a/docs/FoodSecurityApi.md +++ b/docs/FoodSecurityApi.md @@ -1,6 +1,6 @@ # data_bridges_client.FoodSecurityApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -12,24 +12,22 @@ Method | HTTP request | Description - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_foodsecurity-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/Geometry.md b/docs/Geometry.md index a66d908..e65b4d5 100644 --- a/docs/Geometry.md +++ b/docs/Geometry.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of Geometry from a JSON string geometry_instance = Geometry.from_json(json) # print the JSON string representation of the object -print Geometry.to_json() +print(Geometry.to_json()) # convert the object into a dict geometry_dict = geometry_instance.to_dict() # create an instance of Geometry from a dict -geometry_form_dict = geometry.from_dict(geometry_dict) +geometry_from_dict = Geometry.from_dict(geometry_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GorpApi.md b/docs/GorpApi.md index af90c55..16e2485 100644 --- a/docs/GorpApi.md +++ b/docs/GorpApi.md @@ -1,6 +1,6 @@ # data_bridges_client.GorpApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,24 +13,22 @@ Method | HTTP request | Description Return the latest dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-latest_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -93,24 +91,22 @@ Name | Type | Description | Notes Return the full dataset of number of acutely food insecure (in millions) based on WFP Global Operational Response Plan. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_gorp-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/GorpValueWithChanges.md b/docs/GorpValueWithChanges.md index 2729068..f74bcfc 100644 --- a/docs/GorpValueWithChanges.md +++ b/docs/GorpValueWithChanges.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of GorpValueWithChanges from a JSON string gorp_value_with_changes_instance = GorpValueWithChanges.from_json(json) # print the JSON string representation of the object -print GorpValueWithChanges.to_json() +print(GorpValueWithChanges.to_json()) # convert the object into a dict gorp_value_with_changes_dict = gorp_value_with_changes_instance.to_dict() # create an instance of GorpValueWithChanges from a dict -gorp_value_with_changes_form_dict = gorp_value_with_changes.from_dict(gorp_value_with_changes_dict) +gorp_value_with_changes_from_dict = GorpValueWithChanges.from_dict(gorp_value_with_changes_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GorpValueWithChangesPagedResult.md b/docs/GorpValueWithChangesPagedResult.md index c4a6ce6..f778d2e 100644 --- a/docs/GorpValueWithChangesPagedResult.md +++ b/docs/GorpValueWithChangesPagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of GorpValueWithChangesPagedResult from a JSON string gorp_value_with_changes_paged_result_instance = GorpValueWithChangesPagedResult.from_json(json) # print the JSON string representation of the object -print GorpValueWithChangesPagedResult.to_json() +print(GorpValueWithChangesPagedResult.to_json()) # convert the object into a dict gorp_value_with_changes_paged_result_dict = gorp_value_with_changes_paged_result_instance.to_dict() # create an instance of GorpValueWithChangesPagedResult from a dict -gorp_value_with_changes_paged_result_form_dict = gorp_value_with_changes_paged_result.from_dict(gorp_value_with_changes_paged_result_dict) +gorp_value_with_changes_paged_result_from_dict = GorpValueWithChangesPagedResult.from_dict(gorp_value_with_changes_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HouseholdSurveyListDTO.md b/docs/HouseholdSurveyListDTO.md index 1ce5cfa..d9ea20f 100644 --- a/docs/HouseholdSurveyListDTO.md +++ b/docs/HouseholdSurveyListDTO.md @@ -41,12 +41,12 @@ json = "{}" # create an instance of HouseholdSurveyListDTO from a JSON string household_survey_list_dto_instance = HouseholdSurveyListDTO.from_json(json) # print the JSON string representation of the object -print HouseholdSurveyListDTO.to_json() +print(HouseholdSurveyListDTO.to_json()) # convert the object into a dict household_survey_list_dto_dict = household_survey_list_dto_instance.to_dict() # create an instance of HouseholdSurveyListDTO from a dict -household_survey_list_dto_form_dict = household_survey_list_dto.from_dict(household_survey_list_dto_dict) +household_survey_list_dto_from_dict = HouseholdSurveyListDTO.from_dict(household_survey_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/HouseholdSurveyListDTOPagedResult.md b/docs/HouseholdSurveyListDTOPagedResult.md index 8ba509b..bb04d2f 100644 --- a/docs/HouseholdSurveyListDTOPagedResult.md +++ b/docs/HouseholdSurveyListDTOPagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of HouseholdSurveyListDTOPagedResult from a JSON string household_survey_list_dto_paged_result_instance = HouseholdSurveyListDTOPagedResult.from_json(json) # print the JSON string representation of the object -print HouseholdSurveyListDTOPagedResult.to_json() +print(HouseholdSurveyListDTOPagedResult.to_json()) # convert the object into a dict household_survey_list_dto_paged_result_dict = household_survey_list_dto_paged_result_instance.to_dict() # create an instance of HouseholdSurveyListDTOPagedResult from a dict -household_survey_list_dto_paged_result_form_dict = household_survey_list_dto_paged_result.from_dict(household_survey_list_dto_paged_result_dict) +household_survey_list_dto_paged_result_from_dict = HouseholdSurveyListDTOPagedResult.from_dict(household_survey_list_dto_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IncubationApi.md b/docs/IncubationApi.md index 7b182a0..1635c2b 100644 --- a/docs/IncubationApi.md +++ b/docs/IncubationApi.md @@ -1,6 +1,6 @@ # data_bridges_client.IncubationApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -8,11 +8,12 @@ Method | HTTP request | Description [**household_full_data_get**](IncubationApi.md#household_full_data_get) | **GET** /Household/FullData | Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization. [**household_official_use_base_data_get**](IncubationApi.md#household_official_use_base_data_get) | **GET** /Household/OfficialUseBaseData | Get data that includes the core household fields only by Survey ID [**household_public_base_data_get**](IncubationApi.md#household_public_base_data_get) | **GET** /Household/PublicBaseData | Get data that includes the core household fields only by Survey ID -[**household_surveys_get**](IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. +[**household_surveys_get**](IncubationApi.md#household_surveys_get) | **GET** /Household/Surveys | Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. +[**xls_forms_definition_get**](IncubationApi.md#xls_forms_definition_get) | **GET** /XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. # **household_draft_internal_base_data_get** -> PagedSurveyResponsesDTO household_draft_internal_base_data_get(survey_id=survey_id, page=page, env=env) +> PagedSurveyResponsesDTO household_draft_internal_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) Get data that includes the core household fields only by Survey ID @@ -23,17 +24,15 @@ Get data that includes the core household fields only by Survey ID * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -49,11 +48,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: api_instance = data_bridges_client.IncubationApi(api_client) survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get data that includes the core household fields only by Survey ID - api_response = api_instance.household_draft_internal_base_data_get(survey_id=survey_id, page=page, env=env) + api_response = api_instance.household_draft_internal_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) print("The response of IncubationApi->household_draft_internal_base_data_get:\n") pprint(api_response) except Exception as e: @@ -69,6 +69,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -95,7 +96,7 @@ Name | Type | Description | Notes [[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) # **household_full_data_get** -> PagedSurveyResponsesDTO household_full_data_get(survey_id=survey_id, format=format, page=page, env=env) +> PagedSurveyResponsesDTO household_full_data_get(survey_id=survey_id, format=format, page=page, page_size=page_size, env=env) Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization. @@ -106,17 +107,15 @@ Get a full dataset that includes all the fields included in the survey in additi * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -133,11 +132,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json') page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get a full dataset that includes all the fields included in the survey in addition to the core household fields by Survey ID. To access this data, please contact xxxx for authorization. - api_response = api_instance.household_full_data_get(survey_id=survey_id, format=format, page=page, env=env) + api_response = api_instance.household_full_data_get(survey_id=survey_id, format=format, page=page, page_size=page_size, env=env) print("The response of IncubationApi->household_full_data_get:\n") pprint(api_response) except Exception as e: @@ -154,6 +154,7 @@ Name | Type | Description | Notes **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json'] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -180,7 +181,7 @@ Name | Type | Description | Notes [[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) # **household_official_use_base_data_get** -> PagedSurveyResponsesDTO household_official_use_base_data_get(survey_id=survey_id, page=page, env=env) +> PagedSurveyResponsesDTO household_official_use_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) Get data that includes the core household fields only by Survey ID @@ -191,17 +192,15 @@ Get data that includes the core household fields only by Survey ID * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -217,11 +216,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: api_instance = data_bridges_client.IncubationApi(api_client) survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get data that includes the core household fields only by Survey ID - api_response = api_instance.household_official_use_base_data_get(survey_id=survey_id, page=page, env=env) + api_response = api_instance.household_official_use_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) print("The response of IncubationApi->household_official_use_base_data_get:\n") pprint(api_response) except Exception as e: @@ -237,6 +237,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -263,7 +264,7 @@ Name | Type | Description | Notes [[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) # **household_public_base_data_get** -> PagedSurveyResponsesDTO household_public_base_data_get(survey_id=survey_id, page=page, env=env) +> PagedSurveyResponsesDTO household_public_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) Get data that includes the core household fields only by Survey ID @@ -274,17 +275,15 @@ Get data that includes the core household fields only by Survey ID * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -300,11 +299,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: api_instance = data_bridges_client.IncubationApi(api_client) survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get data that includes the core household fields only by Survey ID - api_response = api_instance.household_public_base_data_get(survey_id=survey_id, page=page, env=env) + api_response = api_instance.household_public_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) print("The response of IncubationApi->household_public_base_data_get:\n") pprint(api_response) except Exception as e: @@ -320,6 +320,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -348,26 +349,24 @@ Name | Type | Description | Notes # **household_surveys_get** > HouseholdSurveyListDTOPagedResult household_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env) -Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. +Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_household-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -388,7 +387,7 @@ with data_bridges_client.ApiClient(configuration) as api_client: env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: - # Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. + # Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. api_response = api_instance.household_surveys_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env) print("The response of IncubationApi->household_surveys_get:\n") pprint(api_response) @@ -431,3 +430,81 @@ Name | Type | Description | Notes [[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) +# **xls_forms_definition_get** +> List[XlsFormDefinitionNewSchemaDTO] xls_forms_definition_get(xls_form_id=xls_form_id, env=env) + +Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. + + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Incubation-red)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_xlsforms-definition_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + +### Example + +* OAuth Authentication (default): + +```python +import data_bridges_client +from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO +from data_bridges_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 +# See configuration.py for a list of all supported configuration parameters. +configuration = data_bridges_client.Configuration( + host = "https://api.wfp.org/vam-data-bridges/4.0.0" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +configuration.access_token = os.environ["ACCESS_TOKEN"] + +# Enter a context with an instance of the API client +with data_bridges_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = data_bridges_client.IncubationApi(api_client) + xls_form_id = 56 # int | unique identifier for the XLS Form, as retrieved from /XLSForms (optional) + env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) + + try: + # Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. + api_response = api_instance.xls_forms_definition_get(xls_form_id=xls_form_id, env=env) + print("The response of IncubationApi->xls_forms_definition_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IncubationApi->xls_forms_definition_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xls_form_id** | **int**| unique identifier for the XLS Form, as retrieved from /XLSForms | [optional] + **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] + +### Return type + +[**List[XlsFormDefinitionNewSchemaDTO]**](XlsFormDefinitionNewSchemaDTO.md) + +### Authorization + +[default](../README.md#default) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Success | - | +**400** | Bad Request | - | + +[[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) + diff --git a/docs/IpcValue.md b/docs/IpcValue.md index 36cdf67..825f7d9 100644 --- a/docs/IpcValue.md +++ b/docs/IpcValue.md @@ -36,12 +36,12 @@ json = "{}" # create an instance of IpcValue from a JSON string ipc_value_instance = IpcValue.from_json(json) # print the JSON string representation of the object -print IpcValue.to_json() +print(IpcValue.to_json()) # convert the object into a dict ipc_value_dict = ipc_value_instance.to_dict() # create an instance of IpcValue from a dict -ipc_value_form_dict = ipc_value.from_dict(ipc_value_dict) +ipc_value_from_dict = IpcValue.from_dict(ipc_value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IpcValuePagedResult.md b/docs/IpcValuePagedResult.md index 682de6c..6b6da03 100644 --- a/docs/IpcValuePagedResult.md +++ b/docs/IpcValuePagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of IpcValuePagedResult from a JSON string ipc_value_paged_result_instance = IpcValuePagedResult.from_json(json) # print the JSON string representation of the object -print IpcValuePagedResult.to_json() +print(IpcValuePagedResult.to_json()) # convert the object into a dict ipc_value_paged_result_dict = ipc_value_paged_result_instance.to_dict() # create an instance of IpcValuePagedResult from a dict -ipc_value_paged_result_form_dict = ipc_value_paged_result.from_dict(ipc_value_paged_result_dict) +ipc_value_paged_result_from_dict = IpcValuePagedResult.from_dict(ipc_value_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/KeyNameDto.md b/docs/KeyNameDto.md index 086b1a1..98c1b72 100644 --- a/docs/KeyNameDto.md +++ b/docs/KeyNameDto.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of KeyNameDto from a JSON string key_name_dto_instance = KeyNameDto.from_json(json) # print the JSON string representation of the object -print KeyNameDto.to_json() +print(KeyNameDto.to_json()) # convert the object into a dict key_name_dto_dict = key_name_dto_instance.to_dict() # create an instance of KeyNameDto from a dict -key_name_dto_form_dict = key_name_dto.from_dict(key_name_dto_dict) +key_name_dto_from_dict = KeyNameDto.from_dict(key_name_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MFIProcessedDataDTO.md b/docs/MFIProcessedDataDTO.md index 8ff5424..865c151 100644 --- a/docs/MFIProcessedDataDTO.md +++ b/docs/MFIProcessedDataDTO.md @@ -42,12 +42,12 @@ json = "{}" # create an instance of MFIProcessedDataDTO from a JSON string mfi_processed_data_dto_instance = MFIProcessedDataDTO.from_json(json) # print the JSON string representation of the object -print MFIProcessedDataDTO.to_json() +print(MFIProcessedDataDTO.to_json()) # convert the object into a dict mfi_processed_data_dto_dict = mfi_processed_data_dto_instance.to_dict() # create an instance of MFIProcessedDataDTO from a dict -mfi_processed_data_dto_form_dict = mfi_processed_data_dto.from_dict(mfi_processed_data_dto_dict) +mfi_processed_data_dto_from_dict = MFIProcessedDataDTO.from_dict(mfi_processed_data_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarketDTO.md b/docs/MarketDTO.md index 8112bcb..384f8e1 100644 --- a/docs/MarketDTO.md +++ b/docs/MarketDTO.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of MarketDTO from a JSON string market_dto_instance = MarketDTO.from_json(json) # print the JSON string representation of the object -print MarketDTO.to_json() +print(MarketDTO.to_json()) # convert the object into a dict market_dto_dict = market_dto_instance.to_dict() # create an instance of MarketDTO from a dict -market_dto_form_dict = market_dto.from_dict(market_dto_dict) +market_dto_from_dict = MarketDTO.from_dict(market_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarketGeoJsonRoot.md b/docs/MarketGeoJsonRoot.md index 2e41b7b..ec7be0b 100644 --- a/docs/MarketGeoJsonRoot.md +++ b/docs/MarketGeoJsonRoot.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of MarketGeoJsonRoot from a JSON string market_geo_json_root_instance = MarketGeoJsonRoot.from_json(json) # print the JSON string representation of the object -print MarketGeoJsonRoot.to_json() +print(MarketGeoJsonRoot.to_json()) # convert the object into a dict market_geo_json_root_dict = market_geo_json_root_instance.to_dict() # create an instance of MarketGeoJsonRoot from a dict -market_geo_json_root_form_dict = market_geo_json_root.from_dict(market_geo_json_root_dict) +market_geo_json_root_from_dict = MarketGeoJsonRoot.from_dict(market_geo_json_root_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarketPricesApi.md b/docs/MarketPricesApi.md index 4fbd55a..11a7e97 100644 --- a/docs/MarketPricesApi.md +++ b/docs/MarketPricesApi.md @@ -1,6 +1,6 @@ # data_bridges_client.MarketPricesApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -16,24 +16,22 @@ Method | HTTP request | Description Returns time series values of ALPS and PEWI. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-alps_get\" Returns the full time series of the Alert for Price Spikes (ALPS) and the value of the Price Early Warning Index (PEWI). Methodology is available in [DataViz](https://dataviz.vam.wfp.org/) and [VAM-Resource Centre](https://resources.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -116,24 +114,22 @@ Name | Type | Description | Notes Returns a daily time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricedaily_get\" This is the highest frequency available. Data is flagged according to its pre-processing characteristics. Actual data is collected originally with daily frequency; aggregated data returns an empty list; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in DataLibrary. For specific methodological notes on forecasts and imputations refer to the dedicated page in DataViz. Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -216,24 +212,22 @@ Name | Type | Description | Notes Returns a monthly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-pricemonthly_get\" This is the lowest frequency available and the most complete data source. Data is flagged according to its pre-processing characteristics. actual data is collected originally with monthly frequency; aggregated data is collected with higher frequency (daily or weekly) averaged through a weighted mean to monthly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -323,17 +317,15 @@ Returns original commodity market prices * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -416,24 +408,22 @@ Name | Type | Description | Notes Returns a weekly time series of commodity market prices. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_marketprices-priceweekly_get\" Weeks used as reference are the International Organization for Standardization (ISO) week-numbering year (ISO-8601). Data is flagged according to its pre-processing characteristics. Aactual data is collected originally with weekly frequency; aggregated data is collected with higher frequency (daily) averaged through a weighted mean to weekly; imputed data is an estimation of missing values in the time series, obtained through the R Amelia-II package; forecasted data is a six months prediction obtained through different methods, which are reported in the API. For country specific meta-data please refer to documentation available in [DataLibrary](https://datalib.vam.wfp.org/). For specific methodological notes on forecasts and imputations refer to the dedicated page in [DataViz](https://dataviz.vam.wfp.org/). Country code, either ISO-3166 Alpha 3 code or the VAM internal admin0code is mandatory. **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/MarketsApi.md b/docs/MarketsApi.md index 3c56d29..29a3925 100644 --- a/docs/MarketsApi.md +++ b/docs/MarketsApi.md @@ -1,6 +1,6 @@ # data_bridges_client.MarketsApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -15,24 +15,22 @@ Method | HTTP request | Description Provide a list of geo referenced markets in a specific country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-geojsonlist_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -95,24 +93,22 @@ Name | Type | Description | Notes Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-list_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -178,23 +174,21 @@ Name | Type | Description | Notes Get a complete list of markets in a country - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-marketsascsv_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -258,24 +252,22 @@ Name | Type | Description | Notes Find markets near a given location by longitude and latitude within a 15Km distance - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_markets-nearbymarkets_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/NearbyMarketsDTO.md b/docs/NearbyMarketsDTO.md index bb9c588..ea03730 100644 --- a/docs/NearbyMarketsDTO.md +++ b/docs/NearbyMarketsDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of NearbyMarketsDTO from a JSON string nearby_markets_dto_instance = NearbyMarketsDTO.from_json(json) # print the JSON string representation of the object -print NearbyMarketsDTO.to_json() +print(NearbyMarketsDTO.to_json()) # convert the object into a dict nearby_markets_dto_dict = nearby_markets_dto_instance.to_dict() # create an instance of NearbyMarketsDTO from a dict -nearby_markets_dto_form_dict = nearby_markets_dto.from_dict(nearby_markets_dto_dict) +nearby_markets_dto_from_dict = NearbyMarketsDTO.from_dict(nearby_markets_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedCommodityListDTO.md b/docs/PagedCommodityListDTO.md index 55d29f8..b386cc4 100644 --- a/docs/PagedCommodityListDTO.md +++ b/docs/PagedCommodityListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedCommodityListDTO from a JSON string paged_commodity_list_dto_instance = PagedCommodityListDTO.from_json(json) # print the JSON string representation of the object -print PagedCommodityListDTO.to_json() +print(PagedCommodityListDTO.to_json()) # convert the object into a dict paged_commodity_list_dto_dict = paged_commodity_list_dto_instance.to_dict() # create an instance of PagedCommodityListDTO from a dict -paged_commodity_list_dto_form_dict = paged_commodity_list_dto.from_dict(paged_commodity_list_dto_dict) +paged_commodity_list_dto_from_dict = PagedCommodityListDTO.from_dict(paged_commodity_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedCommodityPriceListDTO.md b/docs/PagedCommodityPriceListDTO.md index 56df6fd..59e11db 100644 --- a/docs/PagedCommodityPriceListDTO.md +++ b/docs/PagedCommodityPriceListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedCommodityPriceListDTO from a JSON string paged_commodity_price_list_dto_instance = PagedCommodityPriceListDTO.from_json(json) # print the JSON string representation of the object -print PagedCommodityPriceListDTO.to_json() +print(PagedCommodityPriceListDTO.to_json()) # convert the object into a dict paged_commodity_price_list_dto_dict = paged_commodity_price_list_dto_instance.to_dict() # create an instance of PagedCommodityPriceListDTO from a dict -paged_commodity_price_list_dto_form_dict = paged_commodity_price_list_dto.from_dict(paged_commodity_price_list_dto_dict) +paged_commodity_price_list_dto_from_dict = PagedCommodityPriceListDTO.from_dict(paged_commodity_price_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md b/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md index a2a8f33..719ff31 100644 --- a/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md +++ b/docs/PagedCommodityWeeklyAggregatedPriceListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a JSON string paged_commodity_weekly_aggregated_price_list_dto_instance = PagedCommodityWeeklyAggregatedPriceListDTO.from_json(json) # print the JSON string representation of the object -print PagedCommodityWeeklyAggregatedPriceListDTO.to_json() +print(PagedCommodityWeeklyAggregatedPriceListDTO.to_json()) # convert the object into a dict paged_commodity_weekly_aggregated_price_list_dto_dict = paged_commodity_weekly_aggregated_price_list_dto_instance.to_dict() # create an instance of PagedCommodityWeeklyAggregatedPriceListDTO from a dict -paged_commodity_weekly_aggregated_price_list_dto_form_dict = paged_commodity_weekly_aggregated_price_list_dto.from_dict(paged_commodity_weekly_aggregated_price_list_dto_dict) +paged_commodity_weekly_aggregated_price_list_dto_from_dict = PagedCommodityWeeklyAggregatedPriceListDTO.from_dict(paged_commodity_weekly_aggregated_price_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedCurrencyListDTO.md b/docs/PagedCurrencyListDTO.md index 1aa6d13..6a789f3 100644 --- a/docs/PagedCurrencyListDTO.md +++ b/docs/PagedCurrencyListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedCurrencyListDTO from a JSON string paged_currency_list_dto_instance = PagedCurrencyListDTO.from_json(json) # print the JSON string representation of the object -print PagedCurrencyListDTO.to_json() +print(PagedCurrencyListDTO.to_json()) # convert the object into a dict paged_currency_list_dto_dict = paged_currency_list_dto_instance.to_dict() # create an instance of PagedCurrencyListDTO from a dict -paged_currency_list_dto_form_dict = paged_currency_list_dto.from_dict(paged_currency_list_dto_dict) +paged_currency_list_dto_from_dict = PagedCurrencyListDTO.from_dict(paged_currency_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedEconomicDataDTO.md b/docs/PagedEconomicDataDTO.md index 6c99818..5d387cf 100644 --- a/docs/PagedEconomicDataDTO.md +++ b/docs/PagedEconomicDataDTO.md @@ -22,12 +22,12 @@ json = "{}" # create an instance of PagedEconomicDataDTO from a JSON string paged_economic_data_dto_instance = PagedEconomicDataDTO.from_json(json) # print the JSON string representation of the object -print PagedEconomicDataDTO.to_json() +print(PagedEconomicDataDTO.to_json()) # convert the object into a dict paged_economic_data_dto_dict = paged_economic_data_dto_instance.to_dict() # create an instance of PagedEconomicDataDTO from a dict -paged_economic_data_dto_form_dict = paged_economic_data_dto.from_dict(paged_economic_data_dto_dict) +paged_economic_data_dto_from_dict = PagedEconomicDataDTO.from_dict(paged_economic_data_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedMarketListDTO.md b/docs/PagedMarketListDTO.md index a05edca..1ca691a 100644 --- a/docs/PagedMarketListDTO.md +++ b/docs/PagedMarketListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedMarketListDTO from a JSON string paged_market_list_dto_instance = PagedMarketListDTO.from_json(json) # print the JSON string representation of the object -print PagedMarketListDTO.to_json() +print(PagedMarketListDTO.to_json()) # convert the object into a dict paged_market_list_dto_dict = paged_market_list_dto_instance.to_dict() # create an instance of PagedMarketListDTO from a dict -paged_market_list_dto_form_dict = paged_market_list_dto.from_dict(paged_market_list_dto_dict) +paged_market_list_dto_from_dict = PagedMarketListDTO.from_dict(paged_market_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedProcessedDataDTO.md b/docs/PagedProcessedDataDTO.md index d1d766f..1a86eac 100644 --- a/docs/PagedProcessedDataDTO.md +++ b/docs/PagedProcessedDataDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedProcessedDataDTO from a JSON string paged_processed_data_dto_instance = PagedProcessedDataDTO.from_json(json) # print the JSON string representation of the object -print PagedProcessedDataDTO.to_json() +print(PagedProcessedDataDTO.to_json()) # convert the object into a dict paged_processed_data_dto_dict = paged_processed_data_dto_instance.to_dict() # create an instance of PagedProcessedDataDTO from a dict -paged_processed_data_dto_form_dict = paged_processed_data_dto.from_dict(paged_processed_data_dto_dict) +paged_processed_data_dto_from_dict = PagedProcessedDataDTO.from_dict(paged_processed_data_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedSurveyListDTO.md b/docs/PagedSurveyListDTO.md index d24af31..5953e2e 100644 --- a/docs/PagedSurveyListDTO.md +++ b/docs/PagedSurveyListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedSurveyListDTO from a JSON string paged_survey_list_dto_instance = PagedSurveyListDTO.from_json(json) # print the JSON string representation of the object -print PagedSurveyListDTO.to_json() +print(PagedSurveyListDTO.to_json()) # convert the object into a dict paged_survey_list_dto_dict = paged_survey_list_dto_instance.to_dict() # create an instance of PagedSurveyListDTO from a dict -paged_survey_list_dto_form_dict = paged_survey_list_dto.from_dict(paged_survey_list_dto_dict) +paged_survey_list_dto_from_dict = PagedSurveyListDTO.from_dict(paged_survey_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedSurveyResponsesDTO.md b/docs/PagedSurveyResponsesDTO.md index c9349c6..05a1e3f 100644 --- a/docs/PagedSurveyResponsesDTO.md +++ b/docs/PagedSurveyResponsesDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedSurveyResponsesDTO from a JSON string paged_survey_responses_dto_instance = PagedSurveyResponsesDTO.from_json(json) # print the JSON string representation of the object -print PagedSurveyResponsesDTO.to_json() +print(PagedSurveyResponsesDTO.to_json()) # convert the object into a dict paged_survey_responses_dto_dict = paged_survey_responses_dto_instance.to_dict() # create an instance of PagedSurveyResponsesDTO from a dict -paged_survey_responses_dto_form_dict = paged_survey_responses_dto.from_dict(paged_survey_responses_dto_dict) +paged_survey_responses_dto_from_dict = PagedSurveyResponsesDTO.from_dict(paged_survey_responses_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PagedXlsFormListDTO.md b/docs/PagedXlsFormListDTO.md index 4da3537..40a0afb 100644 --- a/docs/PagedXlsFormListDTO.md +++ b/docs/PagedXlsFormListDTO.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of PagedXlsFormListDTO from a JSON string paged_xls_form_list_dto_instance = PagedXlsFormListDTO.from_json(json) # print the JSON string representation of the object -print PagedXlsFormListDTO.to_json() +print(PagedXlsFormListDTO.to_json()) # convert the object into a dict paged_xls_form_list_dto_dict = paged_xls_form_list_dto_instance.to_dict() # create an instance of PagedXlsFormListDTO from a dict -paged_xls_form_list_dto_form_dict = paged_xls_form_list_dto.from_dict(paged_xls_form_list_dto_dict) +paged_xls_form_list_dto_from_dict = PagedXlsFormListDTO.from_dict(paged_xls_form_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProblemDetails.md b/docs/ProblemDetails.md index e3d442b..1dd7d96 100644 --- a/docs/ProblemDetails.md +++ b/docs/ProblemDetails.md @@ -21,12 +21,12 @@ json = "{}" # create an instance of ProblemDetails from a JSON string problem_details_instance = ProblemDetails.from_json(json) # print the JSON string representation of the object -print ProblemDetails.to_json() +print(ProblemDetails.to_json()) # convert the object into a dict problem_details_dict = problem_details_instance.to_dict() # create an instance of ProblemDetails from a dict -problem_details_form_dict = problem_details.from_dict(problem_details_dict) +problem_details_from_dict = ProblemDetails.from_dict(problem_details_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Properties.md b/docs/Properties.md index e5c6074..7ce4c66 100644 --- a/docs/Properties.md +++ b/docs/Properties.md @@ -17,12 +17,12 @@ json = "{}" # create an instance of Properties from a JSON string properties_instance = Properties.from_json(json) # print the JSON string representation of the object -print Properties.to_json() +print(Properties.to_json()) # convert the object into a dict properties_dict = properties_instance.to_dict() # create an instance of Properties from a dict -properties_form_dict = properties.from_dict(properties_dict) +properties_from_dict = Properties.from_dict(properties_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RpmeApi.md b/docs/RpmeApi.md index b8a985c..183eb28 100644 --- a/docs/RpmeApi.md +++ b/docs/RpmeApi.md @@ -1,6 +1,6 @@ # data_bridges_client.RpmeApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -13,28 +13,26 @@ Method | HTTP request | Description # **rpme_base_data_get** -> PagedSurveyResponsesDTO rpme_base_data_get(survey_id=survey_id, page=page, env=env) +> PagedSurveyResponsesDTO rpme_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) Get data that includes the core RPME fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -50,11 +48,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: api_instance = data_bridges_client.RpmeApi(api_client) survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get data that includes the core RPME fields only by Survey ID - api_response = api_instance.rpme_base_data_get(survey_id=survey_id, page=page, env=env) + api_response = api_instance.rpme_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) print("The response of RpmeApi->rpme_base_data_get:\n") pprint(api_response) except Exception as e: @@ -70,6 +69,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -96,7 +96,7 @@ Name | Type | Description | Notes [[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) # **rpme_full_data_get** -> PagedSurveyResponsesDTO rpme_full_data_get(survey_id=survey_id, format=format, page=page, env=env) +> PagedSurveyResponsesDTO rpme_full_data_get(survey_id=survey_id, format=format, page=page, page_size=page_size, env=env) Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID. @@ -107,17 +107,15 @@ Get a full dataset that includes all the fields included in the survey in additi * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -134,11 +132,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json') page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get a full dataset that includes all the fields included in the survey in addition to the core RPME fields by Survey ID. - api_response = api_instance.rpme_full_data_get(survey_id=survey_id, format=format, page=page, env=env) + api_response = api_instance.rpme_full_data_get(survey_id=survey_id, format=format, page=page, page_size=page_size, env=env) print("The response of RpmeApi->rpme_full_data_get:\n") pprint(api_response) except Exception as e: @@ -155,6 +154,7 @@ Name | Type | Description | Notes **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json'] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -185,24 +185,22 @@ Name | Type | Description | Notes Processed values for each variable used in the assessments - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-outputvalues_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -275,24 +273,22 @@ Name | Type | Description | Notes Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all RPME surveys conducted in a country. The date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload of each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -361,24 +357,22 @@ Name | Type | Description | Notes List of variables - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-variables_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -441,24 +435,22 @@ Name | Type | Description | Notes Get a complete list of XLS Forms uploaded on the RPME in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_rpme-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/docs/RpmeAssessment.md b/docs/RpmeAssessment.md index 357bff6..9958e13 100644 --- a/docs/RpmeAssessment.md +++ b/docs/RpmeAssessment.md @@ -36,12 +36,12 @@ json = "{}" # create an instance of RpmeAssessment from a JSON string rpme_assessment_instance = RpmeAssessment.from_json(json) # print the JSON string representation of the object -print RpmeAssessment.to_json() +print(RpmeAssessment.to_json()) # convert the object into a dict rpme_assessment_dict = rpme_assessment_instance.to_dict() # create an instance of RpmeAssessment from a dict -rpme_assessment_form_dict = rpme_assessment.from_dict(rpme_assessment_dict) +rpme_assessment_from_dict = RpmeAssessment.from_dict(rpme_assessment_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RpmeAssessmentPagedResult.md b/docs/RpmeAssessmentPagedResult.md index 1ba9f34..6625a03 100644 --- a/docs/RpmeAssessmentPagedResult.md +++ b/docs/RpmeAssessmentPagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of RpmeAssessmentPagedResult from a JSON string rpme_assessment_paged_result_instance = RpmeAssessmentPagedResult.from_json(json) # print the JSON string representation of the object -print RpmeAssessmentPagedResult.to_json() +print(RpmeAssessmentPagedResult.to_json()) # convert the object into a dict rpme_assessment_paged_result_dict = rpme_assessment_paged_result_instance.to_dict() # create an instance of RpmeAssessmentPagedResult from a dict -rpme_assessment_paged_result_form_dict = rpme_assessment_paged_result.from_dict(rpme_assessment_paged_result_dict) +rpme_assessment_paged_result_from_dict = RpmeAssessmentPagedResult.from_dict(rpme_assessment_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RpmeOutputValues.md b/docs/RpmeOutputValues.md index 00aee27..371295e 100644 --- a/docs/RpmeOutputValues.md +++ b/docs/RpmeOutputValues.md @@ -18,12 +18,12 @@ json = "{}" # create an instance of RpmeOutputValues from a JSON string rpme_output_values_instance = RpmeOutputValues.from_json(json) # print the JSON string representation of the object -print RpmeOutputValues.to_json() +print(RpmeOutputValues.to_json()) # convert the object into a dict rpme_output_values_dict = rpme_output_values_instance.to_dict() # create an instance of RpmeOutputValues from a dict -rpme_output_values_form_dict = rpme_output_values.from_dict(rpme_output_values_dict) +rpme_output_values_from_dict = RpmeOutputValues.from_dict(rpme_output_values_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RpmeVariable.md b/docs/RpmeVariable.md index bb5640a..dfb9ba5 100644 --- a/docs/RpmeVariable.md +++ b/docs/RpmeVariable.md @@ -25,12 +25,12 @@ json = "{}" # create an instance of RpmeVariable from a JSON string rpme_variable_instance = RpmeVariable.from_json(json) # print the JSON string representation of the object -print RpmeVariable.to_json() +print(RpmeVariable.to_json()) # convert the object into a dict rpme_variable_dict = rpme_variable_instance.to_dict() # create an instance of RpmeVariable from a dict -rpme_variable_form_dict = rpme_variable.from_dict(rpme_variable_dict) +rpme_variable_from_dict = RpmeVariable.from_dict(rpme_variable_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RpmeVariablePagedResult.md b/docs/RpmeVariablePagedResult.md index 2ea6d2c..d067faf 100644 --- a/docs/RpmeVariablePagedResult.md +++ b/docs/RpmeVariablePagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of RpmeVariablePagedResult from a JSON string rpme_variable_paged_result_instance = RpmeVariablePagedResult.from_json(json) # print the JSON string representation of the object -print RpmeVariablePagedResult.to_json() +print(RpmeVariablePagedResult.to_json()) # convert the object into a dict rpme_variable_paged_result_dict = rpme_variable_paged_result_instance.to_dict() # create an instance of RpmeVariablePagedResult from a dict -rpme_variable_paged_result_form_dict = rpme_variable_paged_result.from_dict(rpme_variable_paged_result_dict) +rpme_variable_paged_result_from_dict = RpmeVariablePagedResult.from_dict(rpme_variable_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SurveyListDTO.md b/docs/SurveyListDTO.md index 2dfbfb1..9e4df27 100644 --- a/docs/SurveyListDTO.md +++ b/docs/SurveyListDTO.md @@ -31,12 +31,12 @@ json = "{}" # create an instance of SurveyListDTO from a JSON string survey_list_dto_instance = SurveyListDTO.from_json(json) # print the JSON string representation of the object -print SurveyListDTO.to_json() +print(SurveyListDTO.to_json()) # convert the object into a dict survey_list_dto_dict = survey_list_dto_instance.to_dict() # create an instance of SurveyListDTO from a dict -survey_list_dto_form_dict = survey_list_dto.from_dict(survey_list_dto_dict) +survey_list_dto_from_dict = SurveyListDTO.from_dict(survey_list_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SurveysApi.md b/docs/SurveysApi.md index 392d805..daf0248 100644 --- a/docs/SurveysApi.md +++ b/docs/SurveysApi.md @@ -1,6 +1,6 @@ # data_bridges_client.SurveysApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,28 +11,26 @@ Method | HTTP request | Description # **m_fi_surveys_base_data_get** -> PagedSurveyResponsesDTO m_fi_surveys_base_data_get(survey_id=survey_id, page=page, env=env) +> PagedSurveyResponsesDTO m_fi_surveys_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-basedata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -48,11 +46,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: api_instance = data_bridges_client.SurveysApi(api_client) survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get data that includes the core Market Functionality Index (MFI) fields only by Survey ID - api_response = api_instance.m_fi_surveys_base_data_get(survey_id=survey_id, page=page, env=env) + api_response = api_instance.m_fi_surveys_base_data_get(survey_id=survey_id, page=page, page_size=page_size, env=env) print("The response of SurveysApi->m_fi_surveys_base_data_get:\n") pprint(api_response) except Exception as e: @@ -68,6 +67,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -94,7 +94,7 @@ Name | Type | Description | Notes [[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) # **m_fi_surveys_full_data_get** -> PagedSurveyResponsesDTO m_fi_surveys_full_data_get(survey_id=survey_id, format=format, page=page, env=env) +> PagedSurveyResponsesDTO m_fi_surveys_full_data_get(survey_id=survey_id, format=format, page=page, page_size=page_size, env=env) Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization. @@ -105,17 +105,15 @@ Get a full dataset that includes all the fields included in the survey in additi * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -132,11 +130,12 @@ with data_bridges_client.ApiClient(configuration) as api_client: survey_id = 56 # int | unique identifier for the collected data, as retrieved from /Surveys API. (optional) format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json') page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | page size for paged results, default value is 20. (optional) (default to 20) env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) try: # Get a full dataset that includes all the fields included in the survey in addition to the core Market Functionality Index (MFI) fields by Survey ID. To access this data, please contact global.mfi@wfp.org for authorization. - api_response = api_instance.m_fi_surveys_full_data_get(survey_id=survey_id, format=format, page=page, env=env) + api_response = api_instance.m_fi_surveys_full_data_get(survey_id=survey_id, format=format, page=page, page_size=page_size, env=env) print("The response of SurveysApi->m_fi_surveys_full_data_get:\n") pprint(api_response) except Exception as e: @@ -153,6 +152,7 @@ Name | Type | Description | Notes **survey_id** | **int**| unique identifier for the collected data, as retrieved from /Surveys API. | [optional] **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json'] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| page size for paged results, default value is 20. | [optional] [default to 20] **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] ### Return type @@ -183,24 +183,22 @@ Name | Type | Description | Notes Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all MFI surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -265,28 +263,26 @@ Name | Type | Description | Notes [[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) # **m_fi_surveys_processed_data_get** -> PagedProcessedDataDTO m_fi_surveys_processed_data_get(survey_id=survey_id, page=page, format=format, start_date=start_date, end_date=end_date, adm0_codes=adm0_codes, market_id=market_id, survey_type=survey_type, env=env) +> PagedProcessedDataDTO m_fi_surveys_processed_data_get(survey_id=survey_id, page=page, page_size=page_size, format=format, start_date=start_date, end_date=end_date, adm0_codes=adm0_codes, market_id=market_id, survey_type=survey_type, env=env) Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-surveys-processeddata_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters @@ -302,6 +298,7 @@ with data_bridges_client.ApiClient(configuration) as api_client: api_instance = data_bridges_client.SurveysApi(api_client) survey_id = 56 # int | The ID of the survey (optional) page = 1 # int | page number for paged results (optional) (default to 1) + page_size = 20 # int | (optional) (default to 20) format = 'json' # str | Output format: [JSON|CSV] Json is the default value (optional) (default to 'json') start_date = '2013-10-20T19:20:30+01:00' # datetime | Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional) end_date = '2013-10-20T19:20:30+01:00' # datetime | Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) (optional) @@ -312,7 +309,7 @@ with data_bridges_client.ApiClient(configuration) as api_client: try: # Get a MFI processed data in long format; levels indicate the data aggregation level 1) Normalized Score, 2) Trader Aggregate Score, 3) Market Aggregate Score, 4) Trader Median, 5) Trader Mean, 6) Market Mean; each line corresponds to one of the nine dimensions of scores plus the final MFI aggregate score; 1) Assortment, 2) Availability, 3) Price, 4) Resilience, 5) Competition, 6) Infrastructure, 7) Service, 8) Quality, 9) Access and Protection, and 10) MFI final score; the variable label describes each variable and its value range - api_response = api_instance.m_fi_surveys_processed_data_get(survey_id=survey_id, page=page, format=format, start_date=start_date, end_date=end_date, adm0_codes=adm0_codes, market_id=market_id, survey_type=survey_type, env=env) + api_response = api_instance.m_fi_surveys_processed_data_get(survey_id=survey_id, page=page, page_size=page_size, format=format, start_date=start_date, end_date=end_date, adm0_codes=adm0_codes, market_id=market_id, survey_type=survey_type, env=env) print("The response of SurveysApi->m_fi_surveys_processed_data_get:\n") pprint(api_response) except Exception as e: @@ -328,6 +325,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **survey_id** | **int**| The ID of the survey | [optional] **page** | **int**| page number for paged results | [optional] [default to 1] + **page_size** | **int**| | [optional] [default to 20] **format** | **str**| Output format: [JSON|CSV] Json is the default value | [optional] [default to 'json'] **start_date** | **datetime**| Starting date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional] **end_date** | **datetime**| Ending date for the range in which data was collected. Use the date formats defined by RFC 3339 ; use strings matching year \"-\" month \"-\" day (e.g. 2020/06/24) | [optional] diff --git a/docs/UsdIndirectQuotation.md b/docs/UsdIndirectQuotation.md index 4572246..f8d9ced 100644 --- a/docs/UsdIndirectQuotation.md +++ b/docs/UsdIndirectQuotation.md @@ -24,12 +24,12 @@ json = "{}" # create an instance of UsdIndirectQuotation from a JSON string usd_indirect_quotation_instance = UsdIndirectQuotation.from_json(json) # print the JSON string representation of the object -print UsdIndirectQuotation.to_json() +print(UsdIndirectQuotation.to_json()) # convert the object into a dict usd_indirect_quotation_dict = usd_indirect_quotation_instance.to_dict() # create an instance of UsdIndirectQuotation from a dict -usd_indirect_quotation_form_dict = usd_indirect_quotation.from_dict(usd_indirect_quotation_dict) +usd_indirect_quotation_from_dict = UsdIndirectQuotation.from_dict(usd_indirect_quotation_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UsdIndirectQuotationPagedResult.md b/docs/UsdIndirectQuotationPagedResult.md index c3cd32d..b93be35 100644 --- a/docs/UsdIndirectQuotationPagedResult.md +++ b/docs/UsdIndirectQuotationPagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of UsdIndirectQuotationPagedResult from a JSON string usd_indirect_quotation_paged_result_instance = UsdIndirectQuotationPagedResult.from_json(json) # print the JSON string representation of the object -print UsdIndirectQuotationPagedResult.to_json() +print(UsdIndirectQuotationPagedResult.to_json()) # convert the object into a dict usd_indirect_quotation_paged_result_dict = usd_indirect_quotation_paged_result_instance.to_dict() # create an instance of UsdIndirectQuotationPagedResult from a dict -usd_indirect_quotation_paged_result_form_dict = usd_indirect_quotation_paged_result.from_dict(usd_indirect_quotation_paged_result_dict) +usd_indirect_quotation_paged_result_from_dict = UsdIndirectQuotationPagedResult.from_dict(usd_indirect_quotation_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ViewExtendedAggregatedPrice.md b/docs/ViewExtendedAggregatedPrice.md index f98c59d..a469a08 100644 --- a/docs/ViewExtendedAggregatedPrice.md +++ b/docs/ViewExtendedAggregatedPrice.md @@ -38,12 +38,12 @@ json = "{}" # create an instance of ViewExtendedAggregatedPrice from a JSON string view_extended_aggregated_price_instance = ViewExtendedAggregatedPrice.from_json(json) # print the JSON string representation of the object -print ViewExtendedAggregatedPrice.to_json() +print(ViewExtendedAggregatedPrice.to_json()) # convert the object into a dict view_extended_aggregated_price_dict = view_extended_aggregated_price_instance.to_dict() # create an instance of ViewExtendedAggregatedPrice from a dict -view_extended_aggregated_price_form_dict = view_extended_aggregated_price.from_dict(view_extended_aggregated_price_dict) +view_extended_aggregated_price_from_dict = ViewExtendedAggregatedPrice.from_dict(view_extended_aggregated_price_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ViewExtendedAggregatedPricePagedResult.md b/docs/ViewExtendedAggregatedPricePagedResult.md index 2bdd8fc..6c53cfe 100644 --- a/docs/ViewExtendedAggregatedPricePagedResult.md +++ b/docs/ViewExtendedAggregatedPricePagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ViewExtendedAggregatedPricePagedResult from a JSON string view_extended_aggregated_price_paged_result_instance = ViewExtendedAggregatedPricePagedResult.from_json(json) # print the JSON string representation of the object -print ViewExtendedAggregatedPricePagedResult.to_json() +print(ViewExtendedAggregatedPricePagedResult.to_json()) # convert the object into a dict view_extended_aggregated_price_paged_result_dict = view_extended_aggregated_price_paged_result_instance.to_dict() # create an instance of ViewExtendedAggregatedPricePagedResult from a dict -view_extended_aggregated_price_paged_result_form_dict = view_extended_aggregated_price_paged_result.from_dict(view_extended_aggregated_price_paged_result_dict) +view_extended_aggregated_price_paged_result_from_dict = ViewExtendedAggregatedPricePagedResult.from_dict(view_extended_aggregated_price_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ViewExtendedAlpsValue.md b/docs/ViewExtendedAlpsValue.md index b9f8eda..7a793ee 100644 --- a/docs/ViewExtendedAlpsValue.md +++ b/docs/ViewExtendedAlpsValue.md @@ -35,12 +35,12 @@ json = "{}" # create an instance of ViewExtendedAlpsValue from a JSON string view_extended_alps_value_instance = ViewExtendedAlpsValue.from_json(json) # print the JSON string representation of the object -print ViewExtendedAlpsValue.to_json() +print(ViewExtendedAlpsValue.to_json()) # convert the object into a dict view_extended_alps_value_dict = view_extended_alps_value_instance.to_dict() # create an instance of ViewExtendedAlpsValue from a dict -view_extended_alps_value_form_dict = view_extended_alps_value.from_dict(view_extended_alps_value_dict) +view_extended_alps_value_from_dict = ViewExtendedAlpsValue.from_dict(view_extended_alps_value_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ViewExtendedAlpsValuePagedResult.md b/docs/ViewExtendedAlpsValuePagedResult.md index f9d95a7..fa809fd 100644 --- a/docs/ViewExtendedAlpsValuePagedResult.md +++ b/docs/ViewExtendedAlpsValuePagedResult.md @@ -19,12 +19,12 @@ json = "{}" # create an instance of ViewExtendedAlpsValuePagedResult from a JSON string view_extended_alps_value_paged_result_instance = ViewExtendedAlpsValuePagedResult.from_json(json) # print the JSON string representation of the object -print ViewExtendedAlpsValuePagedResult.to_json() +print(ViewExtendedAlpsValuePagedResult.to_json()) # convert the object into a dict view_extended_alps_value_paged_result_dict = view_extended_alps_value_paged_result_instance.to_dict() # create an instance of ViewExtendedAlpsValuePagedResult from a dict -view_extended_alps_value_paged_result_form_dict = view_extended_alps_value_paged_result.from_dict(view_extended_alps_value_paged_result_dict) +view_extended_alps_value_paged_result_from_dict = ViewExtendedAlpsValuePagedResult.from_dict(view_extended_alps_value_paged_result_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WeeklyAggregatedPrice.md b/docs/WeeklyAggregatedPrice.md index 73045a3..4b8d6b8 100644 --- a/docs/WeeklyAggregatedPrice.md +++ b/docs/WeeklyAggregatedPrice.md @@ -37,12 +37,12 @@ json = "{}" # create an instance of WeeklyAggregatedPrice from a JSON string weekly_aggregated_price_instance = WeeklyAggregatedPrice.from_json(json) # print the JSON string representation of the object -print WeeklyAggregatedPrice.to_json() +print(WeeklyAggregatedPrice.to_json()) # convert the object into a dict weekly_aggregated_price_dict = weekly_aggregated_price_instance.to_dict() # create an instance of WeeklyAggregatedPrice from a dict -weekly_aggregated_price_form_dict = weekly_aggregated_price.from_dict(weekly_aggregated_price_dict) +weekly_aggregated_price_from_dict = WeeklyAggregatedPrice.from_dict(weekly_aggregated_price_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/XlsFormDTO.md b/docs/XlsFormDTO.md index e4805d9..fd1d487 100644 --- a/docs/XlsFormDTO.md +++ b/docs/XlsFormDTO.md @@ -23,12 +23,12 @@ json = "{}" # create an instance of XlsFormDTO from a JSON string xls_form_dto_instance = XlsFormDTO.from_json(json) # print the JSON string representation of the object -print XlsFormDTO.to_json() +print(XlsFormDTO.to_json()) # convert the object into a dict xls_form_dto_dict = xls_form_dto_instance.to_dict() # create an instance of XlsFormDTO from a dict -xls_form_dto_form_dict = xls_form_dto.from_dict(xls_form_dto_dict) +xls_form_dto_from_dict = XlsFormDTO.from_dict(xls_form_dto_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/XlsFormDefinitionDTO.md b/docs/XlsFormDefinitionDTO.md deleted file mode 100644 index 42650a3..0000000 --- a/docs/XlsFormDefinitionDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# XlsFormDefinitionDTO - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**xls_form_field_name** | **str** | | [optional] -**xls_form_field_label** | **str** | | [optional] -**xls_form_field_row** | **int** | | [optional] -**xls_form_field_type** | **str** | | [optional] -**xls_form_list_id** | **int** | | [optional] - -## Example - -```python -from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO - -# TODO update the JSON string below -json = "{}" -# create an instance of XlsFormDefinitionDTO from a JSON string -xls_form_definition_dto_instance = XlsFormDefinitionDTO.from_json(json) -# print the JSON string representation of the object -print XlsFormDefinitionDTO.to_json() - -# convert the object into a dict -xls_form_definition_dto_dict = xls_form_definition_dto_instance.to_dict() -# create an instance of XlsFormDefinitionDTO from a dict -xls_form_definition_dto_form_dict = xls_form_definition_dto.from_dict(xls_form_definition_dto_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/XlsFormDefinitionNewSchemaDTO.md b/docs/XlsFormDefinitionNewSchemaDTO.md new file mode 100644 index 0000000..7da518e --- /dev/null +++ b/docs/XlsFormDefinitionNewSchemaDTO.md @@ -0,0 +1,36 @@ +# XlsFormDefinitionNewSchemaDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**form_name** | **str** | | [optional] +**form_description** | **str** | | [optional] +**form_type** | **str** | | [optional] +**adm0_code** | **int** | | [optional] +**base_schema_id** | **int** | | [optional] +**category** | **str** | | [optional] +**type** | **str** | | [optional] +**fields** | [**List[XlsFormFieldsDTO]**](XlsFormFieldsDTO.md) | | [optional] + +## Example + +```python +from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of XlsFormDefinitionNewSchemaDTO from a JSON string +xls_form_definition_new_schema_dto_instance = XlsFormDefinitionNewSchemaDTO.from_json(json) +# print the JSON string representation of the object +print(XlsFormDefinitionNewSchemaDTO.to_json()) + +# convert the object into a dict +xls_form_definition_new_schema_dto_dict = xls_form_definition_new_schema_dto_instance.to_dict() +# create an instance of XlsFormDefinitionNewSchemaDTO from a dict +xls_form_definition_new_schema_dto_from_dict = XlsFormDefinitionNewSchemaDTO.from_dict(xls_form_definition_new_schema_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/XlsFormFieldsDTO.md b/docs/XlsFormFieldsDTO.md new file mode 100644 index 0000000..dc42b48 --- /dev/null +++ b/docs/XlsFormFieldsDTO.md @@ -0,0 +1,32 @@ +# XlsFormFieldsDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**label** | **str** | | [optional] +**type** | **str** | | [optional] +**choice_list** | [**XlsFormListChoicesDTO**](XlsFormListChoicesDTO.md) | | [optional] + +## Example + +```python +from data_bridges_client.models.xls_form_fields_dto import XlsFormFieldsDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of XlsFormFieldsDTO from a JSON string +xls_form_fields_dto_instance = XlsFormFieldsDTO.from_json(json) +# print the JSON string representation of the object +print(XlsFormFieldsDTO.to_json()) + +# convert the object into a dict +xls_form_fields_dto_dict = xls_form_fields_dto_instance.to_dict() +# create an instance of XlsFormFieldsDTO from a dict +xls_form_fields_dto_from_dict = XlsFormFieldsDTO.from_dict(xls_form_fields_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/XlsFormListChoiceDTO.md b/docs/XlsFormListChoiceDTO.md new file mode 100644 index 0000000..953e247 --- /dev/null +++ b/docs/XlsFormListChoiceDTO.md @@ -0,0 +1,30 @@ +# XlsFormListChoiceDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**label** | **str** | | [optional] + +## Example + +```python +from data_bridges_client.models.xls_form_list_choice_dto import XlsFormListChoiceDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of XlsFormListChoiceDTO from a JSON string +xls_form_list_choice_dto_instance = XlsFormListChoiceDTO.from_json(json) +# print the JSON string representation of the object +print(XlsFormListChoiceDTO.to_json()) + +# convert the object into a dict +xls_form_list_choice_dto_dict = xls_form_list_choice_dto_instance.to_dict() +# create an instance of XlsFormListChoiceDTO from a dict +xls_form_list_choice_dto_from_dict = XlsFormListChoiceDTO.from_dict(xls_form_list_choice_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/XlsFormListChoicesDTO.md b/docs/XlsFormListChoicesDTO.md new file mode 100644 index 0000000..4173b54 --- /dev/null +++ b/docs/XlsFormListChoicesDTO.md @@ -0,0 +1,30 @@ +# XlsFormListChoicesDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**choices** | [**List[XlsFormListChoiceDTO]**](XlsFormListChoiceDTO.md) | | [optional] + +## Example + +```python +from data_bridges_client.models.xls_form_list_choices_dto import XlsFormListChoicesDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of XlsFormListChoicesDTO from a JSON string +xls_form_list_choices_dto_instance = XlsFormListChoicesDTO.from_json(json) +# print the JSON string representation of the object +print(XlsFormListChoicesDTO.to_json()) + +# convert the object into a dict +xls_form_list_choices_dto_dict = xls_form_list_choices_dto_instance.to_dict() +# create an instance of XlsFormListChoicesDTO from a dict +xls_form_list_choices_dto_from_dict = XlsFormListChoicesDTO.from_dict(xls_form_list_choices_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/XlsFormsApi.md b/docs/XlsFormsApi.md index 4b703f4..c60734d 100644 --- a/docs/XlsFormsApi.md +++ b/docs/XlsFormsApi.md @@ -1,116 +1,33 @@ # data_bridges_client.XlsFormsApi -All URIs are relative to *https://api.wfp.org/vam-data-bridges/2.0.0* +All URIs are relative to *https://api.wfp.org/vam-data-bridges/4.0.0* Method | HTTP request | Description ------------- | ------------- | ------------- -[**m_fi_xls_forms_definition_get**](XlsFormsApi.md#m_fi_xls_forms_definition_get) | **GET** /MFI/XlsForms/definition | Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. [**m_fi_xls_forms_get**](XlsFormsApi.md#m_fi_xls_forms_get) | **GET** /MFI/XlsForms | Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. -# **m_fi_xls_forms_definition_get** -> List[XlsFormDefinitionDTO] m_fi_xls_forms_definition_get(xls_form_id=xls_form_id, env=env) - -Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. - - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - -### Example - -* OAuth Authentication (default): - -```python -import time -import os -import data_bridges_client -from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO -from data_bridges_client.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 -# See configuration.py for a list of all supported configuration parameters. -configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -configuration.access_token = os.environ["ACCESS_TOKEN"] - -# Enter a context with an instance of the API client -with data_bridges_client.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = data_bridges_client.XlsFormsApi(api_client) - xls_form_id = 56 # int | unique identifier for the XLS Form, as retrieved from /XLSForms (optional) - env = 'env_example' # str | Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org (optional) - - try: - # Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. - api_response = api_instance.m_fi_xls_forms_definition_get(xls_form_id=xls_form_id, env=env) - print("The response of XlsFormsApi->m_fi_xls_forms_definition_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling XlsFormsApi->m_fi_xls_forms_definition_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xls_form_id** | **int**| unique identifier for the XLS Form, as retrieved from /XLSForms | [optional] - **env** | **str**| Environment. * `prod` - api.vam.wfp.org * `dev` - dev.api.vam.wfp.org | [optional] - -### Return type - -[**List[XlsFormDefinitionDTO]**](XlsFormDefinitionDTO.md) - -### Authorization - -[default](../README.md#default) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Success | - | -**400** | Bad Request | - | - -[[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) - # **m_fi_xls_forms_get** > PagedXlsFormListDTO m_fi_xls_forms_get(adm0_code=adm0_code, page=page, start_date=start_date, end_date=end_date, env=env) Get a complete list of XLS Forms uploaded on the MFI Data Bridge in a given period of data collection. This is the digital version of the questionnaire used during the data collection exercise. - [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access%20Policy-Open-green)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + [![Generic badge](https://img.shields.io/badge/Maturity%20Level-Production%20Ready-green)]() [![Generic badge](https://img.shields.io/badge/Access_Policy-Approval_Required-yellow)]() [![Generic badge](https://img.shields.io/badge/Data%20Classification-Public-green)]() ### This endpoint is restricted, it requires the scope: \"vamdatabridges_mfi-xlsforms_get\" **Data Controller** - Wael Attia **API Integration Pattern** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern ### Example * OAuth Authentication (default): ```python -import time -import os import data_bridges_client from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO from data_bridges_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/2.0.0 +# Defining the host is optional and defaults to https://api.wfp.org/vam-data-bridges/4.0.0 # See configuration.py for a list of all supported configuration parameters. configuration = data_bridges_client.Configuration( - host = "https://api.wfp.org/vam-data-bridges/2.0.0" + host = "https://api.wfp.org/vam-data-bridges/4.0.0" ) # The client must configure the authentication and authorization parameters diff --git a/git_push.sh b/git_push.sh index f53a75d..6ed250d 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="WFP-VAM" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="DataBridgesAPI" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/pyproject.toml b/pyproject.toml index 9720317..296c6ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,11 @@ [tool.poetry] name = "data_bridges_client" -version = "2.0.0" +version = "4.0.0" description = "VAM-Data-Bridges" authors = ["VAM-INFO "] license = "NoLicense" readme = "README.md" -repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID" +repository = "https://github.com/WFP-VAM/DataBridgesAPI" keywords = ["OpenAPI", "OpenAPI-Generator", "VAM-Data-Bridges"] include = ["data_bridges_client/py.typed"] @@ -21,6 +21,9 @@ typing-extensions = ">=4.7.1" pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + [build-system] requires = ["setuptools"] @@ -28,3 +31,41 @@ build-backend = "setuptools.build_meta" [tool.pylint.'MESSAGES CONTROL'] extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "data_bridges_client", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/setup.py b/setup.py index 508dec8..52659bb 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test-requirements.txt b/test-requirements.txt index 3a0d0b9..8e6d8cb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,5 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/test/test_bad_request_dto.py b/test/test_bad_request_dto.py index d7f5dc2..287c204 100644 --- a/test/test_bad_request_dto.py +++ b/test/test_bad_request_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.bad_request_dto import BadRequestDTO diff --git a/test/test_commodities_api.py b/test/test_commodities_api.py index f903a2a..b55477b 100644 --- a/test/test_commodities_api.py +++ b/test/test_commodities_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_commodity_dto.py b/test/test_commodity_dto.py index 5c05147..0ea9d0d 100644 --- a/test/test_commodity_dto.py +++ b/test/test_commodity_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.commodity_dto import CommodityDTO diff --git a/test/test_commodity_price_dto.py b/test/test_commodity_price_dto.py index 3d35373..7764dda 100644 --- a/test/test_commodity_price_dto.py +++ b/test/test_commodity_price_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.commodity_price_dto import CommodityPriceDTO diff --git a/test/test_commodity_processing_dto.py b/test/test_commodity_processing_dto.py index 4c56a12..5ffdb7e 100644 --- a/test/test_commodity_processing_dto.py +++ b/test/test_commodity_processing_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.commodity_processing_dto import CommodityProcessingDTO diff --git a/test/test_commodity_quality_dto.py b/test/test_commodity_quality_dto.py index 75232b9..4590647 100644 --- a/test/test_commodity_quality_dto.py +++ b/test/test_commodity_quality_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.commodity_quality_dto import CommodityQualityDTO diff --git a/test/test_commodity_units_api.py b/test/test_commodity_units_api.py index ec4bc98..35a432d 100644 --- a/test/test_commodity_units_api.py +++ b/test/test_commodity_units_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_currency_api.py b/test/test_currency_api.py index c01ddb2..b9a1d79 100644 --- a/test/test_currency_api.py +++ b/test/test_currency_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_currency_dto.py b/test/test_currency_dto.py index e997aad..74d1240 100644 --- a/test/test_currency_dto.py +++ b/test/test_currency_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.currency_dto import CurrencyDTO diff --git a/test/test_economic_data_api.py b/test/test_economic_data_api.py index d0917fd..a16c7ef 100644 --- a/test/test_economic_data_api.py +++ b/test/test_economic_data_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_economic_data_dto.py b/test/test_economic_data_dto.py index b5086f7..4b8cd7d 100644 --- a/test/test_economic_data_dto.py +++ b/test/test_economic_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.economic_data_dto import EconomicDataDTO diff --git a/test/test_economic_indicator_property.py b/test/test_economic_indicator_property.py index 501796b..84ba7a4 100644 --- a/test/test_economic_indicator_property.py +++ b/test/test_economic_indicator_property.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.economic_indicator_property import EconomicIndicatorProperty diff --git a/test/test_economic_indicator_property_paged_result.py b/test/test_economic_indicator_property_paged_result.py index 9a16faa..ced5d50 100644 --- a/test/test_economic_indicator_property_paged_result.py +++ b/test/test_economic_indicator_property_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.economic_indicator_property_paged_result import EconomicIndicatorPropertyPagedResult diff --git a/test/test_feature.py b/test/test_feature.py index c55609b..c8d3efd 100644 --- a/test/test_feature.py +++ b/test/test_feature.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.feature import Feature diff --git a/test/test_food_security_api.py b/test/test_food_security_api.py index 8c278e4..e1be833 100644 --- a/test/test_food_security_api.py +++ b/test/test_food_security_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_geometry.py b/test/test_geometry.py index 2336abf..56bb205 100644 --- a/test/test_geometry.py +++ b/test/test_geometry.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.geometry import Geometry diff --git a/test/test_gorp_api.py b/test/test_gorp_api.py index c091a9c..e31a281 100644 --- a/test/test_gorp_api.py +++ b/test/test_gorp_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_gorp_value_with_changes.py b/test/test_gorp_value_with_changes.py index 424f86c..9bfd214 100644 --- a/test/test_gorp_value_with_changes.py +++ b/test/test_gorp_value_with_changes.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.gorp_value_with_changes import GorpValueWithChanges diff --git a/test/test_gorp_value_with_changes_paged_result.py b/test/test_gorp_value_with_changes_paged_result.py index 0cd4946..e090a07 100644 --- a/test/test_gorp_value_with_changes_paged_result.py +++ b/test/test_gorp_value_with_changes_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.gorp_value_with_changes_paged_result import GorpValueWithChangesPagedResult diff --git a/test/test_household_survey_list_dto.py b/test/test_household_survey_list_dto.py index e2d0a46..59b1ccc 100644 --- a/test/test_household_survey_list_dto.py +++ b/test/test_household_survey_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.household_survey_list_dto import HouseholdSurveyListDTO diff --git a/test/test_household_survey_list_dto_paged_result.py b/test/test_household_survey_list_dto_paged_result.py index 1ac5a84..5c283f1 100644 --- a/test/test_household_survey_list_dto_paged_result.py +++ b/test/test_household_survey_list_dto_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.household_survey_list_dto_paged_result import HouseholdSurveyListDTOPagedResult diff --git a/test/test_incubation_api.py b/test/test_incubation_api.py index 9d1f39f..a58cafe 100644 --- a/test/test_incubation_api.py +++ b/test/test_incubation_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -58,7 +58,14 @@ def test_household_public_base_data_get(self) -> None: def test_household_surveys_get(self) -> None: """Test case for household_surveys_get - Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible of the upload for each survey. + Retrieve 1) Survey IDs, 2) their corresponding XLS Form IDs, and 3) Base XLS Form of all household surveys conducted in a country. A date of reference, SurveyDate, for the data collection is set by the officer responsible for the upload for each survey. + """ + pass + + def test_xls_forms_definition_get(self) -> None: + """Test case for xls_forms_definition_get + + Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. """ pass diff --git a/test/test_ipc_value.py b/test/test_ipc_value.py index c65b639..874bf90 100644 --- a/test/test_ipc_value.py +++ b/test/test_ipc_value.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.ipc_value import IpcValue diff --git a/test/test_ipc_value_paged_result.py b/test/test_ipc_value_paged_result.py index 921ba01..0da8eda 100644 --- a/test/test_ipc_value_paged_result.py +++ b/test/test_ipc_value_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.ipc_value_paged_result import IpcValuePagedResult diff --git a/test/test_key_name_dto.py b/test/test_key_name_dto.py index df15ed0..182de66 100644 --- a/test/test_key_name_dto.py +++ b/test/test_key_name_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.key_name_dto import KeyNameDto diff --git a/test/test_market_dto.py b/test/test_market_dto.py index caea2f3..3b25bf6 100644 --- a/test/test_market_dto.py +++ b/test/test_market_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.market_dto import MarketDTO diff --git a/test/test_market_geo_json_root.py b/test/test_market_geo_json_root.py index ed8b6d2..aa4c0d8 100644 --- a/test/test_market_geo_json_root.py +++ b/test/test_market_geo_json_root.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.market_geo_json_root import MarketGeoJsonRoot diff --git a/test/test_market_prices_api.py b/test/test_market_prices_api.py index dd681e7..e1d738a 100644 --- a/test/test_market_prices_api.py +++ b/test/test_market_prices_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_markets_api.py b/test/test_markets_api.py index 73832b0..6c30c79 100644 --- a/test/test_markets_api.py +++ b/test/test_markets_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_mfi_processed_data_dto.py b/test/test_mfi_processed_data_dto.py index 23cc211..3c487e0 100644 --- a/test/test_mfi_processed_data_dto.py +++ b/test/test_mfi_processed_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.mfi_processed_data_dto import MFIProcessedDataDTO diff --git a/test/test_nearby_markets_dto.py b/test/test_nearby_markets_dto.py index 04e6c0b..485874a 100644 --- a/test/test_nearby_markets_dto.py +++ b/test/test_nearby_markets_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.nearby_markets_dto import NearbyMarketsDTO diff --git a/test/test_paged_commodity_list_dto.py b/test/test_paged_commodity_list_dto.py index 1d56e1f..2bb2aa7 100644 --- a/test/test_paged_commodity_list_dto.py +++ b/test/test_paged_commodity_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_commodity_list_dto import PagedCommodityListDTO diff --git a/test/test_paged_commodity_price_list_dto.py b/test/test_paged_commodity_price_list_dto.py index b2503c6..5569ba5 100644 --- a/test/test_paged_commodity_price_list_dto.py +++ b/test/test_paged_commodity_price_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_commodity_price_list_dto import PagedCommodityPriceListDTO diff --git a/test/test_paged_commodity_weekly_aggregated_price_list_dto.py b/test/test_paged_commodity_weekly_aggregated_price_list_dto.py index fd6a870..9167c5d 100644 --- a/test/test_paged_commodity_weekly_aggregated_price_list_dto.py +++ b/test/test_paged_commodity_weekly_aggregated_price_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_commodity_weekly_aggregated_price_list_dto import PagedCommodityWeeklyAggregatedPriceListDTO diff --git a/test/test_paged_currency_list_dto.py b/test/test_paged_currency_list_dto.py index 33f83b2..c52ef3f 100644 --- a/test/test_paged_currency_list_dto.py +++ b/test/test_paged_currency_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_currency_list_dto import PagedCurrencyListDTO diff --git a/test/test_paged_economic_data_dto.py b/test/test_paged_economic_data_dto.py index 84035e2..9008948 100644 --- a/test/test_paged_economic_data_dto.py +++ b/test/test_paged_economic_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_economic_data_dto import PagedEconomicDataDTO diff --git a/test/test_paged_market_list_dto.py b/test/test_paged_market_list_dto.py index 0de18ea..ac28658 100644 --- a/test/test_paged_market_list_dto.py +++ b/test/test_paged_market_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_market_list_dto import PagedMarketListDTO diff --git a/test/test_paged_processed_data_dto.py b/test/test_paged_processed_data_dto.py index 8b2efb4..60d9627 100644 --- a/test/test_paged_processed_data_dto.py +++ b/test/test_paged_processed_data_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_processed_data_dto import PagedProcessedDataDTO diff --git a/test/test_paged_survey_list_dto.py b/test/test_paged_survey_list_dto.py index a94aaf4..983034c 100644 --- a/test/test_paged_survey_list_dto.py +++ b/test/test_paged_survey_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_survey_list_dto import PagedSurveyListDTO diff --git a/test/test_paged_survey_responses_dto.py b/test/test_paged_survey_responses_dto.py index f069cf9..8b553aa 100644 --- a/test/test_paged_survey_responses_dto.py +++ b/test/test_paged_survey_responses_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_survey_responses_dto import PagedSurveyResponsesDTO diff --git a/test/test_paged_xls_form_list_dto.py b/test/test_paged_xls_form_list_dto.py index a040234..8eb3b05 100644 --- a/test/test_paged_xls_form_list_dto.py +++ b/test/test_paged_xls_form_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.paged_xls_form_list_dto import PagedXlsFormListDTO diff --git a/test/test_problem_details.py b/test/test_problem_details.py index c15d35c..d56d565 100644 --- a/test/test_problem_details.py +++ b/test/test_problem_details.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.problem_details import ProblemDetails diff --git a/test/test_properties.py b/test/test_properties.py index 214f46e..31f54d3 100644 --- a/test/test_properties.py +++ b/test/test_properties.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.properties import Properties diff --git a/test/test_rpme_api.py b/test/test_rpme_api.py index a618e91..2d33f19 100644 --- a/test/test_rpme_api.py +++ b/test/test_rpme_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_rpme_assessment.py b/test/test_rpme_assessment.py index 123482b..3f66ed3 100644 --- a/test/test_rpme_assessment.py +++ b/test/test_rpme_assessment.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.rpme_assessment import RpmeAssessment diff --git a/test/test_rpme_assessment_paged_result.py b/test/test_rpme_assessment_paged_result.py index d6f251e..0ee4543 100644 --- a/test/test_rpme_assessment_paged_result.py +++ b/test/test_rpme_assessment_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.rpme_assessment_paged_result import RpmeAssessmentPagedResult diff --git a/test/test_rpme_output_values.py b/test/test_rpme_output_values.py index 7f6533f..cd4c109 100644 --- a/test/test_rpme_output_values.py +++ b/test/test_rpme_output_values.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.rpme_output_values import RpmeOutputValues diff --git a/test/test_rpme_variable.py b/test/test_rpme_variable.py index d15e257..41c7eac 100644 --- a/test/test_rpme_variable.py +++ b/test/test_rpme_variable.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.rpme_variable import RpmeVariable diff --git a/test/test_rpme_variable_paged_result.py b/test/test_rpme_variable_paged_result.py index 189bd56..79eaf5d 100644 --- a/test/test_rpme_variable_paged_result.py +++ b/test/test_rpme_variable_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.rpme_variable_paged_result import RpmeVariablePagedResult diff --git a/test/test_survey_list_dto.py b/test/test_survey_list_dto.py index 005df1a..2a4e33f 100644 --- a/test/test_survey_list_dto.py +++ b/test/test_survey_list_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.survey_list_dto import SurveyListDTO diff --git a/test/test_surveys_api.py b/test/test_surveys_api.py index e3c0f47..ff6e116 100644 --- a/test/test_surveys_api.py +++ b/test/test_surveys_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/test/test_usd_indirect_quotation.py b/test/test_usd_indirect_quotation.py index 8a77a54..f1f75aa 100644 --- a/test/test_usd_indirect_quotation.py +++ b/test/test_usd_indirect_quotation.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.usd_indirect_quotation import UsdIndirectQuotation diff --git a/test/test_usd_indirect_quotation_paged_result.py b/test/test_usd_indirect_quotation_paged_result.py index c0641f5..bd8695d 100644 --- a/test/test_usd_indirect_quotation_paged_result.py +++ b/test/test_usd_indirect_quotation_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.usd_indirect_quotation_paged_result import UsdIndirectQuotationPagedResult diff --git a/test/test_view_extended_aggregated_price.py b/test/test_view_extended_aggregated_price.py index df00eb7..1d13943 100644 --- a/test/test_view_extended_aggregated_price.py +++ b/test/test_view_extended_aggregated_price.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.view_extended_aggregated_price import ViewExtendedAggregatedPrice diff --git a/test/test_view_extended_aggregated_price_paged_result.py b/test/test_view_extended_aggregated_price_paged_result.py index 7b56c15..6500ac2 100644 --- a/test/test_view_extended_aggregated_price_paged_result.py +++ b/test/test_view_extended_aggregated_price_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.view_extended_aggregated_price_paged_result import ViewExtendedAggregatedPricePagedResult diff --git a/test/test_view_extended_alps_value.py b/test/test_view_extended_alps_value.py index 5202c2f..44ea75a 100644 --- a/test/test_view_extended_alps_value.py +++ b/test/test_view_extended_alps_value.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.view_extended_alps_value import ViewExtendedAlpsValue diff --git a/test/test_view_extended_alps_value_paged_result.py b/test/test_view_extended_alps_value_paged_result.py index 2e7ca84..ff58635 100644 --- a/test/test_view_extended_alps_value_paged_result.py +++ b/test/test_view_extended_alps_value_paged_result.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.view_extended_alps_value_paged_result import ViewExtendedAlpsValuePagedResult diff --git a/test/test_weekly_aggregated_price.py b/test/test_weekly_aggregated_price.py index 45bc176..85f4abe 100644 --- a/test/test_weekly_aggregated_price.py +++ b/test/test_weekly_aggregated_price.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.weekly_aggregated_price import WeeklyAggregatedPrice diff --git a/test/test_xls_form_definition_new_schema_dto.py b/test/test_xls_form_definition_new_schema_dto.py new file mode 100644 index 0000000..81ff9df --- /dev/null +++ b/test/test_xls_form_definition_new_schema_dto.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + VAM-Data-Bridges + + API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + The version of the OpenAPI document: 4.0.0 + Contact: wfp.economicanalysis@wfp.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from data_bridges_client.models.xls_form_definition_new_schema_dto import XlsFormDefinitionNewSchemaDTO + +class TestXlsFormDefinitionNewSchemaDTO(unittest.TestCase): + """XlsFormDefinitionNewSchemaDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> XlsFormDefinitionNewSchemaDTO: + """Test XlsFormDefinitionNewSchemaDTO + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `XlsFormDefinitionNewSchemaDTO` + """ + model = XlsFormDefinitionNewSchemaDTO() + if include_optional: + return XlsFormDefinitionNewSchemaDTO( + form_name = '', + form_description = '', + form_type = '', + adm0_code = 56, + base_schema_id = 56, + category = '', + type = '', + fields = [ + { + 'key' : null + } + ] + ) + else: + return XlsFormDefinitionNewSchemaDTO( + ) + """ + + def testXlsFormDefinitionNewSchemaDTO(self): + """Test XlsFormDefinitionNewSchemaDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_xls_form_dto.py b/test/test_xls_form_dto.py index f0f7694..b934775 100644 --- a/test/test_xls_form_dto.py +++ b/test/test_xls_form_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,7 +14,6 @@ import unittest -import datetime from data_bridges_client.models.xls_form_dto import XlsFormDTO diff --git a/test/test_xls_form_definition_dto.py b/test/test_xls_form_fields_dto.py similarity index 59% rename from test/test_xls_form_definition_dto.py rename to test/test_xls_form_fields_dto.py index 024f109..ea87a61 100644 --- a/test/test_xls_form_definition_dto.py +++ b/test/test_xls_form_fields_dto.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -14,12 +14,11 @@ import unittest -import datetime -from data_bridges_client.models.xls_form_definition_dto import XlsFormDefinitionDTO +from data_bridges_client.models.xls_form_fields_dto import XlsFormFieldsDTO -class TestXlsFormDefinitionDTO(unittest.TestCase): - """XlsFormDefinitionDTO unit test stubs""" +class TestXlsFormFieldsDTO(unittest.TestCase): + """XlsFormFieldsDTO unit test stubs""" def setUp(self): pass @@ -27,29 +26,30 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> XlsFormDefinitionDTO: - """Test XlsFormDefinitionDTO + def make_instance(self, include_optional) -> XlsFormFieldsDTO: + """Test XlsFormFieldsDTO include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `XlsFormDefinitionDTO` + # uncomment below to create an instance of `XlsFormFieldsDTO` """ - model = XlsFormDefinitionDTO() + model = XlsFormFieldsDTO() if include_optional: - return XlsFormDefinitionDTO( - xls_form_field_name = '', - xls_form_field_label = '', - xls_form_field_row = 56, - xls_form_field_type = '', - xls_form_list_id = 56 + return XlsFormFieldsDTO( + name = '', + label = '', + type = '', + choice_list = { + 'key' : null + } ) else: - return XlsFormDefinitionDTO( + return XlsFormFieldsDTO( ) """ - def testXlsFormDefinitionDTO(self): - """Test XlsFormDefinitionDTO""" + def testXlsFormFieldsDTO(self): + """Test XlsFormFieldsDTO""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_xls_form_list_choice_dto.py b/test/test_xls_form_list_choice_dto.py new file mode 100644 index 0000000..0a3e1ed --- /dev/null +++ b/test/test_xls_form_list_choice_dto.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + VAM-Data-Bridges + + API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + The version of the OpenAPI document: 4.0.0 + Contact: wfp.economicanalysis@wfp.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from data_bridges_client.models.xls_form_list_choice_dto import XlsFormListChoiceDTO + +class TestXlsFormListChoiceDTO(unittest.TestCase): + """XlsFormListChoiceDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> XlsFormListChoiceDTO: + """Test XlsFormListChoiceDTO + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `XlsFormListChoiceDTO` + """ + model = XlsFormListChoiceDTO() + if include_optional: + return XlsFormListChoiceDTO( + name = '', + label = '' + ) + else: + return XlsFormListChoiceDTO( + ) + """ + + def testXlsFormListChoiceDTO(self): + """Test XlsFormListChoiceDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_xls_form_list_choices_dto.py b/test/test_xls_form_list_choices_dto.py new file mode 100644 index 0000000..805d82b --- /dev/null +++ b/test/test_xls_form_list_choices_dto.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + VAM-Data-Bridges + + API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern + + The version of the OpenAPI document: 4.0.0 + Contact: wfp.economicanalysis@wfp.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from data_bridges_client.models.xls_form_list_choices_dto import XlsFormListChoicesDTO + +class TestXlsFormListChoicesDTO(unittest.TestCase): + """XlsFormListChoicesDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> XlsFormListChoicesDTO: + """Test XlsFormListChoicesDTO + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `XlsFormListChoicesDTO` + """ + model = XlsFormListChoicesDTO() + if include_optional: + return XlsFormListChoicesDTO( + name = '', + choices = [ + { + 'key' : null + } + ] + ) + else: + return XlsFormListChoicesDTO( + ) + """ + + def testXlsFormListChoicesDTO(self): + """Test XlsFormListChoicesDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_xls_forms_api.py b/test/test_xls_forms_api.py index 58edb39..8c11b42 100644 --- a/test/test_xls_forms_api.py +++ b/test/test_xls_forms_api.py @@ -5,7 +5,7 @@ API Documentation of the **DataBridges** platform: https://databridges.vam.wfp.org/. For API discussions and details: #api-integration-vam-data-bridges on Slack, [Teams channel](https://teams.microsoft.com/l/team/19%3a4ca595f7681f4ffa8a86b7af58832e8d%40thread.skype/conversations?groupId=cbd1e508-c6e8-459d-96b7-6cac3039c42c&tenantId=462ad9ae-d7d9-4206-b874-71b1e079776f) **API Integration** - This endpoint uses [Hey Jude](https://docs.api.wfp.org/providers/#api-patterns) pattern - The version of the OpenAPI document: 2.0.0 + The version of the OpenAPI document: 4.0.0 Contact: wfp.economicanalysis@wfp.org Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,13 +27,6 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_m_fi_xls_forms_definition_get(self) -> None: - """Test case for m_fi_xls_forms_definition_get - - Get a complete set of XLS Form definitions of a given XLS Form ID. This is the digital version of the questionnaire used during the data collection exercise. - """ - pass - def test_m_fi_xls_forms_get(self) -> None: """Test case for m_fi_xls_forms_get From 40c9f8dfcdca96b5975326fe2417627d4392c1d0 Mon Sep 17 00:00:00 2001 From: Paolo Lucchino Date: Tue, 7 May 2024 11:27:15 +0200 Subject: [PATCH 2/3] Fix typo in README --- generate/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/README.md b/generate/README.md index 408b5ca..1727433 100644 --- a/generate/README.md +++ b/generate/README.md @@ -14,7 +14,7 @@ Every time ``` mv data_bridges_client/token.py . -rm -rf tests docs data_bridges_client +rm -rf test docs data_bridges_client mkdir data_bridges_client mv ./token.py data_bridges_client/ ``` From 3e3acd6510e3e3b49b20548d351b79247be9912b Mon Sep 17 00:00:00 2001 From: Paolo Lucchino Date: Tue, 7 May 2024 12:19:40 +0200 Subject: [PATCH 3/3] No longer pin python template version --- generate/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/generate/README.md b/generate/README.md index 1727433..0727273 100644 --- a/generate/README.md +++ b/generate/README.md @@ -19,9 +19,8 @@ mkdir data_bridges_client mv ./token.py data_bridges_client/ ``` -5. Generate the client by running this command from the root of the repository. We pin the version to 5.4.0 as python templates from more recent versions don't seem to work. +5. Generate the client by running this command from the root of the repository. ``` -openapi-generator-cli version-manager set 5.4.0 openapi-generator-cli generate -g python -i generate/swagger.json -o . --package-name data_bridges_client --git-user-id WFP-VAM --git-repo-id DataBridgesAPI ``` 4. Manually revert changes to `setup.py` and `README.md`. These relate to additional functionality we developed to handle the WFP token refresh workflow.